config

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfYaml

type ConfYaml struct {
	Core    SectionCore    `yaml:"core"`
	API     SectionAPI     `yaml:"api"`
	Android SectionAndroid `yaml:"android"`
	Ios     SectionIos     `yaml:"ios"`
	Log     SectionLog     `yaml:"log"`
	Stat    SectionStat    `yaml:"stat"`
}

ConfYaml is config structure.

func BuildDefaultPushConf

func BuildDefaultPushConf() ConfYaml

BuildDefaultPushConf is default config setting.

func LoadConfYaml

func LoadConfYaml(confPath string) (ConfYaml, error)

LoadConfYaml provide load yml config.

type SectionAPI

type SectionAPI struct {
	PushURI    string `yaml:"push_uri"`
	StatGoURI  string `yaml:"stat_go_uri"`
	StatAppURI string `yaml:"stat_app_uri"`
	ConfigURI  string `yaml:"config_uri"`
	SysStatURI string `yaml:"sys_stat_uri"`
}

SectionAPI is sub seciont of config.

type SectionAndroid

type SectionAndroid struct {
	Enabled bool   `yaml:"enabled"`
	APIKey  string `yaml:"apikey"`
}

SectionAndroid is sub seciont of config.

type SectionBoltDB

type SectionBoltDB struct {
	Path   string `yaml:"path"`
	Bucket string `yaml:"bucket"`
}

SectionBoltDB is sub seciont of config.

type SectionBuntDB added in v1.6.2

type SectionBuntDB struct {
	Path string `yaml:"path"`
}

SectionBuntDB is sub seciont of config.

type SectionCore

type SectionCore struct {
	Port            string     `yaml:"port"`
	MaxNotification int64      `yaml:"max_notification"`
	WorkerNum       int64      `yaml:"worker_num"`
	QueueNum        int64      `yaml:"queue_num"`
	Mode            string     `yaml:"mode"`
	SSL             bool       `yaml:"ssl"`
	CertPath        string     `yaml:"cert_path"`
	KeyPath         string     `yaml:"key_path"`
	HTTPProxy       string     `yaml:"http_proxy"`
	PID             SectionPID `yaml:"pid"`
}

SectionCore is sub seciont of config.

type SectionIos

type SectionIos struct {
	Enabled    bool   `yaml:"enabled"`
	KeyPath    string `yaml:"key_path"`
	Password   string `yaml:"password"`
	Production bool   `yaml:"production"`
}

SectionIos is sub seciont of config.

type SectionLevelDB added in v1.6.3

type SectionLevelDB struct {
	Path string `yaml:"path"`
}

SectionLevelDB is sub seciont of config.

type SectionLog

type SectionLog struct {
	Format      string `yaml:"format"`
	AccessLog   string `yaml:"access_log"`
	AccessLevel string `yaml:"access_level"`
	ErrorLog    string `yaml:"error_log"`
	ErrorLevel  string `yaml:"error_level"`
	HideToken   bool   `yaml:"hide_token"`
}

SectionLog is sub seciont of config.

type SectionPID added in v1.6.3

type SectionPID struct {
	Enabled  bool   `yaml:"enabled"`
	Path     string `yaml:"path"`
	Override bool   `yaml:"override"`
}

SectionPID is sub seciont of config.

type SectionRedis

type SectionRedis struct {
	Addr     string `yaml:"addr"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
}

SectionRedis is sub seciont of config.

type SectionStat

type SectionStat struct {
	Engine  string         `yaml:"engine"`
	Redis   SectionRedis   `yaml:"redis"`
	BoltDB  SectionBoltDB  `yaml:"boltdb"`
	BuntDB  SectionBuntDB  `yaml:"buntdb"`
	LevelDB SectionLevelDB `yaml:"leveldb"`
}

SectionStat is sub seciont of config.

Jump to

Keyboard shortcuts

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