Documentation ¶
Index ¶
- Constants
- func AZAppConfigFetchKeyVaultRefUri(value string) (string, error)
- func AZParseSecretURI(secretURI string) (string, string, error)
- func SlogLevel(level string) slog.Level
- type AZAppConfigLoader
- func (l *AZAppConfigLoader) AZAppConfigListSettings() (map[string]string, error)
- func (l *AZAppConfigLoader) AZAppConfigReadSetting(value string, contentType string) (string, error)
- func (l *AZAppConfigLoader) AZReadSecret(vaultURI string, secret string) (string, error)
- func (l *AZAppConfigLoader) Load(m Map) Map
- type KeyVaultRef
- type Loader
- type Map
- func (c Map) Add(val interface{}, key ...string)
- func (c Map) Fetch(key ...string) (interface{}, bool)
- func (c Map) FetchBoolOrElse(val bool, key ...string) bool
- func (c Map) FetchBoolP(key ...string) bool
- func (c Map) FetchIntOrElse(val int, key ...string) int
- func (c Map) FetchIntP(key ...string) int
- func (c Map) FetchP(key ...string) interface{}
- func (c Map) FetchStringOrElse(val string, key ...string) string
- func (c Map) FetchStringP(key ...string) string
- func (c Map) FetchStringSliceP(key ...string) []string
- func (c Map) FetchSubMapP(key ...string) Map
- func (c Map) Interpolate(verbose bool) Map
- type YamlLoader
Constants ¶
View Source
const ( DEV = "dev" STAGE = "stage" PROD = "prod" )
Variables ¶
This section is empty.
Functions ¶
func AZParseSecretURI ¶
AZParseSecretURI given a secretURI returns its vaultURI (string) and secret name (string) also an error
Types ¶
type AZAppConfigLoader ¶
type AZAppConfigLoader struct {
// contains filtered or unexported fields
}
func NewAZAppConfigLoader ¶
func NewAZAppConfigLoader(keyFilter string, labelFilter string, conn string, cred *azidentity.DefaultAzureCredential) *AZAppConfigLoader
func (*AZAppConfigLoader) AZAppConfigListSettings ¶
func (l *AZAppConfigLoader) AZAppConfigListSettings() (map[string]string, error)
func (*AZAppConfigLoader) AZAppConfigReadSetting ¶
func (l *AZAppConfigLoader) AZAppConfigReadSetting(value string, contentType string) (string, error)
func (*AZAppConfigLoader) AZReadSecret ¶
func (l *AZAppConfigLoader) AZReadSecret(vaultURI string, secret string) (string, error)
AZReadSecret reads an Azure Key vault secret value given the vaultURI and the secret name.
func (*AZAppConfigLoader) Load ¶
func (l *AZAppConfigLoader) Load(m Map) Map
type KeyVaultRef ¶
type KeyVaultRef struct {
Uri string `json:"uri"`
}
type Map ¶
type Map map[string]interface{}
func (Map) FetchBoolP ¶
func (Map) FetchStringP ¶
func (Map) FetchStringSliceP ¶ added in v0.3.6
func (Map) FetchSubMapP ¶
func (Map) Interpolate ¶
type YamlLoader ¶
type YamlLoader struct {
// contains filtered or unexported fields
}
func NewYamlLoader ¶
func NewYamlLoader(filename string) *YamlLoader
func (*YamlLoader) Load ¶
func (y *YamlLoader) Load(m Map) Map
Click to show internal directories.
Click to hide internal directories.