Documentation
¶
Overview ¶
*
- Azure App Config implementation
*
*
- Azure KeyVault implementation
*
*
- Azure TableStore implementation
*
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrRetrieveFailed = errors.New("failed to retrieve config item") ErrClientInitialization = errors.New("failed to initialize the client") ErrEmptyResponse = errors.New("value retrieved but empty for token") ErrServiceCallFailed = errors.New("failed to complete the service call") )
var ErrIncorrectlyStructuredToken = errors.New("incorrectly structured token")
Functions ¶
This section is empty.
Types ¶
type AzAppConf ¶
type AzAppConf struct {
// contains filtered or unexported fields
}
func NewAzAppConf ¶
func NewAzAppConf(ctx context.Context, token *config.ParsedTokenConfig, logger log.ILogger) (*AzAppConf, error)
NewAzAppConf
func (*AzAppConf) SetToken ¶
func (implmt *AzAppConf) SetToken(token *config.ParsedTokenConfig)
setTokenVal sets the token
type AzAppConfConfig ¶
type AzAppConfConfig struct { Label string `json:"label"` Etag *azcore.ETag `json:"etag"` AcceptDateTime *time.Time `json:"acceptedDateTime"` }
AzAppConfConfig is the azure conf service specific config and it is parsed from the token metadata
type AzKvConfig ¶
type AzKvConfig struct {
Version string `json:"version"`
}
AzKvConfig takes any metadata from the token Version is the only
type AzTableStore ¶
type AzTableStore struct {
// contains filtered or unexported fields
}
func NewAzTableStore ¶
func NewAzTableStore(ctx context.Context, token *config.ParsedTokenConfig, logger log.ILogger) (*AzTableStore, error)
NewAzTableStore
func (*AzTableStore) SetToken ¶
func (implmt *AzTableStore) SetToken(token *config.ParsedTokenConfig)
setToken already happens in the constructor
func (*AzTableStore) Token ¶
func (imp *AzTableStore) Token() (string, error)
tokenVal in AZ table storage if an Entity contains the `value` property we attempt to extract it and return.
From this point then normal rules of configmanager apply, including keySeperator and lookup.
type AzTableStrgConfig ¶
type AzTableStrgConfig struct {
Format string `json:"format"`
}
type GcpSecrets ¶
type GcpSecrets struct {
// contains filtered or unexported fields
}
func NewGcpSecrets ¶
func (*GcpSecrets) SetToken ¶
func (imp *GcpSecrets) SetToken(token *config.ParsedTokenConfig)
func (*GcpSecrets) Token ¶
func (imp *GcpSecrets) Token() (string, error)
type GcpSecretsConfig ¶
type GcpSecretsConfig struct {
Version string `json:"version"`
}
type KvScrtStore ¶
type KvScrtStore struct {
// contains filtered or unexported fields
}
func NewKvScrtStore ¶
func NewKvScrtStore(ctx context.Context, token *config.ParsedTokenConfig, logger log.ILogger) (*KvScrtStore, error)
NewKvScrtStore returns a KvScrtStore requires `AZURE_SUBSCRIPTION_ID` environment variable to be present to successfully work
func (*KvScrtStore) SetToken ¶
func (implmt *KvScrtStore) SetToken(token *config.ParsedTokenConfig)
setToken already happens in AzureKVClient in the constructor
func (*KvScrtStore) Token ¶
func (imp *KvScrtStore) Token() (string, error)
type ParamStore ¶
type ParamStore struct {
// contains filtered or unexported fields
}
func NewParamStore ¶
func (*ParamStore) SetToken ¶
func (imp *ParamStore) SetToken(token *config.ParsedTokenConfig)
func (*ParamStore) Token ¶
func (imp *ParamStore) Token() (string, error)
type ParamStrConfig ¶
type ParamStrConfig struct { }
type SecretsMgr ¶
type SecretsMgr struct {
// contains filtered or unexported fields
}
func NewSecretsMgr ¶
func (*SecretsMgr) SetToken ¶
func (imp *SecretsMgr) SetToken(token *config.ParsedTokenConfig)
func (*SecretsMgr) Token ¶
func (imp *SecretsMgr) Token() (string, error)
type SecretsMgrConfig ¶
type SecretsMgrConfig struct {
Version string `json:"version"`
}
type Strategy ¶
type Strategy interface { Token() (s string, e error) SetToken(s *config.ParsedTokenConfig) }
Strategy iface that all store implementations must conform to, in order to be be used by the retrieval implementation
Defined on the package for easier re-use across the program
type VaultConfig ¶
VaultConfig holds the parseable metadata struct
type VaultStore ¶
type VaultStore struct {
// contains filtered or unexported fields
}
func NewVaultStore ¶
func NewVaultStore(ctx context.Context, token *config.ParsedTokenConfig, logger log.ILogger) (*VaultStore, error)
func (*VaultStore) SetToken ¶
func (imp *VaultStore) SetToken(token *config.ParsedTokenConfig)
setTokenVal imp.token is already set in the Vault constructor
This happens inside the New func call due to the way the client needs to be initialised with a mountpath and mountpath is part of the token so it is set then
func (*VaultStore) Token ¶
func (imp *VaultStore) Token() (string, error)
getTokenValue implements the underlying techonology token retrieval and returns a stringified version of the secret