config

package
v0.0.0-...-36cc0b3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIPConfigProvider

type APIPConfigProvider interface {
	GetAPIAddress() string
	GetLogHttpRequests() bool
}

type Config

type Config struct {
	EnvName Env    `yaml:"envName"`
	Debug   bool   `yaml:"debug"`
	Logger  logger `yaml:"logger"`

	API api `yaml:"api"`
	DB  db  `yaml:"db"`
	// contains filtered or unexported fields
}

func New

func New(arguments argumentsresolver.ArgumentsInterface) (c *Config, err error)

func (*Config) DebugEnabled

func (c *Config) DebugEnabled() bool

func (*Config) GetAPIAddress

func (c *Config) GetAPIAddress() string

func (Config) GetDBDSN

func (c Config) GetDBDSN() string

func (Config) GetDBMaxIdleCons

func (c Config) GetDBMaxIdleCons() int

func (Config) GetDBMaxOpenCons

func (c Config) GetDBMaxOpenCons() int

func (Config) GetDBMigrations

func (c Config) GetDBMigrations() string

func (*Config) GetEnvName

func (c *Config) GetEnvName() Env

func (*Config) GetLogHttpRequests

func (c *Config) GetLogHttpRequests() bool

func (*Config) GetLoggerFormat

func (c *Config) GetLoggerFormat() string

func (*Config) GetLoggerLevel

func (c *Config) GetLoggerLevel() string

func (*Config) OverrideAPIConfig

func (c *Config) OverrideAPIConfig()

func (*Config) OverrideDBConfig

func (c *Config) OverrideDBConfig()

type DBConfigProvider

type DBConfigProvider interface {
	GetDBDSN() string
	GetDBMigrations() string
	GetDBMaxIdleCons() int
	GetDBMaxOpenCons() int
}

type Env

type Env string
const (
	EnvLocal Env = "local"
	EnvDev   Env = "develop"
	EnvStage Env = "staging"
	EnvProd  Env = "production"
)

func (Env) String

func (e Env) String() string

type GeneralConfigProvider

type GeneralConfigProvider interface {
	GetEnvName() Env
	DebugEnabled() bool
}

type LoggerConfigProvider

type LoggerConfigProvider interface {
	GetLoggerFormat() string
	GetLoggerLevel() string
}

Jump to

Keyboard shortcuts

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