api

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRouter

func CreateRouter(ctx context.Context, cacheInSeconds int) *gin.Engine

func Echo

func Echo(ctx context.Context, c *gin.Context)

func ExecuteListener

func ExecuteListener(ctx context.Context, c *gin.Context, listener listener.ListenerInterface)

func Health

func Health(c *gin.Context)

AddAccount godoc @Summary API Health @Description API Health response @Tags health @Accept json @Produce json @Param user body model.HealthResponse true "Health" @Success 200 {object} model.HealthResponse @Router /health [post]

func Home

func Home(ctx context.Context, c *gin.Context)

AddAccount godoc @Summary API Health @Description API Health response @Tags health @Accept json @Produce json @Param user body model.HealthResponse true "Health" @Success 200 {object} model.HealthResponse @Router /health [post]

func Ready

func Ready(c *gin.Context)

AddAccount godoc @Summary API Health @Description API Health response @Tags health @Accept json @Produce json @Param user body model.HealthResponse true "Health" @Success 200 {object} model.HealthResponse @Router /health [post]

func RequestIdMiddleware

func RequestIdMiddleware() gin.HandlerFunc

func Start

func Start(ctx context.Context, router *gin.Engine, cfg *config.ServerConfiguration, listeningAddr string) error

func TraceLogsMiddleware

func TraceLogsMiddleware() gin.HandlerFunc

func WriteResponse

func WriteResponse(log *zap.SugaredLogger, status int, errD []http.ErrorDetail, c *gin.Context, cfg *config.ServerConfiguration)

Types

type HealthResponse

type HealthResponse struct {
	Status string `json:"status" yaml:"status"`
}

Jump to

Keyboard shortcuts

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