common

package
v0.0.0-...-76c1feb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Routes = lib.Routes{
	lib.Route{
		Method:      "OPTIONS",
		HandlerFunc: optionsHandler,
	},

	lib.Route{
		Name:        "versions",
		Method:      "GET",
		Path:        "/versions",
		HandlerFunc: VersionsHandler,
	},

	lib.Route{
		Name:        "healthcheck",
		Method:      "GET",
		Path:        "/health",
		HandlerFunc: HealthCheck,
	},

	lib.Route{
		Name:        "swagger.json",
		Method:      "GET",
		Path:        "/swagger.json",
		HandlerFunc: SwaggerJSON,
	},

	lib.Route{
		Name:        "genesis",
		Method:      "GET",
		Path:        "/genesis",
		HandlerFunc: GenesisJSON,
	},
}

Routes are routes that are common for all versions

Functions

func GenesisJSON

func GenesisJSON(ctx lib.ReqContext, context echo.Context)

GenesisJSON is an httpHandler for route GET /genesis

func HealthCheck

func HealthCheck(ctx lib.ReqContext, context echo.Context)

HealthCheck is an httpHandler for route GET /health

func Metrics

func Metrics(ctx lib.ReqContext, context echo.Context)

Metrics returns data collected by util/metrics

func SwaggerJSON

func SwaggerJSON(ctx lib.ReqContext, context echo.Context)

SwaggerJSON is an httpHandler for route GET /swagger.json

func VersionsHandler

func VersionsHandler(ctx lib.ReqContext, context echo.Context)

VersionsHandler is an httpHandler for route GET /versions

Types

type VersionsResponse

type VersionsResponse struct {
	// in: body
	Body common.Version
}

VersionsResponse is the response to 'GET /versions'

swagger:response VersionsResponse

func (VersionsResponse) GetError

func (r VersionsResponse) GetError() error

GetError allows VersionResponse to satisfy the APIV1Response interface, even though it can never return an error and is not versioned

Jump to

Keyboard shortcuts

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