Documentation
¶
Index ¶
- Variables
- func ApplySecretWrapping(obj object.Object) object.Object
- func DetectConfigFormat(path, explicit string) string
- func IsSensitiveKey(key string) bool
- func LoadConfigObjectFromPath(path, format string) (object.Object, error)
- func LoadConfigObjectFromRaw(raw, format string) (object.Object, error)
- func ObjectToJSONWithSecrets(obj object.Object) (string, error)
- func ParseDotEnv(data []byte) (map[string]string, error)
- func RegisterFormatParser(format string, parser func([]byte) (interface{}, error))
- func SecretValue(obj object.Object) (string, bool)
Constants ¶
This section is empty.
Variables ¶
CheckFileReadAllowedFn checks whether reading a file at the given path is allowed by the active security policy. Defaults to no-op (allow all).
var FormatParsers = map[string]func([]byte) (interface{}, error){}
FormatParsers contains opt-in parsers for non-core config formats such as YAML. Core supports JSON and .env without third-party dependencies.
var ObjectToNativeFn func(obj object.Object) interface{}
ObjectToNativeFn converts an object.Object back to a Go native value. Must be set by the host package.
var ParseJSONToObjectFn func(raw string) (object.Object, error)
ParseJSONToObjectFn converts a JSON string to an object.Object. Must be set by the host package.
var SanitizePathFn func(userPath string) (string, error) = func(p string) (string, error) { return filepath.Abs(p) }
SanitizePathFn validates/resolves user-supplied paths. The host package must set this before calling LoadConfigObjectFromPath.
var ToObjectFn func(v interface{}) object.Object
ToObjectFn converts an arbitrary Go value to an object.Object. Must be set by the host package.
Functions ¶
func DetectConfigFormat ¶
func IsSensitiveKey ¶
func LoadConfigObjectFromPath ¶
LoadConfigObjectFromPath reads a config file and returns an object.Object with sensitive values wrapped as Secrets.
func LoadConfigObjectFromRaw ¶
LoadConfigObjectFromRaw parses raw config content (not from a file).
func ObjectToJSONWithSecrets ¶
ObjectToJSONWithSecrets marshals an object to JSON, exposing secret values.
func RegisterFormatParser ¶
RegisterFormatParser registers a config parser for a detected format.
Types ¶
This section is empty.