config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Local      Mode `mapstructure:"local" json:"local" yaml:"local"`                // Local 本地
	Production Mode `mapstructure:"production" json:"production" yaml:"production"` // Production 生产
	K8s        Mode `mapstructure:"k8s" json:"k8s" yaml:"k8s"`                      // K8s 生产
}

Config 配置

func (Config) Get

func (cfg Config) Get(mode string) Mode

type Mode

type Mode struct {
	Mode               string                   `json:"mode"`
	App                structs.App              `mapstructure:"app" json:"app" yaml:"app"`
	Mysql              map[string]structs.Data  `json:"mysql" yaml:"mysql"`
	Redis              structs.Redis            `json:"redis" yaml:"redis"`
	Mongo              map[string]structs.Mongo `json:"mongo" yaml:"mongo"`
	Casbin             structs.Casbin           `json:"casbin" yaml:"casbin"`
	Consul             structs.Consul           `json:"consul" yaml:"consul"`
	Wechat             structs.Wechat           `json:"wechat" yaml:"wechat"`
	JWT                structs.JWT              `json:"jwt" yaml:"jwt"`
	CenterServerAddr   string                   `json:"CenterServerAddr" yaml:"CenterServerAddr"`
	BurgeonServiceAddr string                   `json:"BurgeonServiceAddr" yaml:"BurgeonServiceAddr"`
	RossServerAddr     string                   `json:"rossServerAddr" yaml:"rossServerAddr"`
	OaServerAddr       string                   `json:"oaServerAddr" yaml:"oaServerAddr"`
}

func (Mode) GetMysql

func (mode Mode) GetMysql() map[string]structs.Data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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