Documentation
¶
Index ¶
- Variables
- func AddPermForRole(name string, perms [][]string) error
- func Create(req *Request) (uint, error)
- func CreateRole(ctx iris.Context)
- func DeleteRole(ctx iris.Context)
- func First(ctx iris.Context)
- func GetAdminRoleName() string
- func GetAll(ctx iris.Context)
- func GetMigration() *gormigrate.Migration
- func GetRoleNames() ([]string, error)
- func IsAdminRole(id uint) error
- func NameScope(name string) func(db *gorm.DB) *gorm.DB
- func Party() func(index iris.Party)
- func UpdateRole(ctx iris.Context)
- type BaseRole
- type PageResponse
- type ReqPaginate
- type Request
- type Response
- type Role
- type RoleCollection
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRoleNameInvalide = errors.New("角色名称已经被使用")
View Source
var Source = new(source)
Functions ¶
func GetMigration ¶
func GetMigration() *gormigrate.Migration
func GetRoleNames ¶ added in v0.0.7
func IsAdminRole ¶
Types ¶
type BaseRole ¶
type BaseRole struct { Name string `gorm:"uniqueIndex;not null; type:varchar(256)" json:"name" validate:"required,gte=4,lte=50" comment:"名称"` DisplayName string `gorm:"type:varchar(256)" json:"displayName" comment:"显示名称"` Description string `gorm:"type:varchar(256)" json:"description" comment:"描述"` }
type PageResponse ¶
type PageResponse struct {
Item []*Response
}
Paginate 分页
type ReqPaginate ¶
type Request ¶
func GetSources ¶
type Response ¶
func FindByName ¶
FindByName
type RoleCollection ¶
type RoleCollection []Request
Click to show internal directories.
Click to hide internal directories.