status

package
v0.0.0-...-7fde5c4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	apiv1.BaseController
	// contains filtered or unexported fields
}

Controller is a controller implementation for status checks

func NewController

func NewController(bi *build.Info) *Controller

NewController creates new status controller instance

func (*Controller) DefineRoutes

func (ctrl *Controller) DefineRoutes(r gin.IRouter)

DefineRoutes adds controller routes to the router

func (*Controller) GetStatus

func (ctrl *Controller) GetStatus(ctx *gin.Context)

GetStatus godoc @Summary Get Application Status @Description get status @ID get-status @Accept json @Produce json @Success 200 {object} ResponseDoc @Router /api/v1/status [get]

type Response

type Response struct {
	ID     string      `jsonapi:"primary,status"`
	Status string      `jsonapi:"attr,status"`
	Build  *build.Info `jsonapi:"attr,build"`
}

Response is a declaration for a status response

type ResponseDoc

type ResponseDoc struct {
	Data struct {
		Attributes Response `json:"attributes"`
	} `json:"data"`
}

ResponseDoc is a response declaration for documentatino pruposes

Jump to

Keyboard shortcuts

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