api

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsRouter

func NewMetricsRouter() *http.ServeMux

NewRouter creates metrics router

func NewRouter

func NewRouter(conf *config.Config) *http.ServeMux

NewRouter creates router with declared routes

func Shutdown

func Shutdown()

Shutdown set API as stopped

func Start

func Start()

Start set API as started

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Authority string `json:"authority"`
	VAPID     string `json:"vapid"`
}

Info API informations model structure.

type Route

type Route struct {
	Path        string
	Handler     http.Handler
	Middlewares []middleware.Middleware
}

Route is the structure of an HTTP route definition

type Routes

type Routes []Route

Routes is a list of Route

Jump to

Keyboard shortcuts

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