Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigFilePath ¶
func GetConfigFilePath() string
GetConfigFilePath returns the absolute path of the config file based on the current directory.
func GetLogLevel ¶
GetLogLevel returns the slog log level based on a string representation of the log level. INFO is used as the default in case a level isn't given or is unexpected
func PathExists ¶
Types ¶
type APIConfig ¶
type APIConfig struct { Address string `mapstructure:"address"` Path string `mapstructure:"path"` Env string `mapstructure:"env"` }
APIConfig holds the API configuration values
type Config ¶
type Config struct { AudioDirectory string API APIConfig `mapstructure:"api"` Log Log `mapstructure:"log"` Database DatabaseConfig `mapstructure:"database"` }
Config holds the configuration values
func LoadConfig ¶
LoadConfig loads the configuration values from the specified file.
type Credentials ¶
type Credentials struct { GetFromEnv bool `mapstructure:"envvar"` UserVar string `mapstructure:"userVar"` PasswordVar string `mapstructure:"passwordVar"` User string Password []byte }
Credentials stores persistence layer-related credentials
func (*Credentials) GetCredentialsFromEnv ¶
func (c *Credentials) GetCredentialsFromEnv()
GetCredentialsFromEnv will set the user and password values to envvar values
type DatabaseConfig ¶
type DatabaseConfig struct { FileInfoConfig FileInformationStoreConfig `mapstructure:"file"` S3Config S3Config `mapstructure:"s3"` }
DatabaseConfig holds the database configuration values
type FileInformationStoreConfig ¶
type FileInformationStoreConfig struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` Name string `mapstructure:"name"` SSL SSL `mapstructure:"ssl"` Credentials Credentials `mapstructure:"credentials"` }
type Log ¶
type Log struct {
Level string `mapstructure:"level"`
}
Log holds the log configuration values
Click to show internal directories.
Click to hide internal directories.