Documentation
¶
Index ¶
- Constants
- func DumpToFile(filename string, cfg Config) error
- func FromYAML(content []byte, cfg Config) error
- func Load(file string, cfg Config) error
- func PrintDeprecations(deprecations []Deprecation, cfg Config, out io.Writer)
- func ToJson(cfg Config) ([]byte, error)
- func ToYAML(cfg Config) ([]byte, error)
- type Config
- type Deprecation
Constants ¶
View Source
const SanitizedValue = "*****"
Variables ¶
This section is empty.
Functions ¶
func DumpToFile ¶ added in v1.8.1
func DumpToFile(filename string, cfg Config) error
func PrintDeprecations ¶ added in v1.8.1
func PrintDeprecations(deprecations []Deprecation, cfg Config, out io.Writer)
func ToJson ¶
func ToJson(cfg Config) ([]byte, error)
ToJson converts through YAML, because we only have `yaml` tags on Config. This JSON cannot be parsed by json.Unmarshal because durations are marshaled by yaml to pretty form like "1s". To change it to simple json.Marshal we need to add `json` tag everywhere.
Types ¶
type Config ¶
type Config interface {
Sanitize()
Validate() error
}
func ConfigForDisplay ¶
func ConfigForDisplay(cfg Config) (Config, error)
type Deprecation ¶ added in v1.8.1
type Deprecation struct {
Env string
EnvMsg string
ConfigValuePath func(cfg Config) (string, bool)
ConfigValueMsg string
}
Click to show internal directories.
Click to hide internal directories.