Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(policy Policier, action Action) gin.HandlerFunc
Types ¶
type Authorization ¶ added in v0.8.1
type Policier ¶
type Policier interface {
Before() *bool
Create(userIF model.IUser, routeParamMap map[key]value) bool
Update(userIF model.IUser, routeParamMap map[key]value) bool
Delete(userIF model.IUser, routeParamMap map[key]value) bool
ForceDelete(userIF model.IUser, routeParamMap map[key]value) bool
View(userIF model.IUser, routeParamMap map[key]value) bool
Restore(userIF model.IUser, routeParamMap map[key]value) bool
}
type RoutePolicier ¶
type UserNotPermitError ¶
type UserNotPermitError struct{}
func (UserNotPermitError) Error ¶
func (e UserNotPermitError) Error() string
Click to show internal directories.
Click to hide internal directories.