g

package
v0.0.0-...-65ed3fc Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2016 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	VERSION = "0.0.1"
)

Variables

View Source
var (
	ConfigFile string
)

Functions

func ParseConfig

func ParseConfig(cfg string)

Types

type ApiConfig

type ApiConfig struct {
	Sms        string `json:"sms"`
	Mail       string `json:"mail"`
	QQ         string `json:"qq"`
	Serverchan string `json:"serverchan"`
}

type GlobalConfig

type GlobalConfig struct {
	Debug  bool          `json:"debug"`
	Http   *HttpConfig   `json:"http"`
	Redis  *RedisConfig  `json:"redis"`
	Queue  *QueueConfig  `json:"queue"`
	Worker *WorkerConfig `json:"worker"`
	Api    *ApiConfig    `json:"api"`
}

func Config

func Config() *GlobalConfig

type HttpConfig

type HttpConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
}

type QueueConfig

type QueueConfig struct {
	Sms        string `json:"sms"`
	Mail       string `json:"mail"`
	QQ         string `json:"qq"`
	Serverchan string `json:"serverchan"`
}

type RedisConfig

type RedisConfig struct {
	Addr    string `json:"addr"`
	MaxIdle int    `json:"maxIdle"`
}

type WorkerConfig

type WorkerConfig struct {
	Sms        int `json:"sms"`
	Mail       int `json:"mail"`
	QQ         int `json:"qq"`
	Serverchan int `json:"serverchan"`
}

Jump to

Keyboard shortcuts

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