Documentation ¶
Index ¶
- Constants
- func Create(ctx *app.Ctx, param *ParamCreate) error
- func CreateHandler(c *fiber.Ctx) error
- func DeleteByID(ctx *app.Ctx, id string, param ParamDelete) error
- func DeleteByIDHandler(c *fiber.Ctx) error
- func Get(ctx *app.Ctx, query url.Values) (app.ListModel, error)
- func GetACLKeysHandler(c *fiber.Ctx) error
- func GetByIDHandler(c *fiber.Ctx) error
- func GetListHandler(c *fiber.Ctx) error
- func PartialyUpdateByID(ctx *app.Ctx, id string, param *ParamPartialyUpdate) error
- func PartialyUpdateByIDHandler(c *fiber.Ctx) error
- func UpdateByID(ctx *app.Ctx, id string, param *ParamUpdate) error
- func UpdateByIDHandler(c *fiber.Ctx) error
- type AclKeys
- type List
- type ParamCreate
- type ParamDelete
- type ParamPartialyUpdate
- type ParamUpdate
- type Role
Constants ¶
View Source
const EndPoint = "roles"
Variables ¶
This section is empty.
Functions ¶
func CreateHandler ¶
func CreateHandler(c *fiber.Ctx) error
func DeleteByID ¶
func DeleteByID(ctx *app.Ctx, id string, param ParamDelete) error
func DeleteByIDHandler ¶
func DeleteByIDHandler(c *fiber.Ctx) error
func GetACLKeysHandler ¶
func GetACLKeysHandler(c *fiber.Ctx) error
func GetByIDHandler ¶
func GetByIDHandler(c *fiber.Ctx) error
func GetListHandler ¶
func GetListHandler(c *fiber.Ctx) error
func PartialyUpdateByID ¶
func PartialyUpdateByID(ctx *app.Ctx, id string, param *ParamPartialyUpdate) error
func PartialyUpdateByIDHandler ¶
func PartialyUpdateByIDHandler(c *fiber.Ctx) error
func UpdateByID ¶
func UpdateByID(ctx *app.Ctx, id string, param *ParamUpdate) error
func UpdateByIDHandler ¶
func UpdateByIDHandler(c *fiber.Ctx) error
Types ¶
type ParamCreate ¶
type ParamCreate struct {
Role
}
type ParamDelete ¶
type ParamDelete struct { Role Reason db.NullString `json:"reason" gorm:"-" validate:"required" form:"reason"` }
type ParamPartialyUpdate ¶
type ParamPartialyUpdate struct { Role Reason db.NullString `json:"reason" gorm:"-" validate:"required" form:"reason"` }
type ParamUpdate ¶
type ParamUpdate struct { ParamCreate Reason db.NullString `json:"reason" gorm:"-" validate:"required" form:"reason"` }
type Role ¶
type Role struct { db.Model ID db.NullInt64 `json:"id" db:"g.id" gorm:"column:id;primaryKey"` Name db.NullString `json:"name" db:"g.name" gorm:"column:name"` IsAdmin db.NullBool `json:"is_admin" db:"g.is_admin" gorm:"column:is_admin"` Description db.NullString `json:"description" db:"g.description" gorm:"column:description"` AclKeys AclKeys `json:"acl" db:"g.acl_keys~json" gorm:"column:acl_keys"` }
func (*Role) SetRelation ¶
func (g *Role) SetRelation()
func (Role) TableAliasName ¶
func (Role) TableVersion ¶
Click to show internal directories.
Click to hide internal directories.