Documentation ¶
Index ¶
Constants ¶
const ( ErrIsDirectory strErr = "file is a directory" ErrUnknownFileType strErr = "unknown file type" )
Variables ¶
var (
Acronims = []string{"API", "SMTP", "PostgreSQL", "SQL", "JSON", "YAML", "DB", "AI", "CRM", "HTTPS", "HTTP", "FTP", "SSH"}
)
Functions ¶
This section is empty.
Types ¶
type DirSource ¶
type DirSource struct {
Path string
}
DirSource loads configuration from kubernetes ConfigMap and Secret mountPath directory
type EDNSource ¶ added in v1.0.4
type EDNSource struct {
Path string
}
EDNSource loads configuration from the given .edn file.
type EnvFileSource ¶
EnvFileSource loads configuration from the given .env file.
func (EnvFileSource) Load ¶
func (s EnvFileSource) Load(structPtr interface{}) error
Load ENV configuration file
type EnvSource ¶
type EnvSource struct {
Prefix string
}
EnvSource loads configuration from environment variables
type FileSource ¶
type FileSource struct {
Path string
}
FileSource satisifies the loader interface. It loads the configuration from the given file.
func (FileSource) Load ¶
func (s FileSource) Load(structPtr interface{}) error
Load config from file
type FlagsSource ¶
type FlagsSource struct { }
FlagsSource loads configuration from flags
func (FlagsSource) Load ¶
func (s FlagsSource) Load(structPtr interface{}) error
Load configuration from the command-line.
type JSONSource ¶
type JSONSource struct {
Path string
}
FileSource loads configuration from the given .json file.
func (JSONSource) Load ¶
func (s JSONSource) Load(structPtr interface{}) error
Load JSON configuration file
type TOMLSource ¶
type TOMLSource struct {
Path string
}
TOMLSource loads configuration from the given .toml file.
func (TOMLSource) Load ¶
func (s TOMLSource) Load(structPtr interface{}) error
Load TOML configuration file
type YAMLSource ¶
type YAMLSource struct {
Path string
}
YAMLSource loads configuration from the given .yaml or .yml file.
func (YAMLSource) Load ¶
func (s YAMLSource) Load(structPtr interface{}) error
Load YAML configuration file