Documentation
¶
Index ¶
- func CreateMysqlConn(conf *config.Config) (*gorm.DB, error)
- func IsFormAPI(path string) bool
- type AssignRoleGrantReq
- type AssignRoleGrantResp
- type Backup
- type CopyRoleReq
- type CopyRoleResp
- type CreatePerReq
- type CreatePerResp
- type CreateRoleReq
- type CreateRoleResp
- type CreateUserRoleReq
- type CreateUserRoleResp
- type DeletePerReq
- type DeletePerResp
- type DeleteRoleReq
- type DeleteRoleResp
- type ExportReq
- type ExportResp
- type FindGrantRoleReq
- type FindGrantRoleResp
- type FindPermitReq
- type FindPermitResp
- type FindRoleReq
- type FindRoleResp
- type GetPermitReq
- type GetPermitResp
- type GetRoleReq
- type GetRoleResp
- type GetUserRoleReq
- type GetUserRoleResp
- type GrantRoles
- type ImportReq
- type ImportResp
- type ListAndSelectReq
- type ListAndSelectResp
- type ListPermitReq
- type ListPermitResp
- type ListRes
- type Object
- type Option
- type OptionReq
- type Owners
- type Per
- type Permit
- type Permits
- type UpdatePerReq
- type UpdatePerResp
- type UpdateRoleReq
- type UpdateRoleResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssignRoleGrantReq ¶
type AssignRoleGrantResp ¶
type AssignRoleGrantResp struct{}
type Backup ¶
type Backup interface { ExportTable(context.Context, *ExportReq) (*ExportResp, error) ExportPermit(context.Context, *ExportReq) (*ExportResp, error) ExportTableRelation(context.Context, *ExportReq) (*ExportResp, error) ExportTableScheme(context.Context, *ExportReq) (*ExportResp, error) ExportRole(context.Context, *ExportReq) (*ExportResp, error) ImportTable(context.Context, *ImportReq) (*ImportResp, error) ImportPermit(context.Context, *ImportReq) (*ImportResp, error) ImportTableRelation(context.Context, *ImportReq) (*ImportResp, error) ImportTableScheme(context.Context, *ImportReq) (*ImportResp, error) ImportRole(context.Context, *ImportReq) (*ImportResp, error) }
Backup import and export data interface.
type CopyRoleReq ¶
type CopyRoleResp ¶
type CopyRoleResp struct {
RoleID string `json:"id"`
}
type CreatePerReq ¶
type CreatePerReq struct { AccessPath string `json:"path"` URI string `json:"uri"` Params models.FiledPermit `json:"params"` Response models.FiledPermit `json:"response"` Condition models.Condition `json:"condition"` RoleID string `json:"roleID"` UserID string `json:"userID"` UserName string `json:"userName"` Method string `json:"method"` }
type CreatePerResp ¶
type CreatePerResp struct{}
type CreateRoleReq ¶
type CreateRoleResp ¶
type CreateRoleResp struct {
ID string `json:"id"`
}
type CreateUserRoleReq ¶
type CreateUserRoleResp ¶
type CreateUserRoleResp struct{}
type DeletePerReq ¶
type DeletePerResp ¶
type DeletePerResp struct{}
type DeleteRoleReq ¶
type DeleteRoleResp ¶
type DeleteRoleResp struct{}
type ExportResp ¶
ExportResp export response.
type FindGrantRoleReq ¶
type FindGrantRoleResp ¶
type FindGrantRoleResp struct { List []*GrantRoles `json:"list"` Total int64 `json:"total"` }
type FindPermitReq ¶
type FindPermitResp ¶
type FindRoleReq ¶
type FindRoleResp ¶
type FindRoleResp struct { List []*roleVo `json:"list"` Total int64 `json:"total"` }
type GetPermitReq ¶
type GetPermitResp ¶
type GetPermitResp struct { ID string `json:"id"` RoleID string `json:"roleID"` Path string `json:"path,omitempty"` Params models.FiledPermit `json:"params,omitempty"` Response models.FiledPermit `json:"response,omitempty"` Condition models.Condition `json:"condition,omitempty"` ResponseAll bool `json:"responseAll"` ParamsAll bool `json:"paramsAll"` }
type GetRoleReq ¶
type GetRoleReq struct {
ID string `json:"id"`
}
type GetRoleResp ¶
type GetUserRoleReq ¶
type GetUserRoleResp ¶
type GrantRoles ¶
type ListAndSelectReq ¶
type ListAndSelectResp ¶
type ListPermitReq ¶
type ListPermitResp ¶
type Permit ¶
type Permit interface { CreateRole(ctx context.Context, req *CreateRoleReq) (*CreateRoleResp, error) UpdateRole(ctx context.Context, req *UpdateRoleReq) (*UpdateRoleResp, error) DeleteRole(ctx context.Context, req *DeleteRoleReq) (*DeleteRoleResp, error) // 这个删除需要关心的东西比较多 GetRole(ctx context.Context, req *GetRoleReq) (*GetRoleResp, error) FindRole(ctx context.Context, req *FindRoleReq) (*FindRoleResp, error) AssignRoleGrant(ctx context.Context, req *AssignRoleGrantReq) (*AssignRoleGrantResp, error) FindGrantRole(ctx context.Context, req *FindGrantRoleReq) (*FindGrantRoleResp, error) CreatePermit(ctx context.Context, req *CreatePerReq) (*CreatePerResp, error) UpdatePermit(ctx context.Context, req *UpdatePerReq) (*UpdatePerResp, error) DeletePermit(ctx context.Context, req *DeletePerReq) (*DeletePerResp, error) GetPermit(ctx context.Context, req *GetPermitReq) (*GetPermitResp, error) FindPermit(ctx context.Context, req *FindPermitReq) (*FindPermitResp, error) CreateUserRole(ctx context.Context, req *CreateUserRoleReq, opts ...Option) (*CreateUserRoleResp, error) ListPermit(ctx context.Context, req *ListPermitReq) (*ListPermitResp, error) ListAndSelect(ctx context.Context, req *ListAndSelectReq) (*ListAndSelectResp, error) GetUserRole(ctx context.Context, req *GetUserRoleReq) (*GetUserRoleResp, error) CopyRole(ctx context.Context, req *CopyRoleReq) (*CopyRoleResp, error) }
type Permits ¶
type Permits struct { ID string `json:"id"` RoleID string `json:"roleID"` Path string `json:"path"` Params models.FiledPermit `json:"params"` Response models.FiledPermit `json:"response"` Condition models.Condition `json:"condition"` Methods string `json:"methods"` }
type UpdatePerReq ¶
type UpdatePerReq struct { ID string `json:"id"` Params models.FiledPermit `json:"params"` Response models.FiledPermit `json:"response"` Condition models.Condition `json:"condition"` ParamsAll bool `json:"paramsAll"` ResponseAll bool `json:"responseAll"` Path string `json:"accessPath"` URI string `json:"uri"` Method string `json:"method"` }
type UpdatePerResp ¶
type UpdatePerResp struct{}
type UpdateRoleReq ¶
type UpdateRoleResp ¶
type UpdateRoleResp struct{}
Click to show internal directories.
Click to hide internal directories.