conf

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: MIT Imports: 7 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 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)

Types

type Config

type Config struct {
	Log     LogConfig
	Include map[string]IncludeConfig
	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 ServerConfig

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

Jump to

Keyboard shortcuts

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