Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertUintToString(number uint) string
- func HTTPRequestIsSuccessful(httpCode int) bool
- func SendHTTPBadRequest(e echo.Context) error
- func SendHTTPForbidden(e echo.Context) error
- func SendHTTPOk(e echo.Context) error
- func SendHTTPOkWithBody(e echo.Context, payload interface{}) error
- func SendHTTPStatusCreated(e echo.Context) error
- func SendHTTPStatusInternalServerError(e echo.Context) error
- func SendHTTPStatusServiceUnavailable(e echo.Context) error
- func SendHTTPWithMessage(e echo.Context, status models.HTTPStatus) error
- func SendHTTPWithPayload(e echo.Context, status models.HTTPStatus, payload interface{}) error
Constants ¶
View Source
const ( ADMIN = "ADMIN" ORGANIZATION_MEMBER = "ORGANIZATION_MEMBER" PARTICIPANT = "PARTICIPANT" GUEST = "GUEST" NONE = "NONE" )
exported roles
Variables ¶
View Source
var ( HTTPStatusOK = models.HTTPStatus{Status: http.StatusOK, Message: http.StatusText(http.StatusOK)} )
Functions ¶
func ConvertUintToString ¶
func HTTPRequestIsSuccessful ¶
func SendHTTPBadRequest ¶
func SendHTTPBadRequest(e echo.Context) error
SendHTTPBadRequest sends a 400
func SendHTTPOkWithBody ¶
func SendHTTPOkWithBody(e echo.Context, payload interface{}) error
SendHTTPOkWithBody sends a 200 with payload
func SendHTTPStatusCreated ¶
func SendHTTPStatusCreated(e echo.Context) error
SendHTTPStatusCreated sends a 201
func SendHTTPStatusInternalServerError ¶
func SendHTTPStatusInternalServerError(e echo.Context) error
SendHTTPStatusService
func SendHTTPStatusServiceUnavailable ¶
func SendHTTPStatusServiceUnavailable(e echo.Context) error
SendHTTPStatusServiceUnavailable sends a 503
func SendHTTPWithMessage ¶
func SendHTTPWithMessage(e echo.Context, status models.HTTPStatus) error
SendHTTPWithMessage takes in an http code and message and sends it to client
func SendHTTPWithPayload ¶
func SendHTTPWithPayload(e echo.Context, status models.HTTPStatus, payload interface{}) error
SendHTTPWithPayload takes in an http code and sends it to the client with an associated payload
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.