Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Config ¶
type Config struct {
App struct {
Name string `json:"name"`
Host string `json:"host"`
Port string `json:"port"`
Dbtype string `json:"dbtype"` // 新增字段
} `json:"app"`
Mysql struct {
Type string `json:"type"` // 可删,实际由dbtype决定
Host string `json:"host"`
Port string `json:"port"`
User string `json:"user"`
Password string `json:"password"`
Database string `json:"database"`
Charset string `json:"charset"`
ParseTime bool `json:"parseTime"`
Loc string `json:"loc"`
} `json:"mysql"`
Sqlite struct {
Type string `json:"type"`
File string `json:"file"`
} `json:"sqlite"`
}
Config 结构体用于存储应用程序配置
type Site ¶
type Website ¶
type Website struct {
Id int `form:"id" json:"id"`
Name string `form:"name" json:"name"`
GroupId int `form:"group_id" json:"group_id"`
Url string `form:"url" json:"url"`
Logo string `form:"logo" json:"logo"`
Description string `form:"description" json:"description"`
CreatedAt time.Time
Group Group `gorm:"ForeignKey:GroupId"`
}
Click to show internal directories.
Click to hide internal directories.