server

package
v1.1.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig added in v1.1.0

func GetConfig(key string) (string, error)

func Liveness added in v1.0.5

func Liveness(c *gin.Context)

Liveness is a simple endpoint to check if the server is alive @Summary Get liveness status of the microservice @Description Get liveness status of the microservice @Tags Kubernetes @Success 200 {string} string @Router /live [get]

func Product added in v1.0.15

func Product(c *gin.Context)

Product returns a product from the database @Summary Get a product @Description Get a product @Tags Products @Produce json @Param id path string true "Product ID" @Success 200 {object} object @Failure 400 {string} string @Failure 500 {string} string @Router /v1/{id} [get]

func Products

func Products(c *gin.Context)

Products returns a list of products from the database @Summary Get a list of products @Description Get a list of products @Tags Products @Produce json @Success 200 {array} object @Failure 400 {string} string @Failure 500 {string} string @Router /v1/all [get]

func Readiness added in v1.0.3

func Readiness(c *gin.Context)

Readiness is a simple endpoint to check if the server is ready @Summary Get readiness status of the microservice @Description Get readiness status of the microservice @Tags Kubernetes @Success 200 {string} string @Failure 503 {string} string @Router /ready [get]

func Run

func Run(ctx context.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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