config

package
v0.0.0-...-7becda7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "1.0.0"
)

Variables

View Source
var (
	ConfigFile string
)

Functions

func Parse

func Parse(cfg string) error

Types

type GlobalConfig

type GlobalConfig struct {
	Debug  bool          `json:"debug"`
	Http   *HttpConfig   `json:"http"`
	Sms    *SmsConfig    `json:"sms"`
	Smtp   *SmtpConfig   `json:"smtp"`
	Wechat *WechatConfig `json:"wechat"`
}

func Config

func Config() *GlobalConfig

type HttpConfig

type HttpConfig struct {
	Listen string `json:"listen"`
	Token  string `json:"token"`
}

type SmsConfig

type SmsConfig struct {
	Provider        string `json:"provider"`
	Appkey          string `json:"appkey"`
	Appsecret       string `json:"appsecret"`
	Smstemplatecode string `json:"smstemplatecode"`
	Smssignname     string `json:"smssignname"`
}

type SmtpConfig

type SmtpConfig struct {
	Addr     string `json:"addr"`
	Username string `json:"username"`
	Password string `json:"password"`
	From     string `json:"from"`
}

type WechatConfig

type WechatConfig struct {
	Appid      string `json:"appid"`
	Appsecret  string `json:"appsecret"`
	Templateid string `json:"templateid"`
}

Jump to

Keyboard shortcuts

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