config

package
v0.0.0-...-165a0e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Getting the settings for the application

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL