dconfig

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func K8sSecretParser added in v0.9.0

func K8sSecretParser() func(cfg interface{}) error

K8sSecretParser k8s secret parser, the secret store in the file preset by tag,like: `secret:"/xxx/xxx/xxx` tag: secret

func MustGetConfig added in v0.9.0

func MustGetConfig[T any](configParser ...func(cfg interface{}) error) *T

MustGetConfig parse config from config parser, if get error, it's panic.

func ParseENV

func ParseENV(cfg interface{}) error

ParseENV parse config from system environment variables tag: env

func ParseJsonFromFile

func ParseJsonFromFile(cfg interface{}, filePath string) error

ParseJsonFromFile parse json type config from local file tag: json

func ParseXMLFromFile

func ParseXMLFromFile(cfg interface{}, filePath string) error

ParseXMLFromFile parse xml type config from local file tag: xml

func ParseYamlFromFile

func ParseYamlFromFile(cfg interface{}, filePath string) error

ParseYamlFromFile parse yaml type config from local file tag: yaml

func YamlParser added in v0.9.0

func YamlParser(yamlPath string) func(cfg interface{}) error

YamlParser yaml type config parser tag: yaml

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL