Documentation
¶
Index ¶
- func RedirectWithError(c *gin.Context, err error)
- func RedirectWithString(c *gin.Context, message string)
- func RedirectWithToken(c *gin.Context, token string)
- func Respond(c *gin.Context, code int)
- func RespondWithError(c *gin.Context, code int, data error)
- func RespondWithJSON(c *gin.Context, code int, data interface{})
- func RespondWithString(c *gin.Context, code int, data string)
- func RespondWithToken(c *gin.Context, token string)
- func StringToJSON(s string) map[string]interface{}
- func ValidatePathParameters(c *gin.Context, expectedParameters ...string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedirectWithError ¶
func RedirectWithString ¶
func RedirectWithToken ¶
func RespondWithError ¶
Respond with error, aborts rest of request
func RespondWithJSON ¶
Respond returns status and json
func RespondWithString ¶
Respond returns basic status and message
func RespondWithToken ¶
func StringToJSON ¶
func ValidatePathParameters ¶
* Validates path parameters exist * This doesn't care if there are extra parameters in the path * it just checks that it contains the required ones * /v1/society/compsoc will pass if given compsoc * /v1/society will fail if given compsoc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.