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