g

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "0.1.1"
)

Variables

This section is empty.

Functions

func Parse

func Parse(cfg string) error

Types

type GlobalConfig

type GlobalConfig struct {
	Debug  bool          `yaml:"debug"`
	Remain int           `yaml:"remain"` //
	Rpc    *RpcConfig    `yaml:"rpc"`
	Web    *WebConfig    `yaml:"web"`
	Worker *WorkerConfig `yaml:"worker"`
	Smtp   *SmtpConfig   `yaml:"smtp"`
}
var (
	Config *GlobalConfig
)

type HistoryData

type HistoryData struct {
	Timestamp int64   `json:"timestamp"`
	Value     float64 `json:"value"`
}

type Mail

type Mail struct {
	Tos     string `json:"tos"`
	Subject string `json:"subject"`
	Content string `json:"content"`
}

func (*Mail) String

func (this *Mail) String() string

type MysqlConfig

type MysqlConfig struct {
	Addr string `yaml:"addr"`
	Idle int    `yaml:"idle"`
	Max  int    `yaml:"max"`
}

type RpcConfig

type RpcConfig struct {
	Listen string `yaml:"listen"`
}

type Sms

type Sms struct {
	Tos     string `json:"tos"`
	Content string `json:"content"`
}

func (*Sms) String

func (this *Sms) String() string

type SmtpConfig

type SmtpConfig struct {
	Addr     string `yaml:"addr"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	From     string `yaml:"from"`
	Tls      bool   `yaml:"tls"`
}

type WebConfig

type WebConfig struct {
	Addrs    []string `yaml:"addrs"`
	Timeout  int      `yaml:"timeout"`
	Interval int      `yaml:"interval"`
}

type WorkerConfig

type WorkerConfig struct {
	Sms  int `yaml:"sms"`
	Mail int `yaml:"mail"`
}

Jump to

Keyboard shortcuts

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