config

package
v0.0.0-...-7604275 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const EnvLocal = "local"
View Source
const EnvProduction = "production"
View Source
const EnvStage = "stage"
View Source
const EnvTest = "test"

Variables

View Source
var AppProvider = wire.NewSet(NewApp)
View Source
var EmailProvider = wire.NewSet(NewEmail)
View Source
var EtcdProvider = wire.NewSet(NewEtcd)
View Source
var GatewayProvider = wire.NewSet(NewGateway)
View Source
var HttpProvider = wire.NewSet(NewHttp)
View Source
var JaegerProvider = wire.NewSet(NewJaeger)
View Source
var JwtProvider = wire.NewSet(NewJwt)
View Source
var ManagerProvider = wire.NewSet(NewManager)
View Source
var MysqlProvider = wire.NewSet(NewMysql)
View Source
var PagerProvider = wire.NewSet(NewPager)
View Source
var PprofProvider = wire.NewSet(NewPprof)
View Source
var PsProvider = wire.NewSet(NewPs)
View Source
var PubSubProvider = wire.NewSet(NewPubSub)
View Source
var RedisProvider = wire.NewSet(NewRedis)
View Source
var RpcProvider = wire.NewSet(NewRpc)
View Source
var SmMsProvider = wire.NewSet(NewSmMs)
View Source
var WebsocketProvider = wire.NewSet(NewWebsocket)

Functions

This section is empty.

Types

type App

type App struct {
	Name string `yaml:"name"`
	Ver  string `yaml:"ver"`
	Env  string `yaml:"env"`
}

func NewApp

func NewApp(conf *Config) *App

type CmdParam

type CmdParam struct {
	RootPath   string
	ConfigFile string
}

func NewCmdParam

func NewCmdParam(rootPath string, configFile string) *CmdParam

type Config

type Config struct {
	App       App
	Http      Http
	Pprof     Pprof
	Websocket Websocket
	Rpc       Rpc
	Ps        Ps
	Mysql     Mysql
	Redis     Redis
	Jaeger    Jaeger
	Jwt       Jwt
	Pager     Pager
	Etcd      Etcd
	Smms      Smms
	Email     Email
	PubSub    PubSub
	Manager   Manager
	Gateway   Gateway
}

func GetConfigInstance

func GetConfigInstance(param CmdParam) *Config

type Email

type Email struct {
	Smtp     string `yaml:"smtp"`
	Port     uint64 `yaml:"port"`
	Ssl      bool   `yaml:"ssl"`
	Account  string `yaml:"account"`
	Password string `yaml:"password"`
}

func NewEmail

func NewEmail(conf *Config) *Email

type Etcd

type Etcd struct {
	Host    []string `yaml:"host"`
	Timeout uint64   `yaml:"timeout"`
}

func NewEtcd

func NewEtcd(conf *Config) *Etcd

type Gateway

type Gateway struct {
	Id []string `yaml:"id"`
}

func NewGateway

func NewGateway(conf *Config) *Gateway

type Http

type Http struct {
	Host string `yaml:"host"`
	Port uint   `yaml:"port"`
	Log  string `yaml:"log"`
}

func NewHttp

func NewHttp(conf *Config) *Http

type Jaeger

type Jaeger struct {
	Host string `yaml:"host"`
	Port uint   `yaml:"port"`
}

func NewJaeger

func NewJaeger(conf *Config) *Jaeger

type Jwt

type Jwt struct {
	Secret       string `yaml:"secret"`
	DefaultToken string `yaml:"default_token"`
}

func NewJwt

func NewJwt(conf *Config) *Jwt

type Manager

type Manager struct {
	Email map[string]string `yaml:"email"`
}

func NewManager

func NewManager(conf *Config) *Manager

type Mysql

type Mysql struct {
	Host     string `yaml:"host"`
	Port     uint   `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Charset  string `yaml:"charset"`
	Database string `yaml:"database"`
}

func NewMysql

func NewMysql(conf *Config) *Mysql

type Pager

type Pager struct {
	PageSize uint `yaml:"page_size"`
}

func NewPager

func NewPager(conf *Config) *Pager

type Pprof

type Pprof struct {
	Host string `yaml:"host"`
	Port uint   `yaml:"port"`
}

func NewPprof

func NewPprof(conf *Config) *Pprof

type Ps

type Ps struct {
	Host string `yaml:"host"`
	Port uint   `yaml:"port"`
}

func NewPs

func NewPs(conf *Config) *Ps

type PubSub

type PubSub struct {
	Brokers []string `yaml:"brokers"`
}

func NewPubSub

func NewPubSub(conf *Config) *PubSub

type Redis

type Redis struct {
	Host     string `yaml:"host"`
	Port     uint   `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	// contains filtered or unexported fields
}

func NewRedis

func NewRedis(conf *Config) *Redis

type Rpc

type Rpc struct {
	Host string `yaml:"host"`
	Port uint   `yaml:"port"`
	Ttl  int64  `yaml:"ttl"`
	Log  string `yaml:"log"`
}

func NewRpc

func NewRpc(conf *Config) *Rpc

type Smms

type Smms struct {
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

func NewSmMs

func NewSmMs(conf *Config) *Smms

type Websocket

type Websocket struct {
	Host string `yaml:"host"`
	Port uint   `yaml:"port"`
	Log  string `yaml:"log"`
}

func NewWebsocket

func NewWebsocket(conf *Config) *Websocket

Jump to

Keyboard shortcuts

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