config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

View Source
const (
	BASD_HomeDir      = ".basd"
	BASD_CFG_FileName = "basd.json"
)

Variables

This section is empty.

Functions

func GetBASDCFGFile

func GetBASDCFGFile() string

func GetBASDHomeDir

func GetBASDHomeDir() string

func IsInitialized

func IsInitialized() bool

Types

type BASDConfig

type BASDConfig struct {
	UpdPort       int      `json:"updport"`
	TcpPort       int      `json:"tcpport"`
	RopstenNAP    string   `json:"ropstennap"`
	TokenAddr     string   `json:"tokenaddr"`
	MgrAddr       string   `json:"mgraddr"`
	CmdListenPort string   `json:"cmdlistenport"`
	ResolvDns     []string `json:"resolvdns"`
	DohServerPort int      `json:"dohserverport"`
	CertFile      string   `json:"certfile"`
	KeyFile       string   `json:"keyfile"`
	DnsPath       string   `json:"dnspath"`
	TimeOut       int      `json:"timeout"`
	TryTimes      int      `json:"trytimes"`
}

func GetBasDCfg

func GetBasDCfg() *BASDConfig

func LoadFromCfgFile

func LoadFromCfgFile(file string) *BASDConfig

func LoadFromCmd

func LoadFromCmd(initfromcmd func(cmdbc *BASDConfig) *BASDConfig) *BASDConfig

func PreLoad

func PreLoad() *BASDConfig

func (*BASDConfig) GetCertFile added in v1.1.1

func (bc *BASDConfig) GetCertFile() string

func (*BASDConfig) GetKeyFile added in v1.1.1

func (bc *BASDConfig) GetKeyFile() string

func (*BASDConfig) InitCfg

func (bc *BASDConfig) InitCfg() *BASDConfig

func (*BASDConfig) Load

func (bc *BASDConfig) Load() *BASDConfig

func (*BASDConfig) Save

func (bc *BASDConfig) Save()

Jump to

Keyboard shortcuts

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