Documentation
¶
Overview ¶
Package axisevents simplifies the configuration of events such as record video to sd-card when the device detects motion detection
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { // With specify your Do function. With(do func(req *http.Request)) Command // ExecuteOn the event on the specified device. ExecuteOn(ctx context.Context, device Device) error }
Command executes the request.
type Device ¶
type Device struct { Username string Password string Address string // Address must be in format of http://ip/ or http://hostname/ or if the device is configured for ssl https://ip/ }
Device holds the connection info for the device
type HttpNotificationHandler ¶
type HttpNotificationHandler struct {
// contains filtered or unexported fields
}
HttpNotificationHandler configures the querystring e.g. http://192.168.1.106?Message=testing&source=livingroom
func (*HttpNotificationHandler) Notify ¶
func (h *HttpNotificationHandler) Notify(message string, parameters string) *RecipientsHandler
func (*HttpNotificationHandler) NotifyEmptyQueryString ¶
func (h *HttpNotificationHandler) NotifyEmptyQueryString() *RecipientsHandler
type MotionDetectionHandler ¶
type MotionDetectionHandler struct {
// contains filtered or unexported fields
}
func NewMotionDetectionHandler ¶
func NewMotionDetectionHandler( name string, enabled bool, version int, ) *MotionDetectionHandler
NewMotionDetectionHandler creates a new MotionDetectionHandler which is used to define what happens when a device detects motion.
Supported versions: 2,3,4 defaults to version 2 Supported actions: Record video to the device SD-card.
func (*MotionDetectionHandler) HttpNotification ¶
func (h *MotionDetectionHandler) HttpNotification() *HttpNotificationHandler
HttpNotification sends http notifications when motion is detected.
func (*MotionDetectionHandler) Record ¶
func (h *MotionDetectionHandler) Record() RecordVideoHandler
Record motion.
func (*MotionDetectionHandler) VideoClip ¶
func (h *MotionDetectionHandler) VideoClip() *SendVideoClipper
Send video clip.
type RecipientsHandler ¶
type RecipientsHandler struct {
// contains filtered or unexported fields
}
type RecordVideoHandler ¶
type RecordVideoHandler interface { Video() SdCardHandler VideoCustom(prebuffer int, postbuffer int, streamprofile string) SdCardHandler }
RecordVideoHandler settings for the video.
type SdCardHandler ¶
type SdCardHandler interface {
SdCard() Command
}
SdCardHandler record to the device sd-card.
type SendVideoClipper ¶
type SendVideoClipper struct {
// contains filtered or unexported fields
}
func (*SendVideoClipper) Send ¶
func (h *SendVideoClipper) Send( filename string, customParams string, folder string, prebuffer int, postbuffer int, ) *RecipientsHandler
func (*SendVideoClipper) SendDefault ¶
func (h *SendVideoClipper) SendDefault( filename string, customParams string, ) *RecipientsHandler