Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProvider ¶
func RegisterProvider(name string, constructor ProviderConstructor) error
RegisterProvider registers a secret backend provider by name (case-insensitive).
Types ¶
type JsonProvider ¶
type JsonProvider struct {
// contains filtered or unexported fields
}
JsonProvider implements a simple secret provider backed by a map. It can be initialized from a JSON file and supports nested configurations.
type Provider ¶
type Provider interface {
// Get returns the plaintext value for a logical key.
Get(ctx context.Context, key string) (string, error)
// Put stores a plaintext value at the logical key, creating or updating as needed.
Put(ctx context.Context, key, value string) error
}
Provider is the abstraction for secret backends (Vault, AWS KMS, GCP KMS, local, etc.). Implementations must be stateless and receive all config through the constructor.
type ProviderConstructor ¶
ProviderConstructor builds a Provider from decrypted config.
func LookupProvider ¶
func LookupProvider(name string) (ProviderConstructor, bool)
LookupProvider finds a provider constructor by name.
Click to show internal directories.
Click to hide internal directories.