hikvision

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HikCamera

type HikCamera struct {
	Name        string `json:"name"`
	Url         string `json:"url"`
	Username    string `json:"username"`
	Password    string `json:"password"`
	EventReader HikEventReader
	BrokenHttp  bool
	AuthMethod  HttpAuthMethod
}

type HikEvent

type HikEvent struct {
	Type    string
	Message string
	Camera  *HikCamera
}

type HikEventReader

type HikEventReader interface {
	ReadEvents(camera *HikCamera, channel chan<- HikEvent, callback func())
}

type HttpAuthMethod added in v1.2.3

type HttpAuthMethod int
const (
	Basic HttpAuthMethod = iota
	Digest
)

type HttpEventReader

type HttpEventReader struct {
	Debug bool
	// contains filtered or unexported fields
}

func (*HttpEventReader) ReadEvents

func (eventReader *HttpEventReader) ReadEvents(camera *HikCamera, channel chan<- HikEvent, callback func())

type Server

type Server struct {
	Debug          bool
	WaitGroup      *sync.WaitGroup
	Cameras        *[]HikCamera
	MessageHandler func(cameraName string, eventType string, extra string)
}

func (*Server) Start

func (server *Server) Start()

type TcpEventReader

type TcpEventReader struct {
	Debug bool
}

func (*TcpEventReader) ReadEvents

func (eventReader *TcpEventReader) ReadEvents(camera *HikCamera, channel chan<- HikEvent, callback func())

type XmlEvent

type XmlEvent struct {
	XMLName     xml.Name  `xml:"EventNotificationAlert"`
	IpAddress   string    `xml:"ipAddress"`
	Port        int       `xml:"portNo"`
	ChannelId   int       `xml:"channelID"`
	Time        time.Time `xml:"dateTime"`
	Id          int       `xml:"activePostCount"`
	Type        string    `xml:"eventType"`
	State       string    `xml:"eventState"`
	Description string    `xml:"eventDescription"`
	Active      bool
	Camera      *HikCamera
}

Jump to

Keyboard shortcuts

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