feat 网关鉴权

This commit is contained in:
2025-12-22 18:04:36 +08:00
parent 69cc960fe5
commit 670140e7d3
68 changed files with 1424 additions and 492 deletions

View File

@@ -3,6 +3,8 @@ package config
import "common/config"
const path = "./config"
const KeyUserAccessToken = "user:access:%v"
const KeyUserRefreshToken = "user:refresh:%v"
type Config struct {
App *config.AppConfig `yaml:"app"`
@@ -10,6 +12,10 @@ type Config struct {
Monitor *config.MonitorConfig `yaml:"monitor"`
DB *config.DBConfig `yaml:"db"`
Serve *config.ServeConfig `yaml:"serve"`
Auth *struct {
Secret string `yaml:"secret"`
Expire int64 `yaml:"expire"`
}
}
var cfg *Config