Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Destroy ¶
Destroy delete a service from db
Destroy godoc @Summary Destroy Service @Description Destroy a service according to sid @ID Services.Destroy @Security ApiKeyAuth @Tags Services @Accept json @Produce json @Param sid path uint true "Service ID" @Param Authorization header string true "Access Token" @Success 200 {object} destroyResponse @Failure 403 {object} handler.ErrorResponse @Failure 500 {object} handler.ErrorResponse @Router /services/{sid} [delete]
func Index ¶
Index list out all services and return
Index godoc @Summary All Services @Description Simply list out all Services @ID Services.Index @Security ApiKeyAuth @Tags Services @Accept json @Produce json @Param Authorization header string true "Access Token" @Success 200 {object} indexResponse @Failure 403 {object} handler.ErrorResponse @Failure 500 {object} handler.ErrorResponse @Router /services [get]
func Show ¶
Show a Service
Show godoc @Summary Show Service @Description Show a service according to nid @ID Services.Show @Security ApiKeyAuth @Tags Services @Accept json @Produce json @Param nid path uint true "Services ID" @Param Authorization header string true "Access Token" @Success 200 {object} serviceResponse @Failure 403 {object} handler.ErrorResponse @Failure 500 {object} handler.ErrorResponse @Router /services/{nid} [get]
func Store ¶
Store recieve a service object and store it in DB
Store godoc @Summary Create Service @Description Create a service from post json object @ID Services.Store @Security ApiKeyAuth @Tags Services @Accept json @Produce json @Param service body storeRequest true "Service Object" @Param Authorization header string true "Access Token" @Success 200 {object} serviceResponse @Failure 403 {object} handler.ErrorResponse @Failure 500 {object} handler.ErrorResponse @Router /services [post]
func Update ¶
Update receive a id and a service object from request and update the specific record in DB
Update godoc @Summary Update Service @Description Update a Service @ID Services.Update @Security ApiKeyAuth @Tags Services @Accept json @Produce json @Param sid path uint true "Service ID" @Param service body models.Service true "Service Object" @Param Authorization header string true "Access Token" @Success 200 {object} serviceResponse @Failure 403 {object} handler.ErrorResponse @Failure 500 {object} handler.ErrorResponse @Router /services/{nid} [patch]
Types ¶
This section is empty.