adapter

package
v0.0.0-...-53ee791 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPAdapter

type HTTPAdapter struct {
	Host string
}

func (*HTTPAdapter) Get

func (adapter *HTTPAdapter) Get(params core.ServiceValues) (core.ServiceValues, error)

Get - запрашивает данные

func (*HTTPAdapter) Post

func (adapter *HTTPAdapter) Post(values core.ServiceValues) error

Post - отправляет данные в сервис

type MQTTClient

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

func NewMqttClient

func NewMqttClient(opts MQTTClientOptions) (*MQTTClient, error)

func (*MQTTClient) DoCommand

func (mc *MQTTClient) DoCommand(commander core.CommandReader) error

func (*MQTTClient) SubscribePortIn

func (mc *MQTTClient) SubscribePortIn(ID uint8, handler core.MessageHandlerCallback) error

type MQTTClientOptions

type MQTTClientOptions struct {
	Address  string
	ClientID *string
	Password string
}

type MegadPortInMessage

type MegadPortInMessage struct {
	Port  int    `json:"port"`
	Mode  int8   `json:"m"`
	Value string `json:"value"`
	Click int8   `json:"click,omitempty"`
	Count int32  `json:"cnt"`
}

Jump to

Keyboard shortcuts

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