Documentation
¶
Overview ¶
Package credential resolves secret values in the config, such as channel tokens and tool API keys.
Supported formats:
- Plaintext: "sk-abc123" → returned as-is
- File ref: "file://filename.key" → content read from configDir/filename.key
- Empty: "" → returned as-is (a provider that needs no key)
Index ¶
Constants ¶
View Source
const FileScheme = "file://"
FileScheme prefixes a reference to a file, beside the config, that holds the value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver resolves raw credential strings from config secret fields. File references are resolved relative to the directory of the config file.
func NewResolver ¶
NewResolver returns a Resolver that resolves file:// references relative to configDir (typically filepath.Dir of the config file path).
Click to show internal directories.
Click to hide internal directories.