Documentation ¶
Index ¶
- Constants
- func CreateAction(control dto.Control) gin.HandlerFunc
- func DeleteAction(control dto.Control) gin.HandlerFunc
- func IndexAction(m models.ActiveRecord, d dto.Index, f func() interface{}) gin.HandlerFunc
- func Permission(tableName string, p *DataPermission) func(db *gorm.DB) *gorm.DB
- func PermissionAction() gin.HandlerFunc
- func UpdateAction(control dto.Control) gin.HandlerFunc
- func ViewAction(control dto.Control, f func() interface{}) gin.HandlerFunc
- type DataPermission
Constants ¶
View Source
const (
PermissionKey = "dataPermission"
)
Variables ¶
This section is empty.
Functions ¶
func IndexAction ¶
func IndexAction(m models.ActiveRecord, d dto.Index, f func() interface{}) gin.HandlerFunc
IndexAction 通用查询动作
func Permission ¶
func PermissionAction ¶
func PermissionAction() gin.HandlerFunc
func ViewAction ¶
func ViewAction(control dto.Control, f func() interface{}) gin.HandlerFunc
ViewAction 通用详情动作
Types ¶
type DataPermission ¶
func GetPermissionFromContext ¶
func GetPermissionFromContext(c *gin.Context) *DataPermission
GetPermissionFromContext 提供非action写法数据范围约束
Source Files ¶
Click to show internal directories.
Click to hide internal directories.