status

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package status implements for web the module to publish the status with version and other extras

Index

Constants

This section is empty.

Variables

View Source
var (
	// VERSION string on status API
	VERSION string = ""
	// UP function to detect, if API is healthy
	UP func() bool = func() bool {
		return true
	}
	// EXTRAS show more informations in status
	EXTRAS interface{} = nil
)

Functions

func Register

func Register(r *gin.Engine, ws *web.Service)

Register status module @Summary Show Status of current API @Description Show version and status @Tags status @Produce json @Success 200 {object} Status @Failure 400 {object} web.HTTPError @Failure 404 {object} web.HTTPError @Router /api/status [get]

Types

type Status

type Status struct {
	Version string      `json:"version"`
	Up      bool        `json:"up"`
	Extras  interface{} `json:"extras,omitempty"`
}

Status API response

Jump to

Keyboard shortcuts

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