Documentation ¶
Index ¶
- Variables
- func NewParser(options ...Option) (*parser, error)
- func Parse(v any, options ...Option) error
- type Option
- func WithClientSecretCredential(tenantID, clientID, clientSecret string) Option
- func WithConcurrency(c int) Option
- func WithCredential(cred auth.Credential) Option
- func WithManagedIdentity(clientID ...string) Option
- func WithSecretClient(c secretClient) Option
- func WithTimeout(d time.Duration) Option
- func WithVault(vault string) Option
- type Options
- type RequiredError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrVaultNotSet is returned when no vault is set. ErrVaultNotSet = errors.New("a vault must be set") )
Functions ¶
Types ¶
type Option ¶ added in v0.7.0
type Option func(o *Options)
Option is a function that sets Options.
func WithClientSecretCredential ¶ added in v0.7.0
WithClientSecretCredential sets the parser to use client credential with a secret (client secret credential) for the Key Vault.
func WithConcurrency ¶ added in v0.7.0
WithConcurrency sets the concurrency of the parser.
func WithCredential ¶ added in v0.7.0
func WithCredential(cred auth.Credential) Option
WithCredential sets the provided credential to the parser.
func WithManagedIdentity ¶ added in v0.7.0
WithManagedIdentity sets the parser to use a managed identity for credentials for the Key Vault.
func WithSecretClient ¶ added in v0.8.0
func WithSecretClient(c secretClient) Option
WithSecretClient sets the client for secret retrieval.
func WithTimeout ¶ added in v0.7.0
WithTimeout sets the timeout of the parser.
type Options ¶ added in v0.4.0
type Options struct { // Credential is the credential to be used with the Client. Used to override // the default method of aquiring credentials. Credential auth.Credential // SecretClient is a client used to retreive secrets. SecretClient secretClient // Timeout is the total timeout for retrieval of secrets. Defaults to 5 seconds. Timeout time.Duration // Concurrency is the amount of secrets that will be retrieved concurrently. // Defaults to 10. Concurrency int // Vault is the name of the vault containing secrets. Used to override the // default method of aquiring target vault. Vault string // TenantID of the Service Principal with access to target Key Vault. TenantID string // ClientID of the Service Principal or user assigned managed identity with access to target Key Vault. ClientID string // ClientSecret of the Service Principal with access to target Key Vault. ClientSecret string // UseManagedIdentity set to use a managed identity. To use a user assigned managed identity, use // together with ClientID. UseManagedIdentity bool }
Options contains options for the Parser.
type RequiredError ¶ added in v0.5.0
type RequiredError struct {
// contains filtered or unexported fields
}
RequiredError represents an error when a secret is required.
func (*RequiredError) Error ¶ added in v0.5.0
func (e *RequiredError) Error() string
Error implements interface error.
Click to show internal directories.
Click to hide internal directories.