Documentation
¶
Index ¶
- func GetErrorMsg(request interface{}, err error) string
- type CreateApplication
- type CreateOrganization
- type CreatePermissionSpace
- type CreatePolicy
- type CreatePost
- type CreateResource
- type CreateRole
- type CreateSsoApplication
- type CreateUser
- type GithubLogin
- type ImageUpload
- type Login
- type Page
- type PolicyResource
- type PolicyResourceItem
- type Register
- type ResourceItem
- type UpdateApplication
- type UpdateOrganization
- type UpdatePermissionSpace
- type UpdatePolicy
- type UpdatePost
- type UpdateResource
- type UpdateRole
- type UpdateSsoApplication
- type UpdateUser
- type Validator
- type ValidatorMessages
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateApplication ¶
type CreateApplication struct { Name string `form:"name" json:"name" binding:"required"` Description string `form:"description" json:"description"` CallbackUrl string `form:"description" json:"callback_url" ` }
func (CreateApplication) GetMessages ¶
func (dto CreateApplication) GetMessages() ValidatorMessages
type CreateOrganization ¶
type CreateOrganization struct { Name string `form:"name" json:"name" binding:"required"` Code string `form:"code" json:"code" binding:"required"` ParentId int64 `form:"parent_id" json:"parent_id"` }
func (*CreateOrganization) GetMessages ¶
func (p *CreateOrganization) GetMessages() ValidatorMessages
type CreatePermissionSpace ¶
type CreatePermissionSpace struct { Name string `form:"name" json:"name" binding:"required"` ApplicationId int64 `form:"application_id" json:"application_id" binding:"required"` Code string `form:"code" json:"code" binding:"required"` Description string `form:"description" json:"description" binding:"required"` }
func (CreatePermissionSpace) GetMessages ¶
func (dto CreatePermissionSpace) GetMessages() ValidatorMessages
type CreatePolicy ¶
type CreatePolicy struct { Name string `json:"name" form:"name"` Description string `json:"description" form:"description"` Resources []PolicyResource `json:"resources" form:"resources"` }
func (CreatePolicy) GetMessages ¶
func (c CreatePolicy) GetMessages() ValidatorMessages
type CreatePost ¶
type CreatePost struct { Code string `form:"code" json:"code" binding:"required"` Name string `form:"name" json:"name" binding:"required"` OrganizationIds []int64 `form:"organization_ids" json:"organization_ids"` }
func (CreatePost) GetMessages ¶
func (c CreatePost) GetMessages() ValidatorMessages
type CreateResource ¶
type CreateResource struct { Name string `json:"name" form:"name" binding:"required"` Code string `json:"code" form:"code" binding:"required"` Description string `json:"description" form:"description"` PermissionSpaceId int64 `json:"permission_space_id" form:"permission_space_id" binding:"required"` Category int8 `json:"category" form:"category" binding:"required"` Items []ResourceItem `json:"items" form:"items"` Actions []string `json:"actions" form:"actions"` }
func (CreateResource) GetMessages ¶
func (c CreateResource) GetMessages() ValidatorMessages
type CreateRole ¶
type CreateRole struct { Code string `form:"code" json:"code" binding:"required"` Name string `form:"name" json:"name" binding:"required"` PermissionSpaceId int64 `form:"permission_space_id" json:"permission_space_id" binding:"required"` }
func (CreateRole) GetMessages ¶
func (dto CreateRole) GetMessages() ValidatorMessages
type CreateSsoApplication ¶
type CreateSsoApplication struct { Name string `form:"name" json:"name" binding:"required"` Description string `form:"description" json:"description"` CallbackUrl string `form:"description" json:"callback_url" ` }
func (CreateSsoApplication) GetMessages ¶
func (dto CreateSsoApplication) GetMessages() ValidatorMessages
type CreateUser ¶
type CreateUser struct { Name string `form:"name" json:"name" binding:"required"` Mobile string `form:"mobile" json:"mobile" binding:"required,mobile"` RoleIds []int64 `json:"role_ids" form:"role_ids"` OrganizationId int64 `json:"organization_id" form:"organization_id"` PostId int64 `json:"post_id" form:"post_id"` }
func (CreateUser) GetMessages ¶
func (u CreateUser) GetMessages() ValidatorMessages
type GithubLogin ¶
type GithubLogin struct {
Code string `form:"code" json:"code" binding:"required"`
}
func (GithubLogin) GetMessages ¶
func (login GithubLogin) GetMessages() ValidatorMessages
type ImageUpload ¶
type ImageUpload struct { Business string `form:"business" json:"business" binding:"required"` Image *multipart.FileHeader `form:"image" json:"image" binding:"required"` }
func (ImageUpload) GetMessages ¶
func (imageUpload ImageUpload) GetMessages() ValidatorMessages
type Login ¶
type Login struct { Mobile string `form:"mobile" json:"mobile" binding:"required,mobile"` Password string `form:"password" json:"password" binding:"required"` }
func (Login) GetMessages ¶
func (login Login) GetMessages() ValidatorMessages
type PolicyResource ¶
type PolicyResource struct { PermissionSpaceId int64 `json:"permission_space_id" form:"permission_space_id"` ResourceId int64 `json:"resource_id" form:"resource_id"` Effect int8 `json:"effect" form:"effect"` Items []PolicyResourceItem `json:"items" form:"items"` }
type PolicyResourceItem ¶
type Register ¶
type Register struct { Name string `form:"name" json:"name" binding:"required"` Mobile string `form:"mobile" json:"mobile" binding:"required,mobile"` Password string `form:"password" json:"password" binding:"required"` }
func (Register) GetMessages ¶
func (register Register) GetMessages() ValidatorMessages
type ResourceItem ¶
type ResourceItem struct { Name string `json:"name" form:"name"` Code string `json:"code" form:"code"` Value string `json:"value" form:"value"` Description string `json:"description" form:"description"` Items []ResourceItem `json:"items" form:"items"` }
type UpdateApplication ¶
type UpdateApplication struct { Id int64 `form:"id" json:"id"` CreateApplication }
func (UpdateApplication) GetMessages ¶
func (dto UpdateApplication) GetMessages() ValidatorMessages
type UpdateOrganization ¶
type UpdateOrganization struct { Id int64 `form:"id" json:"id" binding:"required"` Name string `form:"name" json:"name" binding:"required"` Code string `form:"code" json:"code" binding:"required"` ParentId int64 `form:"parent_id" json:"parent_id"` }
func (*UpdateOrganization) GetMessages ¶
func (p *UpdateOrganization) GetMessages() ValidatorMessages
type UpdatePermissionSpace ¶
type UpdatePermissionSpace struct { Id int64 `form:"id" json:"id" binding:"required" ` CreatePermissionSpace }
func (UpdatePermissionSpace) GetMessages ¶
func (dto UpdatePermissionSpace) GetMessages() ValidatorMessages
type UpdatePolicy ¶
type UpdatePolicy struct { Id int64 `json:"id" form:"id"` Name string `json:"name" form:"name"` Description string `json:"description" form:"description"` Resources []PolicyResource `json:"resources" form:"resources"` }
func (UpdatePolicy) GetMessages ¶
func (c UpdatePolicy) GetMessages() ValidatorMessages
type UpdatePost ¶
type UpdatePost struct { Id int64 `form:"id" json:"id" binding:"required"` CreatePost }
func (UpdatePost) GetMessages ¶
func (c UpdatePost) GetMessages() ValidatorMessages
type UpdateResource ¶
type UpdateResource struct { Id int64 `json:"id" form:"id" binding:"required"` Name string `json:"name" form:"name" binding:"required"` Code string `json:"code" form:"code" binding:"required"` Description string `json:"description" form:"description"` PermissionSpaceId int64 `json:"permission_space_id" form:"permission_space_id" binding:"required"` Items []ResourceItem `json:"items" form:"items"` Actions []string `json:"actions" form:"actions"` }
func (UpdateResource) GetMessages ¶
func (c UpdateResource) GetMessages() ValidatorMessages
type UpdateRole ¶
type UpdateRole struct { Id int64 `form:"id" json:"id" binding:"required"` Code string `form:"code" json:"code" binding:"required"` Name string `form:"name" json:"name" binding:"required"` PermissionSpaceId int64 `form:"permission_space_id" json:"permission_space_id" binding:"required"` }
func (UpdateRole) GetMessages ¶
func (dto UpdateRole) GetMessages() ValidatorMessages
type UpdateSsoApplication ¶
type UpdateSsoApplication struct { Id int64 `form:"id" json:"id"` CreateApplication }
func (UpdateSsoApplication) GetMessages ¶
func (dto UpdateSsoApplication) GetMessages() ValidatorMessages
type UpdateUser ¶
type UpdateUser struct { Id int64 `json:"id" form:"id" binding:"required"` Name string `form:"name" json:"name" binding:"required"` Mobile string `form:"mobile" json:"mobile" binding:"required,mobile"` RoleIds []int64 `json:"role_ids" form:"role_ids"` OrganizationId int64 `json:"organization_id" form:"organization_id"` PostId int64 `json:"post_id" form:"post_id"` }
func (UpdateUser) GetMessages ¶
func (u UpdateUser) GetMessages() ValidatorMessages
type Validator ¶
type Validator interface {
GetMessages() ValidatorMessages
}
type ValidatorMessages ¶
Click to show internal directories.
Click to hide internal directories.