infrastructure

package
v0.0.0-...-efbd42f Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller definition.

func NewController

func NewController(serv *infrastructure.Service) *Controller

NewController creates a Controller instance.

func (*Controller) HealthCheck

func (c *Controller) HealthCheck(ctx *fiber.Ctx) error

HealthCheck is the HTTP route handler for the endpoint `GET /api/v1/health`. HealthCheck godoc @Description Health check @Tags deltaswapscan @ID health-check @Success 200 {object} object{status=string} @Failure 400 @Failure 500 @Router /api/v1/health [get]

func (*Controller) ReadyCheck

func (c *Controller) ReadyCheck(ctx *fiber.Ctx) error

ReadyCheck is the HTTP handler for the endpoint `GET /api/v1/ready`. ReadyCheck godoc @Description Ready check @Tags deltaswapscan @ID ready-check @Success 200 {object} object{ready=string} @Failure 400 @Failure 500 @Router /api/v1/ready [get]

func (*Controller) Version

func (c *Controller) Version(ctx *fiber.Ctx) error

Version is the HTTP route handler for the endpoint `GET /api/v1/version`. Version godoc @Description Get version/release information. @Tags deltaswapscan @ID get-version @Success 200 {object} VersionResponse @Failure 400 @Failure 500 @Router /api/v1/version [get]

type VersionResponse

type VersionResponse struct {
	BuildDate string `json:"build_date"`
	Build     string `json:"build"`
	Branch    string `json:"branch"`
	Machine   string `json:"machine"`
	User      string `json:"user"`
}

VersionResponse is the JSON model for the 200 OK response in `GET /api/v1/version`.

Jump to

Keyboard shortcuts

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