使用指针类型存储白名单、用户名和密码,允许批量传入授权配置

This commit is contained in:
2025-05-19 10:57:56 +08:00
parent 24351e1c56
commit 8c824595f4
3 changed files with 11 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ import "time"
type Permit struct {
Expire time.Time `json:"expire"`
Whitelists []string `json:"whitelists"`
Username string `json:"username"`
Password string `json:"password"`
Whitelists *[]string `json:"whitelists"`
Username *string `json:"username"`
Password *string `json:"password"`
}