Documentation ¶
Overview ¶
Getting the settings for the application
Index ¶
- Constants
- type ConfigAdapter
- func (f *ConfigAdapter) GetDatabaseConnectionString() string
- func (f *ConfigAdapter) GetFileStoragePath() string
- func (f *ConfigAdapter) GetKey() string
- func (f *ConfigAdapter) GetLogsLevel() string
- func (f *ConfigAdapter) GetRestore() bool
- func (f *ConfigAdapter) GetServerAddress() string
- func (f *ConfigAdapter) GetServerAddressWithScheme() string
- func (f *ConfigAdapter) GetStorageType() string
- func (f *ConfigAdapter) GetStoreInterval() time.Duration
- func (f *ConfigAdapter) UseCryptoKey() bool
Constants ¶
View Source
const ( Bd = "database" Disk = "disk" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigAdapter ¶
type ConfigAdapter struct { Restore bool `env:"RESTORE" json:"restore"` StoreInterval int `env:"STORE_INTERVAL" json:"store_interval"` HTTPAddress string `env:"ADDRESS" json:"address"` DatabaseConnectionString string `env:"DATABASE_DSN" json:"database_dsn"` FileStoragePath string `env:"STORE_PATH" json:"store_path"` CryptoKeyPath string `env:"CRYPTO_KEY" json:"crypto_key"` // contains filtered or unexported fields }
func New ¶
func New() (*ConfigAdapter, error)
func (*ConfigAdapter) GetDatabaseConnectionString ¶
func (f *ConfigAdapter) GetDatabaseConnectionString() string
func (*ConfigAdapter) GetFileStoragePath ¶
func (f *ConfigAdapter) GetFileStoragePath() string
func (*ConfigAdapter) GetKey ¶
func (f *ConfigAdapter) GetKey() string
func (*ConfigAdapter) GetLogsLevel ¶
func (f *ConfigAdapter) GetLogsLevel() string
func (*ConfigAdapter) GetRestore ¶
func (f *ConfigAdapter) GetRestore() bool
func (*ConfigAdapter) GetServerAddress ¶
func (f *ConfigAdapter) GetServerAddress() string
func (*ConfigAdapter) GetServerAddressWithScheme ¶
func (f *ConfigAdapter) GetServerAddressWithScheme() string
func (*ConfigAdapter) GetStorageType ¶
func (f *ConfigAdapter) GetStorageType() string
func (*ConfigAdapter) GetStoreInterval ¶
func (f *ConfigAdapter) GetStoreInterval() time.Duration
func (*ConfigAdapter) UseCryptoKey ¶
func (f *ConfigAdapter) UseCryptoKey() bool
Click to show internal directories.
Click to hide internal directories.