vernemqtt

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger added in v0.0.22

func GetLogger() *slog.Logger

func InitWebhooks

func InitWebhooks(config configuration.Config, connector *platform_connector_lib.Connector, connectionLogger connectionlog.Logger, handlers []handler.Handler, connectionLimit *connectionlimit.ConnectionLimitHandler) *http.Server

InitWebhooks doc @title Senergy-Connector-Webhooks @description webhooks for vernemqtt; all responses are with code=200, differences in swagger doc are because of technical incompatibilities of the documentation format @version 0.1 @license.name Apache 2.0 @license.url http://www.apache.org/licenses/LICENSE-2.0.html @BasePath /

Types

type DisconnectCommand added in v0.0.50

type DisconnectCommand struct {
	Username string `json:"username"`
}

type DisconnectWebhookMsg

type DisconnectWebhookMsg struct {
	ClientId string `json:"client_id"`
}

type EmptyResponse added in v0.0.53

type EmptyResponse struct{}

type ErrorResponse added in v0.0.53

type ErrorResponse struct {
	Result ErrorResponseResult `json:"result"`
}

type ErrorResponseResult added in v0.0.53

type ErrorResponseResult struct {
	Error string `json:"error"`
}

type LoginWebhookMsg

type LoginWebhookMsg struct {
	PeerAddr     string `json:"peer_addr"`
	PeerPort     int    `json:"peer_port"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	ClientId     string `json:"client_id"`
	CleanSession bool   `json:"clean_session"` //v4
	CleanStart   bool   `json:"clean_start"`   //v5
}

type OkResponse added in v0.0.53

type OkResponse struct {
	Result string `json:"result" example:"ok" default:"ok"`
}

type OnlineWebhookMsg

type OnlineWebhookMsg struct {
	ClientId string `json:"client_id"`
}

type PublishWebhookMsg

type PublishWebhookMsg struct {
	Username string `json:"username"`
	ClientId string `json:"client_id"`
	Topic    string `json:"topic"`
	Payload  string `json:"payload"`
	Qos      int    `json:"qos"`
}

type RedirectModifiers added in v0.0.53

type RedirectModifiers struct {
	Topic   string `json:"topic"`
	Payload string `json:"payload" example:"base-64-encoded-payload"`
	Retain  bool   `json:"retain"`
	Qos     int    `json:"qos"`
}

type RedirectResponse added in v0.0.53

type RedirectResponse struct {
	Result    string            `json:"result" example:"ok" default:"ok"`
	Modifiers RedirectModifiers `json:"modifiers"`
}

type SubscribeWebhookMsg

type SubscribeWebhookMsg struct {
	Username string            `json:"username"`
	ClientId string            `json:"client_id"`
	Topics   []WebhookmsgTopic `json:"topics"`
}

type Subscription added in v0.0.50

type Subscription struct {
	ClientId string `json:"client_id"`
	User     string `json:"user"`
	Topic    string `json:"topic"`
	IsOnline bool   `json:"is_online"`
}

type SubscriptionResponse added in v0.0.53

type SubscriptionResponse struct {
	Result string            `json:"result" example:"ok" default:"ok"`
	Topics []WebhookmsgTopic `json:"topics"`
}

type SubscriptionWrapper added in v0.0.50

type SubscriptionWrapper struct {
	Table []Subscription `json:"table"`
}

type UnsubResponse added in v0.0.53

type UnsubResponse struct {
	Result string   `json:"result" example:"ok" default:"ok"`
	Topics []string `json:"topics"`
}

type UnsubscribeWebhookMsg

type UnsubscribeWebhookMsg struct {
	Username string   `json:"username"`
	Topics   []string `json:"topics"`
}

type WebhookmsgTopic

type WebhookmsgTopic struct {
	Topic string `json:"topic"`
	Qos   int64  `json:"qos"`
}

Jump to

Keyboard shortcuts

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