config

package
v0.0.0-...-5591726 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddr

func GetAddr() string

func GetEnv

func GetEnv() string

func GetOp

func GetOp() *qgrpc.Config

func Init

func Init(file string) error

Types

type Config

type Config struct {
	Port int           `toml:"port"`
	Env  string        `toml:"env"`
	Op   *qgrpc.Config `toml:"op"`

	LogType  string                 `toml:"logtype"`
	LogLevel types.LEVEL            `toml:"loglevel"`
	Log      map[string]interface{} `toml:"log"`

	// id的配置
	IdKey string `toml:"idkey"`
	// jwt的配置
	Jwt   *qjwt.Config `toml:"jwt"`
	QqApp *QqConfig    `toml:"qqapp"`
	WxApp *WxConfig    `toml:"wxapp"`
}

func GetConfig

func GetConfig() *Config

type IdConf

type IdConf struct {
	Key    string `toml:"key"`
	Offset int64  `toml:"key"`
	Size   int32  `toml:"size"`
}

type QqConfig

type QqConfig struct {
	AppId  string `toml:"appid"`
	Secret string `toml:"secret"`
}

type WxConfig

type WxConfig struct {
	AppId  string `toml:"appid"`
	Secret string `toml:"secret"`
}

Jump to

Keyboard shortcuts

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