handler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	JWT          *auth.Auth
	Repositories repositories.Repositories
	Threshold    int
	Limit        int
}

func (*Handler) CreateRoutes

func (h *Handler) CreateRoutes(api fiber.Router)

CreateRoutes will generate endpoints of application

func (*Handler) GetAlerts

func (h *Handler) GetAlerts(ctx *fiber.Ctx) error

GetAlerts for a single endpoint.

func (*Handler) GetAllEndpoints

func (h *Handler) GetAllEndpoints(ctx *fiber.Ctx) error

GetAllEndpoints for a user.

func (*Handler) GetEndpointStatus

func (h *Handler) GetEndpointStatus(ctx *fiber.Ctx) error

GetEndpointStatus will return one endpoint status.

func (*Handler) Health

func (h *Handler) Health(ctx *fiber.Ctx) error

Health will return the status of application.

func (*Handler) Login

func (h *Handler) Login(ctx *fiber.Ctx) error

Login a user by return a token. takes a user info request.

func (*Handler) Register

func (h *Handler) Register(ctx *fiber.Ctx) error

Register a user inside application. takes a user info request.

func (*Handler) RegisterEndpoint

func (h *Handler) RegisterEndpoint(ctx *fiber.Ctx) error

RegisterEndpoint will add an endpoint to application. takes a endpoint info request.

func (*Handler) RemoveUserEndpoint

func (h *Handler) RemoveUserEndpoint(ctx *fiber.Ctx) error

RemoveUserEndpoint will remove and endpoint.

Jump to

Keyboard shortcuts

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