config

package
v0.0.0-...-0466c3b Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliSmsConfig

type AliSmsConfig struct {
	ApiKey     string `mapstructure:"key" json:"key"`
	ApiSecrect string `mapstructure:"secrect" json:"secrect"`
}

type ConsulConfig

type ConsulConfig struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type JWTConfig

type JWTConfig struct {
	SigningKey string `mapstructure:"key" json:"key"`
}

type NacosConfig

type NacosConfig struct {
	Host      string `mapstructure:"host"`
	Port      uint64 `mapstructure:"port"`
	Namespace string `mapstructure:"namespace"`
	User      string `mapstructure:"user"`
	Password  string `mapstructure:"password"`
	DataId    string `mapstructure:"dataid"`
	Group     string `mapstructure:"group"`
}

type RedisConfig

type RedisConfig struct {
	Host   string `mapstructure:"host" json:"host"`
	Port   int    `mapstructure:"port" json:"port"`
	Expire int    `mapstructure:"expire" json:"expire"`
}

type ServerConfig

type ServerConfig struct {
	Name        string                   `mapstructure:"name" json:"name"`         // 名称
	Host        string                   `mapstructure:"host" json:"host"`         // 主机地址
	Tags        []string                 `mapstructure:"tags" json:"tags"`         // 标签列表
	Port        int                      `mapstructure:"port" json:"port"`         // 端口号
	UserSrvInfo map[string]UserSrvConfig `mapstructure:"services" json:"services"` // 用户服务配置
	JWTInfo     JWTConfig                `mapstructure:"jwt" json:"jwt"`           // jwt配置
	AliSmsInfo  AliSmsConfig             `mapstructure:"sms" json:"sms"`           // sms配置
	RedisInfo   RedisConfig              `mapstructure:"redis" json:"redis"`       // redis配置
	ConsulInfo  ConsulConfig             `mapstructure:"consul" json:"consul"`     // consul配置
}

ServerConfig 服务配置

type UserSrvConfig

type UserSrvConfig struct {
	Host string `mapstructure:"host" json:"host"` // 主机地址
	Port int    `mapstructure:"port" json:"port"` // 端口号
	Name string `mapstructure:"name" json:"name"` // 名称
}

UserSrvConfig 用户服务配置

Jump to

Keyboard shortcuts

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