Documentation ¶
Index ¶
- func AddCasbin(c *gin.Context)
- func AddRole(c *gin.Context)
- func AddUser(c *gin.Context)
- func AddVoucher(c *gin.Context)
- func EditRole(c *gin.Context)
- func EditUser(c *gin.Context)
- func EditVoucher(c *gin.Context)
- func FetchVoucher(c *gin.Context)
- func GetCasbinList(c *gin.Context)
- func GetUserList(c *gin.Context)
- func GetVoucherList(c *gin.Context)
- func RemoveRole(c *gin.Context)
- func RemoveUser(c *gin.Context)
- func RemoveVoucher(c *gin.Context)
- func RoleList(c *gin.Context)
- type AddCasbinForm
- type AddRoleForm
- type AddUserForm
- type AddVoucherForm
- type CasbinRule
- type EditRoleForm
- type EditUserForm
- type EditVoucherForm
- type UserForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCasbin ¶
AddCasbin godoc @Summary 新增权限 @Description 新增权限 @Tags 权限管理 @Produce json @Security ApiKeyAuth @Param body body service.CasbinCreateRequest true "body" @Success 200 {object} string "成功" @Failure 400 {object} errcode.Error "请求错误" @Failure 500 {object} errcode.Error "内部错误" @Router /v1/casbin [post]
func GetCasbinList ¶
GetCasbinList godoc @Summary 获取权限列表 @Produce json @Tags 权限管理 @Security ApiKeyAuth @Param data body service.CasbinListRequest true "角色ID" @Success 200 {object} service.CasbinListResponse "成功" @Failure 400 {object} errcode.Error "请求错误" @Failure 500 {object} errcode.Error "内部错误" @Router /v1/casbin/list [post]
func RemoveRole ¶
Types ¶
type AddCasbinForm ¶
type AddCasbinForm struct { RoleId int `form:"role_id" binding:"gte=1,lte=20"` CasbinRule []CasbinRule `form:"casbin_rule"` }
type AddRoleForm ¶
type AddUserForm ¶
type AddUserForm struct {
UserForm
}
type AddVoucherForm ¶
type AddVoucherForm struct { VoucherName string `form:"voucher_name"` VoucherAmount float32 `form:"voucher_amount"` VoucherType int `form:"voucher_type"` VoucherStatus int `form:"voucher_status"` StockCount int `form:"stock_count"` TotalCount int `form:"total_count"` StartPeriod string `form:"start_period"` EndPeriod string `form:"end_period"` }
type CasbinRule ¶
type EditRoleForm ¶
type EditUserForm ¶
type EditVoucherForm ¶
type EditVoucherForm struct { VoucherId int `form:"voucher_id" valid:"Required;Min(1)"` VoucherName string `form:"voucher_name"` VoucherAmount float32 `form:"voucher_amount"` VoucherType int `form:"voucher_type"` VoucherStatus int `form:"voucher_status"` StockCount int `form:"stock_count"` TotalCount int `form:"total_count"` StartPeriod string `form:"start_period"` EndPeriod string `form:"end_period"` }
Click to show internal directories.
Click to hide internal directories.