servers

package
v0.0.0-...-32e545c Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Healthcheck

func Healthcheck(c *gin.Context)

func New

func New(ctx context.Context, conf *Config) (*http.Server, error)

Types

type Config

type Config struct {
	Host string
	Port int
}

type GenericResponse

type GenericResponse struct {
	Status *string  `json:"status,omitempty" yaml:"status,omitempty" example:"OK"`
	Errors []string `json:"errors,omitempty" yaml:"errors,omitempty" example:"[\"error1\", \"error2\"]"`
}

type Handler

type Handler interface {
	Healthcheck(c *gin.Context)
}

type HealthcheckResponse

type HealthcheckResponse struct {
	Status string `json:"status" example:"OK"`
}

type PageInfo

type PageInfo struct {
	HasNextPage bool `json:"has_next_page"`
	HasPrevPage bool `json:"has_prev_page"`
	TotalRecord int  `json:"total_record"`
	TotalPage   *int `json:"total_page,omitempty"`
}

Jump to

Keyboard shortcuts

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