config

package
v0.0.0-...-1fc07e7 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//APP NAME
	AppName = "Registry"
	//Usage
	Usage = "Registry Usage"
	//Vresion Num
	Version = "0.0.1"
	//Author Nmae
	Author = "LoadStack Developer Group"
	//Email Address
	Email = "oiooj@qq.com"
)

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(path string) error

Types

type CommonConfig

type CommonConfig struct {
	PersistReport int    `toml:"persistreport"`
	PID           string `toml:"pid"`
}

type Config

type Config struct {
	Admins     []string     `toml:"admins"`
	RouterAddr string       `toml:"routeraddr"`
	CommonConf CommonConfig `toml:"common"`
	HTTPConf   HTTPConfig   `toml:"http"`
	DataConf   DataConfig   `toml:"data"`
	LDAPConf   LDAPConfig   `toml:"ldap"`
	LogConf    LogConfig    `toml:"log"`
	PluginConf PluginConfig `toml:"plugin"`
	EventConf  EventConfig  `toml:"event"`
}
var (

	// global config
	C Config
)

func GetConfig

func GetConfig() Config

type DataConfig

type DataConfig struct {
	Dir           string `toml:"dir"`
	ClusterBind   string `toml:"clusterbind"`
	ClusterLeader string `toml:"clusterleader"`
}

type EventConfig

type EventConfig struct {
	ClearURL string `toml:"clearURL"`
}

type HTTPConfig

type HTTPConfig struct {
	Bind  string `toml:"bind"`
	Https bool   `toml:"https"`
	Cert  string `toml:"cert"`
	Key   string `toml:"key"`
}

type LDAPConfig

type LDAPConfig struct {
	Enable   bool   `toml:"enable"`
	Server   string `toml:"server"`
	UID      string `toml:"uid"`
	Binddn   string `toml:"binddn"`
	Password string `toml:"password"`
	Base     string `toml:"base"`
}

LDAPConfig is LDAP config struct

type LogConfig

type LogConfig struct {
	Dir           string `toml:"logdir"`
	Level         string `toml:"loglevel"`
	Logrotatenum  int    `toml:"logrotatenum"`
	Logrotatesize uint64 `toml:"logrotatesize"`
}

LogConfig is log config struct

type PluginConfig

type PluginConfig struct {
	AlarmFile    string `toml:"alarmfile"`
	Branch       string `toml:"branch"`
	GitlabDomain string `toml:"gitlab"`
	Token        string `toml:"token"`
	Group        string `toml:"group"`
}

Jump to

Keyboard shortcuts

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