Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPathResolver ¶
func NewPathResolver() *defaultPathResolver
NewPathResolver creates a new instance of the default path resolver.
Types ¶
type ConfigSource ¶
ConfigSource configuring source interfaces.
type EnvVarSource ¶
type EnvVarSource struct {
VarName string
}
EnvVarSource read a configuration from an environment variable.
func (*EnvVarSource) Read ¶
func (e *EnvVarSource) Read() ([]byte, error)
type FileSystemSource ¶
type FileSystemSource struct {
FilePath string
}
FileSystemSource read a configuration from a file.
func (*FileSystemSource) Read ¶
func (f *FileSystemSource) Read() ([]byte, error)
type Loader ¶
type Loader struct {
PathResolver PathResolver
}
Loader is responsible for loading configuration files.
func NewLoader ¶
func NewLoader(pathResolver PathResolver) *Loader
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AddSource ¶
func (cm *Manager) AddSource(source ConfigSource)
type PathResolver ¶
type PathResolver interface { GetDefaultConfigPath() (string, error) GetProjectRoot() (string, error) }
PathResolver defines methods for resolving paths related to the application.
Click to show internal directories.
Click to hide internal directories.