Documentation ¶
Index ¶
- func Admin(g Gate) echo.MiddlewareFunc
- func Member(g Gate, idparam string) echo.MiddlewareFunc
- func MemberF(g Gate, idfunc func(echo.Context) (string, error)) echo.MiddlewareFunc
- func ModOrAdminF(g Gate, idfunc func(echo.Context) (string, error)) echo.MiddlewareFunc
- func Owner(g Gate, idparam string) echo.MiddlewareFunc
- func OwnerF(g Gate, idfunc func(echo.Context) (string, error)) echo.MiddlewareFunc
- func OwnerModOrAdminF(g Gate, idfunc func(echo.Context) (string, string, error)) echo.MiddlewareFunc
- func OwnerOrAdmin(g Gate, idparam string) echo.MiddlewareFunc
- func System(g Gate) echo.MiddlewareFunc
- func User(g Gate) echo.MiddlewareFunc
- func UserOrBan(g Gate, idparam string) echo.MiddlewareFunc
- func UserOrBanF(g Gate, idfunc func(echo.Context) (string, error)) echo.MiddlewareFunc
- type Gate
- type Service
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Admin ¶
func Admin(g Gate) echo.MiddlewareFunc
Admin is a middleware function to validate if a user is an admin
func Member ¶
Member is a middleware function to validate if the request is made by a member of a group and check if the user is banned from the group
func MemberF ¶
MemberF is a middleware function to validate if the request is made by a member of a group and check if the user is banned from the group
idfunc should return the group_tag
func ModOrAdminF ¶
ModOrAdminF is a middleware function to validate if the request is made by the moderator of a group or an admin
idfunc should return the group_tag
func OwnerF ¶
OwnerF is a middleware function to validate if a user owns the accessed resource
idfunc should return the userid
func OwnerModOrAdminF ¶
func OwnerModOrAdminF(g Gate, idfunc func(echo.Context) (string, string, error)) echo.MiddlewareFunc
OwnerModOrAdminF is a middleware function to validate if the request is made by the owner or a moderator
idfunc should return the userid and the group_tag
func OwnerOrAdmin ¶
OwnerOrAdmin is a middleware function to validate if the request is made by the owner or an admin
func System ¶
func System(g Gate) echo.MiddlewareFunc
System is a middleware function to validate if the request is made by a system
func User ¶
func User(g Gate) echo.MiddlewareFunc
User is a middleware function to validate if the request is made by a user
func UserOrBan ¶
UserOrBan is a middleware function to validate if the request is made by a user and check if the user is banned from the group
func UserOrBanF ¶
UserOrBanF is a middleware function to validate if the request is made by a user and check if the user is banned from the group
idfunc should return the group_tag