api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Server

func Server(server *constant.Server)

Types

type HTTPError

type HTTPError struct {
	Code int64  `json:"Code"`
	Msg  string `json:"Msg"`
}

HTTPError is custom HTTP error for API

func (*HTTPError) Error

func (e *HTTPError) Error() string

type Log

type Log struct {
	Type    string `json:"Type"`
	Payload string `json:"Payload"`
}

type Traffic

type Traffic struct {
	Up   int64 `json:"Up"`
	Down int64 `json:"Down"`
}

Jump to

Keyboard shortcuts

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