conf

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBeforeStart

func CheckBeforeStart()

func CheckInputServerExit

func CheckInputServerExit(inputServer []string, nameList []string) bool

func GenerateConfig added in v0.4.4

func GenerateConfig()

func GetFullPath added in v0.4.3

func GetFullPath(path string) (fullPath string)

func GetNameList

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

func ParsePathArg added in v0.4.3

func ParsePathArg(arg string) (hostType string, path string, result bool)

func PathWalkDir added in v0.4.3

func PathWalkDir(dir string) (files []string, err error)

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
}

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"`
	Dir    string `toml:"dirpath"`
}

type ProxyConfig added in v0.4.4

type ProxyConfig struct {
	Addr string
	Port string
	User string
	Pass string
	Key  string
}

type ServerConfig

type ServerConfig struct {
	// Basic
	Addr string `toml:"addr"`
	Port string `toml:"port"`
	User string `toml:"user"`
	Pass string `toml:"pass"`
	Key  string `toml:"key"`

	// Local command
	BeforeCmd string `toml:"before_cmd"`
	AfterCmd  string `toml:"after_cmd"`

	// Proxy
	ProxyServer string `toml:"proxy_server"`
	Proxy       ProxyConfig

	Note string `toml:"note"`
}

type ServerConfigMaps added in v0.4.4

type ServerConfigMaps map[string]ServerConfig

Jump to

Keyboard shortcuts

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