🚧 添加model
This commit is contained in:
@@ -40,4 +40,14 @@ type Config struct {
|
||||
RefreshToken string `yaml:"refresh_token"`
|
||||
MaxFilesCount int `yaml:"max_files_count"`
|
||||
} `yaml:"ali_drive"`
|
||||
Database struct{
|
||||
Type string `yaml:"type"`
|
||||
User string `yaml:"user"`
|
||||
Password string `yaml:"password"`
|
||||
Host string `yaml:"host"`
|
||||
Port int `yaml:"port"`
|
||||
Name string `yaml:"name"`
|
||||
TablePrefix string `yaml:"tablePrefix"`
|
||||
DBFile string `yaml:"dBFile"`
|
||||
} `yaml:"database"`
|
||||
}
|
@@ -2,6 +2,7 @@ package conf
|
||||
|
||||
import (
|
||||
"github.com/patrickmn/go-cache"
|
||||
"gorm.io/gorm"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -17,6 +18,8 @@ var(
|
||||
|
||||
Cache *cache.Cache // cache
|
||||
|
||||
DB *gorm.DB
|
||||
|
||||
Origins []string // allow origins
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user