优化结构

This commit is contained in:
Yvan
2026-08-28 10:51:19 +08:00
parent fec3820464
commit 5b17f47141
12 changed files with 63 additions and 31 deletions
+7 -4
View File
@@ -13,9 +13,12 @@ type API struct {
Description string
APIGroup string
Method string
OrderKey string
Desc bool
StrictAll bool
}
type APIFilter struct {
Path, Description, APIGroup, Method string
OrderKey string
Desc, StrictAll bool
}
type APIRepo interface {
@@ -23,7 +26,7 @@ type APIRepo interface {
UpdateAPI(context.Context, *API) error
DeleteAPIs(context.Context, []uint) error
FindAPI(context.Context, uint) (*API, error)
ListAPIs(context.Context, int, int, *API) ([]*API, int64, error)
ListAPIs(context.Context, int, int, *APIFilter) ([]*API, int64, error)
APIRoleIDs(context.Context, string, string) ([]uint, error)
SetAPIRoles(context.Context, string, string, []uint) error
CheckPolicyStore(context.Context) error