Documentation ¶
Index ¶
- Constants
- Variables
- type CreatePermissionJsonBody
- type DeletePermissionQueryParams
- type Entity
- type GetPermissionGroupsOfPermissionQueryParams
- type GetPermissionQueryParams
- type GetPermissionsQueryParams
- type GetRolesOfPermissionQueryParams
- type Info
- type Simple
- type UpdatePermissionGroupsOfPermissionJsonBody
- type UpdatePermissionJsonBody
- type UpdateRolesOfPermissionJsonBody
Constants ¶
View Source
const ( FieldName = "Name" FieldDescription = "Description" FieldResource = "Resource" FieldAction = "Action" )
Variables ¶
View Source
var ( ColumnName = domain.ColumnName(FieldName) ColumnDescription = domain.ColumnName(FieldDescription) ColumnResource = domain.ColumnName(FieldResource) ColumnAction = domain.ColumnName(FieldAction) )
Functions ¶
This section is empty.
Types ¶
type CreatePermissionJsonBody ¶
type CreatePermissionJsonBody struct { Name string `json:"name" binding:"required" assign:"toField:Name"` Description string `json:"description" assign:"toField:Description"` Resource string `json:"resource" binding:"required" assign:"toField:Resource"` Action string `json:"action" binding:"required" assign:"toField:Action"` request.CreateUserIDJsonBody }
type DeletePermissionQueryParams ¶
type DeletePermissionQueryParams struct {
request.IDQueryParam
}
type Entity ¶
type Entity struct { entity.Base Name string `sqlmapping:"column:name" sqlresult:"column:name" check:"required,lte=256"` Description string `sqlmapping:"column:description;updateClear" sqlresult:"column:description"` Resource string `sqlmapping:"column:resource" sqlresult:"column:resource" check:"required"` Action string `sqlmapping:"column:action" sqlresult:"column:action" check:"required,lte=128"` PermissionGroupIDs []string `sqlmapping:"-" sqlresult:"-"` RoleIDs []string `sqlmapping:"-" sqlresult:"-"` entity.UserIDFields entity.TimeFields }
func (*Entity) DomainCNName ¶
func (*Entity) DomainCamelName ¶
type GetPermissionGroupsOfPermissionQueryParams ¶
type GetPermissionGroupsOfPermissionQueryParams struct {
request.BaseQueryWithIDParams
}
type GetPermissionQueryParams ¶
type GetPermissionQueryParams struct {
request.IDQueryParam
}
type GetPermissionsQueryParams ¶
type GetPermissionsQueryParams struct { request.BaseQueryParams Name string `form:"name" assign:"toField:Name"` Resource string `form:"resource" assign:"toField:Resource"` Action string `form:"action" assign:"toField:Action"` }
type GetRolesOfPermissionQueryParams ¶
type GetRolesOfPermissionQueryParams struct {
request.BaseQueryWithIDParams
}
type Info ¶
type Info struct { application.InfoIDField Name string `json:"name" sqlresult:"column:name"` Description string `json:"description" sqlresult:"column:description"` Resource string `json:"resource" sqlresult:"column:resource"` Action string `json:"action" sqlresult:"column:action"` application.InfoUserIDFields application.InfoTimeFields }
type Simple ¶
type Simple struct { // schema Schema string // 鉴权中间件 AuthMiddleware binding.Middleware }
Simple Bind参数
type UpdatePermissionGroupsOfPermissionJsonBody ¶
type UpdatePermissionGroupsOfPermissionJsonBody struct { request.IDJsonBody PermissionGroupIDs []string `json:"permissionGroupIds" assign:"toField:PermissionGroupIDs"` }
type UpdatePermissionJsonBody ¶
type UpdatePermissionJsonBody struct { request.IDJsonBody Name string `json:"name" assign:"toField:Name"` Description string `json:"description" assign:"toField:Description"` Resource string `json:"resource" assign:"toField:Resource"` Action string `json:"action" assign:"toField:Action"` request.UpdateUserIDJsonBody }
type UpdateRolesOfPermissionJsonBody ¶
type UpdateRolesOfPermissionJsonBody struct { request.IDJsonBody RoleIDs []string `json:"roleIds" assign:"toField:RoleIDs"` }
Click to show internal directories.
Click to hide internal directories.