config

package
v0.0.0-...-64eff32 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: GPL-2.0 Imports: 7 Imported by: 22

Documentation

Index

Constants

View Source
const (
	BMS_HomeDir      = ".bms"
	BMS_CFG_FileName = "bms.json"
)

Variables

This section is empty.

Functions

func GetBMSCFGFile

func GetBMSCFGFile() string

func GetBMSHomeDir

func GetBMSHomeDir() string

func IsInitialized

func IsInitialized() bool

Types

type BMSConfig

type BMSConfig struct {
	MgtHttpPort   int                `json:"mgthttpport"`
	KeyPath       string             `json:"keypath"`
	CmdListenPort string             `json:"cmdlistenport"`
	PrivKey       ed25519.PrivateKey `json:"-"`
	PubKey        ed25519.PublicKey  `json:"-"`
	RemoteServer  string             `json:"remoteserver"`
	PKStorePath   string             `json:"publickeypath"`
	SSListenPort  int                `json:"sslistenport"`

	DbPath          string `json:"dbpath"`
	BMailMetaDb     string `json:"bmailmetadb"`
	BMServerMetaDb  string `json:"bmservermetadb"`
	BMTransferDb    string `json:"bmtransferdb"`
	BMBlackListdb   string `json:"bmblacklist"`
	BMAttachDb      string `json:"bmattachdb"`
	BMSendMailDb    string `json:"bmsendmaildb"`
	BMMailContentDb string `json:"bmmailcontentdb"`
	BMPullMailDb    string `json:"bmpullmaildb"`

	FileStorePath string `json:"filestorepath"`
}

func GetBMSCfg

func GetBMSCfg() *BMSConfig

func LoadFromCfgFile

func LoadFromCfgFile(file string) *BMSConfig

func LoadFromCmd

func LoadFromCmd(initfromcmd func(cmdbc *BMSConfig) *BMSConfig) *BMSConfig

func PreLoad

func PreLoad() *BMSConfig

func (*BMSConfig) GetAttachmentSavePath

func (bc *BMSConfig) GetAttachmentSavePath() string

func (*BMSConfig) GetBMMLSavePath

func (bc *BMSConfig) GetBMMLSavePath() string

func (*BMSConfig) GetBMMSavePath

func (bc *BMSConfig) GetBMMSavePath() string

func (*BMSConfig) GetBMSMSavePath

func (bc *BMSConfig) GetBMSMSavePath() string

func (*BMSConfig) GetBMTransferSavePath

func (bc *BMSConfig) GetBMTransferSavePath() string

func (*BMSConfig) GetDbPath

func (bc *BMSConfig) GetDbPath() string

func (*BMSConfig) GetKeyPath

func (bc *BMSConfig) GetKeyPath() string

func (*BMSConfig) GetMailContentDBPath

func (bc *BMSConfig) GetMailContentDBPath() string

func (*BMSConfig) GetMailStorePath

func (bc *BMSConfig) GetMailStorePath() string

func (*BMSConfig) GetPKPath

func (bc *BMSConfig) GetPKPath() string

func (*BMSConfig) GetPullMailDbPath

func (bc *BMSConfig) GetPullMailDbPath() string

func (*BMSConfig) GetSendMailDBPath

func (bc *BMSConfig) GetSendMailDBPath() string

func (*BMSConfig) InitCfg

func (bc *BMSConfig) InitCfg() *BMSConfig

func (*BMSConfig) Load

func (bc *BMSConfig) Load() *BMSConfig

func (*BMSConfig) Save

func (bc *BMSConfig) Save()

Jump to

Keyboard shortcuts

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