Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
ada028f9
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
9 个月 前同步成功
通知
324
Star
18154
Fork
5505
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
ada028f9
编写于
8月 21, 2023
作者:
A
andywu1998
提交者:
GitHub
8月 21, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化config字段排列,使得内存对齐 (#1521)
* 调整字段顺序,解决config包内存对齐问题 * fix(config):修复内存对齐
上级
d7e55ead
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
38 addition
and
37 deletion
+38
-37
server/config/auto_code.go
server/config/auto_code.go
+7
-7
server/config/db_list.go
server/config/db_list.go
+10
-10
server/config/email.go
server/config/email.go
+7
-7
server/config/oss_aws.go
server/config/oss_aws.go
+2
-2
server/config/oss_qiniu.go
server/config/oss_qiniu.go
+1
-1
server/config/redis.go
server/config/redis.go
+1
-1
server/config/system.go
server/config/system.go
+7
-7
server/config/timer.go
server/config/timer.go
+3
-2
未找到文件。
server/config/auto_code.go
浏览文件 @
ada028f9
package
config
type
Autocode
struct
{
TransferRestart
bool
`mapstructure:"transfer-restart" json:"transfer-restart" yaml:"transfer-restart
"`
Root
string
`mapstructure:"root" json:"root" yaml:"root
"`
SModel
string
`mapstructure:"server-model" json:"server-model" yaml:"server-model
"`
SRouter
string
`mapstructure:"server-router" json:"server-router" yaml:"server-router
"`
Server
string
`mapstructure:"server" json:"server" yaml:"server"`
SApi
string
`mapstructure:"server-api" json:"server-api" yaml:"server-api"`
SPlug
string
`mapstructure:"server-plug" json:"server-plug" yaml:"server-plug"`
SInitialize
string
`mapstructure:"server-initialize" json:"server-initialize" yaml:"server-initialize"`
SModel
string
`mapstructure:"server-model" json:"server-model" yaml:"server-model"`
SRequest
string
`mapstructure:"server-request" json:"server-request" yaml:"server-request"`
SRouter
string
`mapstructure:"server-router" json:"server-router" yaml:"server-router"`
SService
string
`mapstructure:"server-service" json:"server-service" yaml:"server-service"`
Root
string
`mapstructure:"root" json:"root" yaml:"root"`
WTable
string
`mapstructure:"web-table" json:"web-table" yaml:"web-table"`
Web
string
`mapstructure:"web" json:"web" yaml:"web"`
SService
string
`mapstructure:"server-service" json:"server-service" yaml:"server-service"`
SRequest
string
`mapstructure:"server-request" json:"server-request" yaml:"server-request"`
WApi
string
`mapstructure:"web-api" json:"web-api" yaml:"web-api"`
WForm
string
`mapstructure:"web-form" json:"web-form" yaml:"web-form"`
WTable
string
`mapstructure:"web-table" json:"web-table" yaml:"web-table
"`
TransferRestart
bool
`mapstructure:"transfer-restart" json:"transfer-restart" yaml:"transfer-restart
"`
}
server/config/db_list.go
浏览文件 @
ada028f9
...
...
@@ -9,24 +9,24 @@ type DsnProvider interface {
// GeneralDB 也被 Pgsql 和 Mysql 原样使用
type
GeneralDB
struct
{
Path
string
`mapstructure:"path" json:"path" yaml:"path"`
// 服务器地址:端口
Port
string
`mapstructure:"port" json:"port" yaml:"port"`
//:端口
Config
string
`mapstructure:"config" json:"config" yaml:"config"`
// 高级配置
Dbname
string
`mapstructure:"db-name" json:"db-name" yaml:"db-name"`
// 数据库名
Username
string
`mapstructure:"username" json:"username" yaml:"username"`
// 数据库用户名
Password
string
`mapstructure:"password" json:"password" yaml:"password"`
// 数据库密码
Prefix
string
`mapstructure:"prefix" json:"prefix" yaml:"prefix"`
//全局表前缀,单独定义TableName则不生效
Singular
bool
`mapstructure:"singular" json:"singular" yaml:"singular"`
//是否开启全局禁用复数,true表示开启
Prefix
string
`mapstructure:"prefix" json:"prefix" yaml:"prefix"`
Port
string
`mapstructure:"port" json:"port" yaml:"port"`
Config
string
`mapstructure:"config" json:"config" yaml:"config"`
// 高级配置
Dbname
string
`mapstructure:"db-name" json:"db-name" yaml:"db-name"`
// 数据库名
Username
string
`mapstructure:"username" json:"username" yaml:"username"`
// 数据库密码
Password
string
`mapstructure:"password" json:"password" yaml:"password"`
// 数据库密码
Path
string
`mapstructure:"path" json:"path" yaml:"path"`
Engine
string
`mapstructure:"engine" json:"engine" yaml:"engine" default:"InnoDB"`
//数据库引擎,默认InnoDB
LogMode
string
`mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"`
// 是否开启Gorm全局日志
MaxIdleConns
int
`mapstructure:"max-idle-conns" json:"max-idle-conns" yaml:"max-idle-conns"`
// 空闲中的最大连接数
MaxOpenConns
int
`mapstructure:"max-open-conns" json:"max-open-conns" yaml:"max-open-conns"`
// 打开到数据库的最大连接数
LogMode
string
`mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"`
// 是否开启Gorm全局日志
Singular
bool
`mapstructure:"singular" json:"singular" yaml:"singular"`
//是否开启全局禁用复数,true表示开启
LogZap
bool
`mapstructure:"log-zap" json:"log-zap" yaml:"log-zap"`
// 是否通过zap写入日志文件
}
type
SpecializedDB
struct
{
Disable
bool
`mapstructure:"disable" json:"disable" yaml:"disable"`
Type
string
`mapstructure:"type" json:"type" yaml:"type"`
AliasName
string
`mapstructure:"alias-name" json:"alias-name" yaml:"alias-name"`
GeneralDB
`yaml:",inline" mapstructure:",squash"`
Disable
bool
`mapstructure:"disable" json:"disable" yaml:"disable"`
}
server/config/email.go
浏览文件 @
ada028f9
package
config
type
Email
struct
{
To
string
`mapstructure:"to" json:"to" yaml:"to"`
// 收件人:多个以英文逗号分隔
Port
int
`mapstructure:"port" json:"port" yaml:"port"`
// 端口
From
string
`mapstructure:"from" json:"from" yaml:"from"`
// 收件人
Host
string
`mapstructure:"host" json:"host" yaml:"host"`
// 服务器地址
IsSSL
bool
`mapstructure:"is-ssl" json:"is-ssl" yaml:"is-ssl"`
// 是否SSL
Secret
string
`mapstructure:"secret" json:"secret" yaml:"secret"`
// 密钥
Nickname
string
`mapstructure:"nickname" json:"nickname" yaml:"nickname"`
// 昵称
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
}
server/config/oss_aws.go
浏览文件 @
ada028f9
...
...
@@ -4,10 +4,10 @@ type AwsS3 struct {
Bucket
string
`mapstructure:"bucket" json:"bucket" yaml:"bucket"`
Region
string
`mapstructure:"region" json:"region" yaml:"region"`
Endpoint
string
`mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
S3ForcePathStyle
bool
`mapstructure:"s3-force-path-style" json:"s3-force-path-style" yaml:"s3-force-path-style"`
DisableSSL
bool
`mapstructure:"disable-ssl" json:"disable-ssl" yaml:"disable-ssl"`
SecretID
string
`mapstructure:"secret-id" json:"secret-id" yaml:"secret-id"`
SecretKey
string
`mapstructure:"secret-key" json:"secret-key" yaml:"secret-key"`
BaseURL
string
`mapstructure:"base-url" json:"base-url" yaml:"base-url"`
PathPrefix
string
`mapstructure:"path-prefix" json:"path-prefix" yaml:"path-prefix"`
S3ForcePathStyle
bool
`mapstructure:"s3-force-path-style" json:"s3-force-path-style" yaml:"s3-force-path-style"`
DisableSSL
bool
`mapstructure:"disable-ssl" json:"disable-ssl" yaml:"disable-ssl"`
}
server/config/oss_qiniu.go
浏览文件 @
ada028f9
...
...
@@ -4,8 +4,8 @@ type Qiniu struct {
Zone
string
`mapstructure:"zone" json:"zone" yaml:"zone"`
// 存储区域
Bucket
string
`mapstructure:"bucket" json:"bucket" yaml:"bucket"`
// 空间名称
ImgPath
string
`mapstructure:"img-path" json:"img-path" yaml:"img-path"`
// CDN加速域名
UseHTTPS
bool
`mapstructure:"use-https" json:"use-https" yaml:"use-https"`
// 是否使用https
AccessKey
string
`mapstructure:"access-key" json:"access-key" yaml:"access-key"`
// 秘钥AK
SecretKey
string
`mapstructure:"secret-key" json:"secret-key" yaml:"secret-key"`
// 秘钥SK
UseHTTPS
bool
`mapstructure:"use-https" json:"use-https" yaml:"use-https"`
// 是否使用https
UseCdnDomains
bool
`mapstructure:"use-cdn-domains" json:"use-cdn-domains" yaml:"use-cdn-domains"`
// 上传是否使用CDN上传加速
}
server/config/redis.go
浏览文件 @
ada028f9
package
config
type
Redis
struct
{
DB
int
`mapstructure:"db" json:"db" yaml:"db"`
// redis的哪个数据库
Addr
string
`mapstructure:"addr" json:"addr" yaml:"addr"`
// 服务器地址:端口
Password
string
`mapstructure:"password" json:"password" yaml:"password"`
// 密码
DB
int
`mapstructure:"db" json:"db" yaml:"db"`
// redis的哪个数据库
}
server/config/system.go
浏览文件 @
ada028f9
package
config
type
System
struct
{
Env
string
`mapstructure:"env" json:"env" yaml:"env"`
// 环境值
Addr
int
`mapstructure:"addr" json:"addr" yaml:"addr"`
// 端口值
DbType
string
`mapstructure:"db-type" json:"db-type" yaml:"db-type"`
// 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql
OssType
string
`mapstructure:"oss-type" json:"oss-type" yaml:"oss-type"`
// Oss类型
UseMultipoint
bool
`mapstructure:"use-multipoint" json:"use-multipoint" yaml:"use-multipoint"`
// 多点登录拦截
UseRedis
bool
`mapstructure:"use-redis" json:"use-redis" yaml:"use-redis"`
// 使用redis
Env
string
`mapstructure:"env" json:"env" yaml:"env"`
// 环境值
DbType
string
`mapstructure:"db-type" json:"db-type" yaml:"db-type"`
// 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql
OssType
string
`mapstructure:"oss-type" json:"oss-type" yaml:"oss-type"`
// Oss类型
RouterPrefix
string
`mapstructure:"router-prefix" json:"router-prefix" yaml:"router-prefix"`
Addr
int
`mapstructure:"addr" json:"addr" yaml:"addr"`
// 端口值
LimitCountIP
int
`mapstructure:"iplimit-count" json:"iplimit-count" yaml:"iplimit-count"`
LimitTimeIP
int
`mapstructure:"iplimit-time" json:"iplimit-time" yaml:"iplimit-time"`
RouterPrefix
string
`mapstructure:"router-prefix" json:"router-prefix" yaml:"router-prefix"`
UseMultipoint
bool
`mapstructure:"use-multipoint" json:"use-multipoint" yaml:"use-multipoint"`
// 多点登录拦截
UseRedis
bool
`mapstructure:"use-redis" json:"use-redis" yaml:"use-redis"`
// 使用redis
}
server/config/timer.go
浏览文件 @
ada028f9
package
config
type
Timer
struct
{
Spec
string
`mapstructure:"spec" json:"spec" yaml:"spec"`
// CRON表达式
Detail
[]
Detail
`mapstructure:"detail" json:"detail" yaml:"detail"`
Start
bool
`mapstructure:"start" json:"start" yaml:"start"`
// 是否启用
Spec
string
`mapstructure:"spec" json:"spec" yaml:"spec"`
// CRON表达式
WithSeconds
bool
`mapstructure:"with_seconds" json:"with_seconds" yaml:"with_seconds"`
// 是否精确到秒
Detail
[]
Detail
`mapstructure:"detail" json:"detail" yaml:"detail"`
}
type
Detail
struct
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录