package rolemod import ( "91porn-server/models/commod" "go.mongodb.org/mongo-driver/bson/primitive" ) type ListParam struct { ListFilter commod.Page } type ListFilter struct { UID uint64 `form:"uid" json:"uid,omitempty" bson:"uid,omitempty"` //用户ID } type WebResp struct { Total int64 `json:"total"` List interface{} `json:"list"` } // 用于记录权限配置 type RoleResp struct { ID primitive.ObjectID `json:"_id" bson:"_id,omitempty"` RoleID int `json:"id" bson:"id"` Host string `json:"host" bson:"host"` // Host 定义资源的Host,允许使用增强的通配符。 Path string `json:"path" bson:"path"` // Path 定义资源的Path,允许使用增强的通配符。 Method string `json:"method" bson:"method"` // Method 定义资源的Method,允许使用增强的通配符。 AuthorizedRoles []string `json:"authorized_roles" bson:"authorized_roles"` // AuthorizedRoles定义允许访问资源的角色 ForbiddenRoles []string `json:"forbidden_roles" bson:"forbidden_roles"` AllowAnyone bool `json:"allow_anyone" bson:"allow_anyone"` }