Documentation ¶
Index ¶
- func NoResponse(_ *mqtt_client.MqttClient, _ *router.Item, _ Identifier, _ any, _ error)
- func SendIDResponse[T IDType](c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, ...)
- func SendInfoResponse[T any](c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, ...)
- func SendInfosResponse[T any](c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, ...)
- func SendMapResponse(c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, ...)
- func SendMsgResponse(c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, ...)
- func SendString(c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, ...)
- func StructToMap(originStruct any) map[string]any
- func WriteBytes(c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, ...)
- type IDResponse
- type IDType
- type Identifier
- type InfoResponse
- type InfosData
- type InfosResponse
- type MsgResponse
- type SendFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoResponse ¶
func NoResponse(_ *mqtt_client.MqttClient, _ *router.Item, _ Identifier, _ any, _ error)
func SendIDResponse ¶
func SendIDResponse[T IDType](c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, id T, err error)
func SendInfoResponse ¶
func SendInfoResponse[T any](c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, info T, err error)
func SendInfosResponse ¶
func SendInfosResponse[T any](c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, data InfosData[T], err error)
func SendMapResponse ¶
func SendMapResponse(c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, data map[string]any, err error)
func SendMsgResponse ¶
func SendMsgResponse(c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, _ any, err error)
func SendString ¶
func SendString(c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, data string, err error)
func StructToMap ¶
func WriteBytes ¶
func WriteBytes(c *mqtt_client.MqttClient, item *router.Item, responseIdentifier Identifier, bytes []byte, err error)
Types ¶
type IDResponse ¶
type IDResponse[T IDType] struct { MsgResponse ID T `json:"id"` }
type Identifier ¶ added in v1.3.9
type Identifier interface {
Identifier() string
}
type InfoResponse ¶
type InfoResponse[T any] struct { MsgResponse Info T `json:"info"` }
type InfosResponse ¶
type InfosResponse[T any] struct { MsgResponse InfosData[T] }
type MsgResponse ¶
type SendFunc ¶
type SendFunc[T any] func(c *mqtt_client.MqttClient, item *router.Item, identifier Identifier, data T, err error)
Click to show internal directories.
Click to hide internal directories.