Migrate application configuration to the new ConfigKit API

This commit is contained in:
2026-11-17 20:42:25 +00:00
parent ae0e410875
commit 6da4d070e5
19 changed files with 88 additions and 29 deletions

View File

@@ -4,8 +4,8 @@ import (
"sort"
"strings"
configkit "gitea.maximumdirect.net/eric/ConfigKit"
"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
configkit "go.maximumdirect.net/configkit"
)
// documentLoadState keeps the spelling supplied by the user while resolver
@@ -255,7 +255,7 @@ func normalizeDocumentValue[T comparable](resolution documentNormalizer, path co
return
}
if *target != value {
resolution.Record(path, configkit.ChangeNormalization, reason)
resolution.RecordNormalization(path, reason)
*target = value
}
}
@@ -266,7 +266,7 @@ func normalizePipelineDocumentString(resolution documentNormalizer, path configk
}
value := strings.TrimSpace(**target)
if **target != value {
resolution.Record(path, configkit.ChangeNormalization, reason)
resolution.RecordNormalization(path, reason)
**target = value
}
}
@@ -312,7 +312,7 @@ func normalizeDocumentMap[T any](values map[string]T, path configkit.Path, kind
}
}
if changed {
resolution.Record(path, configkit.ChangeNormalization, "normalized "+kind+" keys", dependencies...)
resolution.RecordNormalization(path, "normalized "+kind+" keys", dependencies...)
values = result
}
return values