api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeChat = iota + 1
)

Variables

This section is empty.

Functions

func HygrothermographCreator

func HygrothermographCreator() broker.Any

func RegisterHygrothermographHandler

func RegisterHygrothermographHandler(fnc HygrothermographHandler) broker.Handler

func RegisterHygrothermographJsonHandler

func RegisterHygrothermographJsonHandler(fnc HygrothermographHandler) broker.Handler

func RegisterHygrothermographRawHandler

func RegisterHygrothermographRawHandler(fnc HygrothermographHandler) broker.Handler

Types

type ChatMessage

type ChatMessage struct {
	Type    int    `json:"type"`
	Sender  string `json:"sender"`
	Message string `json:"message"`
}

type Hygrothermograph

type Hygrothermograph struct {
	Humidity    float64 `json:"humidity"`
	Temperature float64 `json:"temperature"`
}

type HygrothermographHandler

type HygrothermographHandler func(_ context.Context, topic string, headers broker.Headers, msg *Hygrothermograph) error

Jump to

Keyboard shortcuts

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