conf

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2018 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenConf added in v0.5.0

func GenConf()

func GetNameList

func GetNameList(listConf Config) (nameList []string)

func ReadSshConfig added in v0.4.4

func ReadSshConfig() (cfg *ssh_config.Config, err error)

Types

type Config

type Config struct {
	Log     LogConfig
	Include map[string]IncludeConfig
	Common  ServerConfig
	Server  map[string]ServerConfig
	Proxy   map[string]ProxyConfig
}

func ReadConf

func ReadConf(confPath string) (checkConf Config)

type IncludeConfig

type IncludeConfig struct {
	Path string `toml:"path"`
}

type LogConfig

type LogConfig struct {
	Enable    bool   `toml:"enable"`
	Timestamp bool   `toml:"timestamp"`
	Dir       string `toml:"dirpath"`
}

type ProxyConfig added in v0.4.4

type ProxyConfig struct {
	Addr string `toml:"addr"`
	Port string `toml:"port"`
	User string `toml:"user"`
	Pass string `toml:"pass"`
	Note string `toml:"note"`
}

type ServerConfig

type ServerConfig struct {
	Addr             string   `toml:"addr"`
	Port             string   `toml:"port"`
	User             string   `toml:"user"`
	Pass             string   `toml:"pass"`
	Key              string   `toml:"key"`
	KeyPass          string   `toml:"keypass"`
	PreCmd           string   `toml:"pre_cmd"`
	PostCmd          string   `toml:"post_cmd"`
	ProxyType        string   `toml:"proxy_type"`
	Proxy            string   `toml:"proxy"`
	LocalRcUse       string   `toml:"local_rc"` // yes|no
	LocalRcPath      []string `toml:"local_rc_file"`
	LocalRcDecodeCmd string   `toml:"local_rc_decode_cmd"`
	Note             string   `toml:"note"`
}

Jump to

Keyboard shortcuts

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