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) UpdateCreate(ctx *gin.Context) }
Handler defines methods for categories to interact with the server.
type Options ¶
Options defines the handler for all options routes.
func (*Options) Find ¶
Find
Returns http.StatusOK if there are no options or success. Returns http.StatusBadRequest if there was name param was missing. Returns http.StatusInternalServerError if there was an error getting the options.
func (*Options) List ¶
List
Returns http.StatusOK if there are no options or success. Returns http.StatusInternalServerError if there was an error getting the options.
func (*Options) UpdateCreate ¶
UpdateCreate
Restarts the server at the end of the request to flush options.
Returns http.StatusOK if the options was created/updated. Returns http.StatusBadRequest if the validation failed on both structs. Returns http.StatusInternalServerError if there was an error updating/creating the options.