vconfig

package
v0.4.8-gz8 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	To       string `mapstructure:"to" json:"to" yaml:"to"`                   // 收件人:多个以英文逗号分隔 例:a@qq.com b@qq.com 正式开发中请把此项目作为参数使用
	From     string `mapstructure:"from" json:"from" yaml:"from"`             // 发件人  你自己要发邮件的邮箱
	Host     string `mapstructure:"host" json:"host" yaml:"host"`             // 服务器地址 例如 smtp.qq.com  请前往QQ或者你要发邮件的邮箱查看其smtp协议
	Secret   string `mapstructure:"secret" json:"secret" yaml:"secret"`       // 密钥    用于登录的密钥 最好不要用邮箱密码 去邮箱smtp申请一个用于登录的密钥
	Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"` // 昵称    发件人昵称 通常为自己的邮箱
	Port     int    `mapstructure:"port" json:"port" yaml:"port"`             // 端口     请前往QQ或者你要发邮件的邮箱查看其smtp协议 大多为 465
	IsSSL    bool   `mapstructure:"is-ssl" json:"is-ssl" yaml:"is-ssl"`       // 是否SSL   是否开启SSL
}

type Server

type Server struct {
	System System     `mapstructure:"system" json:"system" yaml:"system"`
	Email  Email      `mapstructure:"email" json:"email" yaml:"email"`
	Zap    config.Zap `mapstructure:"zap" json:"zap" yaml:"zap"`

	gconfig.DbServer `yaml:",inline" mapstructure:",squash"`
	Redis            rconfig.Redis `mapstructure:"redis" json:"redis" yaml:"redis"`

	// 跨域配置
	Cors      aconfig.CORS     `mapstructure:"cors" json:"cors" yaml:"cors"`
	JWT       aconfig.JWT      `mapstructure:"jwt" json:"jwt" yaml:"jwt"`
	Captcha   aconfig.Captcha  `mapstructure:"captcha" json:"captcha" yaml:"captcha"`
	OneidConf modelo.OneidConf `mapstructure:"oneid-token" json:"oneid-token" yaml:"oneid-token"`
}

type System

type System struct {
	gconfig.DbSys `yaml:",inline" mapstructure:",squash"`

	Env          string `mapstructure:"env" json:"env" yaml:"env"`                      // 环境值
	JasyptPwd    string `mapstructure:"jasypt-pwd" json:"jasypt-pwd" yaml:"jasypt-pwd"` // 配置加解密值
	Addr         int    `mapstructure:"addr" json:"addr" yaml:"addr"`                   // 端口值
	UseRedis     bool   `mapstructure:"use-redis" json:"use-redis" yaml:"use-redis"`    // 使用redis
	LimitType    int    `mapstructure:"limit-type" json:"limit-type" yaml:"limit-type"` // 限流类型:0(本地)|1(本地)|2(redis)
	LimitCountIP int    `mapstructure:"iplimit-count" json:"iplimit-count" yaml:"iplimit-count"`
	LimitTimeIP  int    `mapstructure:"iplimit-time" json:"iplimit-time" yaml:"iplimit-time"`
	OssType      string `mapstructure:"oss-type" json:"oss-type" yaml:"oss-type"` // Oss类型
	RouterPrefix string `mapstructure:"router-prefix" json:"router-prefix" yaml:"router-prefix"`
	IPQueryKey   string `mapstructure:"ip-query-key" json:"ip-query-key" yaml:"ip-query-key"`
	CurrencyKey  string `mapstructure:"currency-key" json:"currency-key" yaml:"currency-key"`
}

Jump to

Keyboard shortcuts

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