rest

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MqttGetOverallPath     = "/api/v1/mqtt/stat/overall"
	MqttGetOnlinePath      = "/api/v1/mqtt/stat/online"
	MqttGetClientPath      = "/api/v1/mqtt/clients/{id}"
	MqttGetBlacklistPath   = "/api/v1/mqtt/blacklist"
	MqttAddBlacklistPath   = "/api/v1/mqtt/blacklist/{id}"
	MqttDelBlacklistPath   = "/api/v1/mqtt/blacklist/{id}"
	MqttPublishMessagePath = "/api/v1/mqtt/message"
	MqttGetConfigPath      = "/api/v1/mqtt/config"
)

Variables

This section is empty.

Functions

func Error

func Error(w http.ResponseWriter, code int, err string)

func Ok

func Ok(w http.ResponseWriter, data any)

Types

type Handler

type Handler = func(http.ResponseWriter, *http.Request)

type Rest

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

func New

func New(server *mqtt.Server) *Rest

func (*Rest) GenHandlers

func (s *Rest) GenHandlers() map[string]Handler

Jump to

Keyboard shortcuts

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