config

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 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 SectionCore

type SectionCore struct {
	Port            string `yaml:"port"`
	MaxNotification int    `yaml:"max_notification"`
	WorkerNum       int    `yaml:"worker_num"`
	QueueNum        int    `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"`
}

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 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 SectionRedis

type SectionRedis struct {
	Addr     string `yaml:"addr"`
	Password string `yaml:"password"`
	DB       int64  `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"`
}

SectionStat is sub seciont of config.

Jump to

Keyboard shortcuts

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