Documentation
¶
Overview ¶
Package file allows to fetch secrets from JSON and YAML files
Package file allows to fetch secrets from files
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONBackend ¶
type JSONBackend struct {
Config JSONBackendConfig
Secret map[string]string
}
JSONBackend represents backend for JSON file
func NewJSONBackend ¶
func NewJSONBackend(bc map[string]interface{}) ( *JSONBackend, error)
NewJSONBackend returns a new JSON backend
func (*JSONBackend) GetSecretOutput ¶
GetSecretOutput returns a the value for a specific secret
type JSONBackendConfig ¶
type JSONBackendConfig struct {
FilePath string `mapstructure:"file_path"`
MaxFileReadSize int64 `mapstructure:"max_file_read_size"`
}
JSONBackendConfig is the configuration for a JSON backend
type TextFileBackend ¶ added in v1.5.0
type TextFileBackend struct {
Config TextFileBackendConfig
}
TextFileBackend represents backend for individual secret files
func NewTextFileBackend ¶ added in v1.5.0
func NewTextFileBackend(bc map[string]interface{}) (*TextFileBackend, error)
NewTextFileBackend returns a new file backend
func (*TextFileBackend) GetSecretOutput ¶ added in v1.5.0
GetSecretOutput retrieves a secret from a file
type TextFileBackendConfig ¶ added in v1.5.0
type TextFileBackendConfig struct {
SecretsPath string `mapstructure:"secrets_path"`
MaxFileReadSize int64 `mapstructure:"max_file_read_size"`
}
TextFileBackendConfig is the configuration for a file backend
type YamlBackend ¶
type YamlBackend struct {
Config YamlBackendConfig
Secret map[string]string
}
YamlBackend represents backend for YAML file
func NewYAMLBackend ¶
func NewYAMLBackend(bc map[string]interface{}) ( *YamlBackend, error)
NewYAMLBackend returns a new YAML backend
func (*YamlBackend) GetSecretOutput ¶
GetSecretOutput returns a the value for a specific secret
type YamlBackendConfig ¶
type YamlBackendConfig struct {
FilePath string `mapstructure:"file_path"`
MaxFileReadSize int64 `mapstructure:"max_file_read_size"`
}
YamlBackendConfig is the configuration for a YAML backend