Documentation ¶
Index ¶
- func GenerateResponse(status int, c *gin.Context, data interface{}, meta *models.Metadata)
- func GetClaims(c *gin.Context) (models.ISClaims, error)
- func GetRoles(c *gin.Context) []string
- func IndexOfString(element string, data []string) int
- func IsInRole(c *gin.Context, role string) bool
- func RunTransaction(db *gorm.DB, fn txnFunc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateResponse ¶
GenerateResponse generates a response for the api
func IndexOfString ¶
IndexOfString finds the index of an item in a string array. This is case insensitive and returns -1 if not found
func RunTransaction ¶
RunTransaction is a wrapper for a transaction. This automatically re-calls `fn` with the open transaction as an argument as long as the database server asks for the transaction to be retried.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.