api

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 HandlerFunc

type HandlerFunc func(mux *http.ServeMux, conf *config.Config) http.Handler

HandlerFunc custom function handler

type Info

type Info struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

Info API informations model structure.

type Route

type Route struct {
	Path        string
	HandlerFunc HandlerFunc
	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