config

package
v1.5.26 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAddress

type IAddress interface {
	GetInterface() string
	GetIncoming() string
	GetPPROF() string
}

type IConfig

type IConfig interface {
	GetSettings() IConfigSettings
	GetAddress() IAddress
	GetLogging() logger.ILogging
	GetConnection() string
	GetStorageKey() string
	GetLanguage() utils.ILanguage
	GetSecretKeys() map[string]string
}

func BuildConfig added in v1.5.6

func BuildConfig(pFilepath string, pCfg *SConfig) (IConfig, error)

func InitConfig added in v1.5.8

func InitConfig(cfgPath string, initCfg *SConfig) (IConfig, error)

func LoadConfig

func LoadConfig(pFilepath string) (IConfig, error)

type IConfigSettings added in v1.5.18

type IConfigSettings interface {
	GetMessagesCapacity() uint64
	GetWorkSizeBits() uint64
}

type IEditor added in v1.5.15

type IEditor interface {
	UpdateLanguage(utils.ILanguage) error
	UpdateSecretKeys(map[string]string) error
}

type IWrapper added in v1.5.15

type IWrapper interface {
	GetConfig() IConfig
	GetEditor() IEditor
}

func NewWrapper added in v1.5.15

func NewWrapper(pCfg IConfig) IWrapper

type SAddress

type SAddress struct {
	FInterface string `yaml:"interface"`
	FIncoming  string `yaml:"incoming"`
	FPPROF     string `yaml:"pprof,omitempty"`
}

func (*SAddress) GetIncoming added in v1.5.6

func (p *SAddress) GetIncoming() string

func (*SAddress) GetInterface added in v1.5.6

func (p *SAddress) GetInterface() string

func (*SAddress) GetPPROF added in v1.5.19

func (p *SAddress) GetPPROF() string

type SConfig

type SConfig struct {
	FSettings *SConfigSettings `yaml:"settings"`

	FLogging    []string          `yaml:"logging,omitempty"`
	FLanguage   string            `yaml:"language,omitempty"`
	FAddress    *SAddress         `yaml:"address"`
	FConnection string            `yaml:"connection"`
	FStorageKey string            `yaml:"storage_key,omitempty"`
	FSecretKeys map[string]string `yaml:"secret_keys,omitempty"`
	// contains filtered or unexported fields
}

func (*SConfig) GetAddress added in v1.5.6

func (p *SConfig) GetAddress() IAddress

func (*SConfig) GetConnection added in v1.5.6

func (p *SConfig) GetConnection() string

func (*SConfig) GetLanguage added in v1.5.15

func (p *SConfig) GetLanguage() utils.ILanguage

func (*SConfig) GetLogging added in v1.5.6

func (p *SConfig) GetLogging() logger.ILogging

func (*SConfig) GetSecretKeys added in v1.5.24

func (p *SConfig) GetSecretKeys() map[string]string

func (*SConfig) GetSettings added in v1.5.18

func (p *SConfig) GetSettings() IConfigSettings

func (*SConfig) GetStorageKey added in v1.5.6

func (p *SConfig) GetStorageKey() string

type SConfigSettings added in v1.5.18

type SConfigSettings struct {
	FMessagesCapacity uint64 `yaml:"messages_capacity"`
	FWorkSizeBits     uint64 `yaml:"work_size_bits,omitempty"`
}

func (*SConfigSettings) GetMessagesCapacity added in v1.5.18

func (p *SConfigSettings) GetMessagesCapacity() uint64

func (*SConfigSettings) GetWorkSizeBits added in v1.5.20

func (p *SConfigSettings) GetWorkSizeBits() uint64

Jump to

Keyboard shortcuts

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