使用指针类型存储白名单、用户名和密码,允许批量传入授权配置
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user