Documentation ¶
Index ¶
- func K8sSecretParser() func(cfg interface{}) error
- func MustGetConfig[T any](configParser ...func(cfg interface{}) error) *T
- func ParseENV(cfg interface{}) error
- func ParseJsonFromFile(cfg interface{}, filePath string) error
- func ParseXMLFromFile(cfg interface{}, filePath string) error
- func ParseYamlFromFile(cfg interface{}, filePath string) error
- func YamlParser(yamlPath string) func(cfg interface{}) error
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
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 ¶
ParseJsonFromFile parse json type config from local file tag: json
func ParseXMLFromFile ¶
ParseXMLFromFile parse xml type config from local file tag: xml
func ParseYamlFromFile ¶
ParseYamlFromFile parse yaml type config from local file tag: yaml
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.