Documentation ¶
Index ¶
- Constants
- func Login(cfg Config, username, password string) (tokenCookie *http.Cookie, _ error)
- type ActionFrame
- type ActionKind
- type Config
- type EventDataFrame
- type HeaderCompression
- type HeaderPacketType
- type HeaderPayloadFormat
- type LoginRequest
- type ModelKeyKind
- type PacketHeader
- type UpdateListener
- type UpdatePayload
Constants ¶
View Source
const ( PacketTypeActionFrame HeaderPacketType = 1 PacketTypeDataFrame HeaderPacketType = 2 FormatJSONObject HeaderPayloadFormat = 1 FormatUTF8String HeaderPayloadFormat = 2 FormatNodeBuffer HeaderPayloadFormat = 3 Uncompressed HeaderCompression = 0 Compressed HeaderCompression = 1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionFrame ¶
type ActionFrame struct { Action ActionKind `json:"action"` ModelKey ModelKeyKind `json:"modelKey"` NewUpdateID string `json:"newUpdateId"` Score int `json:"score"` Camera string `json:"camera"` ID string `json:"id"` }
type ActionKind ¶
type ActionKind string
const ( ActionKindAdd ActionKind = "add" ActionKindUpdate ActionKind = "update" )
type EventDataFrame ¶
type HeaderCompression ¶
type HeaderCompression byte
type HeaderPacketType ¶
type HeaderPacketType byte
type HeaderPayloadFormat ¶
type HeaderPayloadFormat byte
type LoginRequest ¶
type ModelKeyKind ¶
type ModelKeyKind string
const ( ModelKeyEvent ModelKeyKind = "event" ModelKeyNVR ModelKeyKind = "nvr" ModelKeyCamera ModelKeyKind = "camera" ModelKeyUser ModelKeyKind = "user" )
type PacketHeader ¶
type PacketHeader struct { Type HeaderPacketType Format HeaderPayloadFormat Compression HeaderCompression Reserved byte PayloadSize uint32 }
type UpdateListener ¶
type UpdateListener struct { C chan UpdatePayload // contains filtered or unexported fields }
func NewUpdateListener ¶
type UpdatePayload ¶
type UpdatePayload struct { Header PacketHeader ActionFrame ActionFrame SecondaryHeader PacketHeader DataFrame []byte }
Click to show internal directories.
Click to hide internal directories.