config

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseENV

func ParseENV(cfg interface{}) error

Types

type ExtendedServerConfig

type ExtendedServerConfig struct {
	HttpServerConfig
}

func GetExtendedConfig

func GetExtendedConfig() (*ExtendedServerConfig, error)

type FilesPathConfig

type FilesPathConfig struct {
	AdsDatabasePath string `env:"ADS_DATABASE_PATH" env-default:"./ads.json"`
}

type HttpServerConfig

type HttpServerConfig struct {
	ListenNetwork string `env:"LISTEN_NETWORK" env-default:"tcp4"`
	ListenAddr    string `env:"LISTEN_ADDR" env-default:":8080"`
	FilesPathConfig
}

func GetHTTPServerConfig

func GetHTTPServerConfig() (*HttpServerConfig, error)

func (*HttpServerConfig) GetAdsDatabasePath

func (c *HttpServerConfig) GetAdsDatabasePath() string

func (*HttpServerConfig) GetListenAddr

func (c *HttpServerConfig) GetListenAddr() string

func (*HttpServerConfig) GetListenNetwork

func (c *HttpServerConfig) GetListenNetwork() string

Jump to

Keyboard shortcuts

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