api

package
v0.0.0-...-fcdb7e7 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New(port int) *API

func (*API) AddHandler

func (a *API) AddHandler(pattern string, handler func(http.ResponseWriter, *http.Request))

func (*API) AddMessage

func (a *API) AddMessage(message string)

func (*API) Listen

func (a *API) Listen() error

func (*API) Stop

func (a *API) Stop() error

type ErrorResponse

type ErrorResponse struct {
	StatusCode int    `json:"status_code"`
	Reason     string `json:"reason"`
}

Jump to

Keyboard shortcuts

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