api

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 Route added in v1.4.0

type Route struct {
	Method      string
	Path        string
	HandlerFunc HandlerFunc
}

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