status

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("Status not found")
)

Functions

This section is empty.

Types

type IHandler added in v1.3.1

type IHandler interface {
	Get(string) (*Status, error)
}

func NewHandler added in v1.3.3

func NewHandler(repo repository, cfg *config.Config) IHandler

type Service added in v1.3.1

type Service struct {
	Handler IHandler
}

func (*Service) Get added in v1.3.1

func (c *Service) Get(ctx echo.Context) error

Get godoc @Summary Get Status @Description get status given a site id @Tags Status @Accept json @Produce json @Param id path int true "Site ID" @Success 200 {object} Status @Failure 400 {object} httperror.HTTPError @Failure 404 {object} httperror.HTTPError @Failure 500 {object} httperror.HTTPError @Router /api/status/{name} [get]

type Status

type Status struct {
	Name string `json:"name"`
	IsUp bool   `json:"isUp"`
	IP   string `json:"ip"`
}

Jump to

Keyboard shortcuts

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