handler

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIRoute      = ""
	StationRoute  = "/station"
	RegistryRoute = "/registry"
)
View Source
const (
	StationVariable = "STATION"
)
View Source
const (
	XAuthKeyHeader = "X-Auth-Key"
)

Variables

View Source
var (
	UnauthorizedResponse      = Response{Message: "unauthorized"}
	RegistriesCreatedResponse = Response{Message: "registries created"}
)

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Controller    *models.Controller
	AlertProducer *memphis.Producer
	*gin.Engine
}

func New

func New(c *models.Controller, p *memphis.Producer) *Handler

func (*Handler) Authorize

func (h *Handler) Authorize(ctx *gin.Context)

func (*Handler) Close

func (h *Handler) Close()

func (*Handler) Registry

func (h *Handler) Registry(ctx *gin.Context)

func (*Handler) Station

func (h *Handler) Station(ctx *gin.Context)

type Response

type Response struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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