restapi

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

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