services

package
v0.0.0-...-aa13637 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2020 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy(c *gin.Context)

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

func Index(c *gin.Context)

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

func Show(c *gin.Context)

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

func Store(c *gin.Context)

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

func Update(c *gin.Context)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL