restapi

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: GPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest    = newError("Body invalid")
	ErrUnauthorized  = newError("Unauthorized")
	ErrUninitialized = newError("Uninitialized")
)

Functions

func SetStatsFunc

func SetStatsFunc(s func() tcpip.Stats)

func Start

func Start(addr, token string) error

Types

type HTTPError

type HTTPError struct {
	Message string `json:"message"`
}

HTTPError is custom HTTP error for API

func (*HTTPError) Error

func (e *HTTPError) Error() string

Jump to

Keyboard shortcuts

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