config

package
v0.0.0-...-03884a7 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 1 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 {
	zrpc.RpcServerConf
	MysqlConf      MysqlConf
	RedisConf      RedisConf
	RabbitMQConf   RabbitMQConf
	EmailConf      EmailConf
	ThirdPartyConf map[string]map[string]ThirdPartyInfo

	DefaultCommentReviewStatus int64 `json:",default=1"` // 默认评论审核状态
	DefaultRemarkReviewStatus  int64 `json:",default=1"` // 默认留言审核状态
}

type EmailConf

type EmailConf struct {
	Host     string   `json:"host"`     // 服务器地址
	Port     int      `json:"port"`     // 端口
	Username string   `json:"username"` // 发件人
	Password string   `json:"password"` // 密钥
	Nickname string   `json:"nickname"` // 发件人昵称
	BCC      []string `json:"bcc"`      // 密送邮箱:多个以英文逗号分隔
}

邮件配置

type MysqlConf

type MysqlConf struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	Dbname   string `json:"dbname"`
	Config   string `json:"config"`
}

mysql数据库配置

type RabbitMQConf

type RabbitMQConf struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
}

rabbitmq配置

type RedisConf

type RedisConf struct {
	DB       int    `json:"db" yaml:"db"`     // redis的哪个数据库
	Host     string `json:"host" yaml:"host"` // 服务器地址:端口
	Port     string `json:"port" yaml:"port"`
	Password string `json:"password" yaml:"password"` // 密码
}

redis缓存配置

type ThirdPartyInfo

type ThirdPartyInfo struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RedirectUri  string `json:"redirect_uri"`
}

Jump to

Keyboard shortcuts

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