config

package
v1.5.18 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 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
}

type IConfig

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

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
}

type IEditor added in v1.5.15

type IEditor interface {
	UpdateBackupConnections([]string) error
	UpdateLanguage(utils.ILanguage) 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 `json:"interface"`
	FIncoming  string `json:"incoming"`
}

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

type SConfig

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

	FLogging           []string  `json:"logging,omitempty"`
	FLanguage          string    `json:"language,omitempty"`
	FAddress           *SAddress `json:"address"`
	FConnection        string    `json:"connection"`
	FStorageKey        string    `json:"storage_key,omitempty"`
	FBackupConnections []string  `json:"backup_connections,omitempty"`
	// contains filtered or unexported fields
}

func (*SConfig) GetAddress added in v1.5.6

func (p *SConfig) GetAddress() IAddress

func (*SConfig) GetBackupConnections added in v1.5.15

func (p *SConfig) GetBackupConnections() []string

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) 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 `json:"messages_capacity"`
}

func (*SConfigSettings) GetMessagesCapacity added in v1.5.18

func (p *SConfigSettings) GetMessagesCapacity() uint64

Jump to

Keyboard shortcuts

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