controllers

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllReports

func AllReports(c *gin.Context)

AllReports godoc

@Summary		Get all the reports
@Description	Gets a list of all reports that can be filtered with a query
@ID				all-reports
@Tags			reports
@Param			where	query		string	false	"field.op.value"
@Param			format	query		string	false	"json"
@Success		200		array		validation.Report
@Failure		500		{object}	ErrorResponse
@Router			/api/reports [get]

func GetHealth

func GetHealth(c *gin.Context)

GetHealth godoc

@Summary		Health check
@Description	Get the health status of the API
@ID				health
@Tags			health
@Success		200
@Router			/api/health [get]

func Report

func Report(c *gin.Context)

Report godoc

@Summary		Get one report
@Description	Gets a single report identified by his id
@ID				report
@Tags			reports
@Param			format	query		string	false	"json"
@Param			id		path		string	true	"qNg8rJX"
@Success		200		{object}	validation.Report
@Failure		404		{object}	ErrorResponse
@Failure		500		{object}	ErrorResponse
@Router			/api/reports/:id [get]

func Ws

func Ws(c *gin.Context)

Ws godoc

@Summary		Open a websocket connection to receive notifications
@Description	Connect to this endpoint with the ws:// protocol to instantiate a websocket connection to get updates for new reports
@ID				ws
@Tags			reports
@Success		101
@Router			/api/reports [get]

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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