api

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPParamsToShellVars added in v1.16.0

func HTTPParamsToShellVars[T url.Values | http.Header](params T) []string

HTTPParamsToShellVars convert URL values to shell vars.

func NewRouter added in v1.4.0

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

NewRouter creates router with declared routes

func Shutdown added in v1.4.0

func Shutdown()

Shutdown set API as stopped

func Start added in v1.4.0

func Start()

Start set API as started

Types

type HandlerFunc added in v1.4.0

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

HandlerFunc custom function handler

type Info added in v1.9.0

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

Info API informations model structure.

type Route added in v1.4.0

type Route struct {
	Path        string
	HandlerFunc HandlerFunc
	Middlewares middleware.Middlewares
}

Route is the structure of an HTTP route definition

type Routes added in v1.4.0

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