routes

package
v0.0.0-...-db3a1d9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSize          = 500
	FirstPage        = 0
	SizeURLParamName = "size"
	PageURLParamName = "page"
)
View Source
const (
	HealthCheckURL = "/health"
)

Variables

This section is empty.

Functions

func CalculateHTTPStatusCode

func CalculateHTTPStatusCode(err error) int

We should develop a custom exception on the repository layer. But we rely on kubernetes exceptions for now. TODO: implement Legion exceptions

func SetUpHealthCheck

func SetUpHealthCheck(server *gin.Engine)

func SetUpIndexPage

func SetUpIndexPage(server *gin.Engine)

func SetUpPrometheus

func SetUpPrometheus(server *gin.Engine)

func SetUpSwagger

func SetUpSwagger(server *gin.Engine)

func URLParamsToFilter

func URLParamsToFilter(c *gin.Context, filter interface{}, fields map[string]int) (size int, page int, err error)

Types

type HTTPResult

type HTTPResult struct {
	// Success of error message
	Message string `json:"message"`
}

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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