dahuamqtt

package
v0.0.0-...-72e33f6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

func NewConn

func NewConn(mqtt mqtt.Conn, haEnable bool, haTopic mqtt.Topic) Conn

func (Conn) Register

func (c Conn) Register(hub *bus.Hub) Conn

func (Conn) Serve

func (c Conn) Serve(ctx context.Context) error

func (Conn) String

func (Conn) String() string

func (Conn) Sync

func (c Conn) Sync(ctx context.Context) error

type Event

type Event struct {
	ID        int64           `json:"id"`
	DeviceID  int64           `json:"device_id"`
	Code      string          `json:"code"`
	Action    string          `json:"action"`
	Index     int             `json:"index"`
	Data      json.RawMessage `json:"data"`
	CreatedAt time.Time       `json:"created_at"`
	EventType string          `json:"event_type"`
}

func NewEvent

func NewEvent(v repo.DahuaEvent) Event

Jump to

Keyboard shortcuts

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