Documentation ¶
Index ¶
- Constants
- func GetHeaders(ctx context.Context) (int32, int32, error)
- func GetUserID(ctx context.Context) (int32, error)
- func GetUserPermission(ctx context.Context) (int32, error)
- func ValidatePermission(issuerPermission int32, issuerID int32, targetID int32) error
- func ValidateRequiredFields(req interface{}, fields []string) error
Constants ¶
View Source
const CtxUserId key = 1
CtxUserId is context key for getting id
View Source
const CtxUserPermission key = 2
CtxUserPermission is context key for getting permission
Variables ¶
This section is empty.
Functions ¶
func GetHeaders ¶
GetHeaders gets requested user's permission and id from context
func GetUserPermission ¶
GetUserPermission gets a requested user's permission from context
func ValidatePermission ¶
ValidatePermission validates issuer account can change specified account
func ValidateRequiredFields ¶
ValidateRequiredFields validates required fields are not empty
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.