conf

package
v0.0.0-...-e5b43e4 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

This section is empty.

Variables

View Source
var Cache = cache.New(5*time.Minute, 5*time.Minute)

Cache 全局缓存

Functions

func Redis

func Redis() *redis.Options

Redis 配置

Types

type BaiduFace

type BaiduFace struct {
	Name      string `json:"name"`
	AppID     string `json:"app_id"`
	Appkey    string `json:"app_key"`
	AppSecret string `json:"app_secret"`
}

BaiduFace 百度人脸

type Conf

type Conf struct {
	Host      string    `json:"host"`
	Port      string    `json:"port"`
	IsSsl     bool      `json:"is_ssl,omitempty"`
	SslKey    string    `json:"ssl_key,omitempty"`
	SslPem    string    `json:"ssl_pem,omitempty"`
	Token     string    `json:"token,omitempty"`
	WeChat    WeChat    `json:"wechat,omitempty"`
	Mysql     Mysql     `json:"mysql,omitempty"`
	BaiduFace BaiduFace `json:"baidu_face,omitempty"`
	YP        YP        `json:"yp,omitempty"`
}

Conf struct

func GetConf

func GetConf() *Conf

GetConf 获取配置信息

type JSONStruct

type JSONStruct struct {
}

JSONStruct ...

func (*JSONStruct) Load

func (jst *JSONStruct) Load(filename string, v interface{})

Load ...

type Mysql

type Mysql struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Name     string `json:"name"`
	User     string `json:"user"`
	Password string `json:"password"`
}

Mysql struct

type WeChat

type WeChat struct {
	AppID     string `json:"app_id"`
	AppSecret string `json:"app_secret"`
}

WeChat 微信配置

type YP

type YP struct {
	APIKEY string `json:"api_key"`
}

YP message

Jump to

Keyboard shortcuts

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