Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { List(ctx *gin.Context) Find(ctx *gin.Context) Create(ctx *gin.Context) Update(ctx *gin.Context) Delete(ctx *gin.Context) }
Handler defines methods for Redirect routes to interact with the server.
type Redirects ¶
Redirects defines the handler for all redirect routes.
func (*Redirects) Create ¶
Create
Returns http.StatusOK if the redirect was created. Returns http.StatusInternalServerError if there was an error creating the redirect. Returns http.StatusBadRequest if the the validation failed or there was a conflict.
func (*Redirects) Delete ¶
Delete
Returns http.StatusOK if the redirect was deleted. Returns http.StatusInternalServerError if there was an error deleting the redirect. Returns http.StatusBadRequest if the the redirect wasn't found or no ID was passed.
func (*Redirects) Find ¶
Find
Returns http.StatusOK if the redirect was obtained. Returns http.StatusInternalServerError if there as an error obtaining the redirect. Returns http.StatusBadRequest if the ID wasn't passed or failed to convert.
func (*Redirects) List ¶
List
Returns http.StatusOK if there are no redirects or success. Returns http.StatusInternalServerError if there was an error getting the redirects. Returns http.StatusBadRequest if there was conflict or the request was invalid.