routes

package
v0.0.0-...-a7e29d5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

type Endpoints struct {
	DBConn *sql.DB
}

Endpoints is a marker for defining REST API routes

func NewEndpoints

func NewEndpoints() *Endpoints

NewEndpoints provides handle to the REST URI defined in this API

func (*Endpoints) CloudWorkerRequests

func (e *Endpoints) CloudWorkerRequests(c *gin.Context)

CloudWorkerRequests godoc @Summary Cloud Workers and the total number of messages processed by them @Description List of all the Cloud Workers and total number of messages processed by them @Tags worker @Produce json @Success 200 {object} data.CloudWorkerRequests "The total number of requests processed by each cloud" @Router /workers/cloud [get]

func (*Endpoints) Live

func (e *Endpoints) Live(c *gin.Context)

Live godoc @Summary Checks the API liveness @Description Checks the API liveness, can be used with Kubernetes Probes @Tags health @Produce json @Success 200 {object} string @Router /health/live [get]

func (*Endpoints) Ready

func (e *Endpoints) Ready(c *gin.Context)

Ready godoc @Summary Checks the API readiness @Description Checks the API readiness, can be used with Kubernetes Probes @Tags health @Produce json @Success 200 {object} string @Router /health/ready [get]

func (*Endpoints) Responses

func (e *Endpoints) Responses(c *gin.Context)

Responses godoc @Summary Retrieves all responses processed by the backend @Description Retrieves all responses processed by the backend sorted by timestamp @Tags worker @Produce json @Success 200 {object} data.CloudWorkers "Processed response data" @Router /workers/all [get]

func (*Endpoints) SendRequest

func (e *Endpoints) SendRequest(c *gin.Context)

SendRequest godoc @Summary builds and send request message to backend @Description builds and send request message to backend for processing @Tags backend @Accept json @Param message body data.Request true "Message to process" @Success 202 {object} data.Response @Failure 400 {object} utils.HTTPError @Router /send-request [post]

Jump to

Keyboard shortcuts

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