Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigCanSet(name string) bool
- func ConfigGet(param string) (interface{}, error)
- func ConfigList() (map[string]interface{}, error)
- func ConfigSet(name string, value string) error
- func ConfigWrite() error
- func DisableMotionDetection() error
- func EnableMotionDetection() error
- func GetBaseURL() string
- func GetStreamBaseURL() string
- func Init(configFile string, autostart bool, detection bool) error
- func IsMotionDetectionEnabled() (bool, error)
- func IsStarted() (bool, error)
- func MakeMovie() error
- func Restart() error
- func Shutdown() error
- func Snapshot() (string, error)
- func Startup(motionDetectionStartup bool) error
- func TargetDirGetFile(filename string) (string, error)
- func TargetDirRemoveFile(filename string) error
- func TargetDirSize() (int64, error)
- type TargetDirFile
Constants ¶
View Source
const ( //Read only motion config ConfigWebControlPort = "webcontrol_port" ConfigStreamPort = "stream_port" ConfigStreamAuthMethod = "stream_auth_method" ConfigStreamAuthentication = "stream_authentication" ConfigWebControlHTML = "webcontrol_html_output" ConfigWebControlParms = "webcontrol_parms" ConfigWebControlAuthentication = "webcontrol_authentication" ConfigProcessIdFile = "process_id_file" ConfigTargetDir = "target_dir" ConfigPictureType = "picture_type" )
View Source
const ( DetectionStatusRegex = "Camera [0-9]+ Detection status (ACTIVE|PAUSE)" DetectionResumedRegex = "Camera [0-9]+ Detection resumed\nDone\n" DetectionPausedRegex = "Camera [0-9]+ Detection paused\nDone\n" DetectionActiveRegex = "Camera [0-9]+ Detection status ACTIVE" DetectionPauseRegex = "Camera [0-9]+ Detection status PAUSE" SnapshotDetectionRegex = "snapshot for thread [0-9]\nDone" )
View Source
const (
KeyValueRegex = "[a-zA-Z0-9_%\\/\\-()]"
)
Variables ¶
View Source
var ConfigTypeMapper = func(s string) interface{} { integer, err := strconv.Atoi(s) if err == nil { return integer } switch s { case "true": return true case "on": return true case "false": return false case "off": return false case "(null)": return nil default: return s } }
View Source
var ReverseConfigTypeMapper = func(s string) interface{} {
switch s {
case "true":
return "on"
case "false":
return "off"
case "null":
return ""
default:
return s
}
}
Functions ¶
func ConfigCanSet ¶
func ConfigList ¶
func ConfigWrite ¶
func ConfigWrite() error
func DisableMotionDetection ¶
func DisableMotionDetection() error
func EnableMotionDetection ¶
func EnableMotionDetection() error
func GetBaseURL ¶
func GetBaseURL() string
func GetStreamBaseURL ¶
func GetStreamBaseURL() string
func TargetDirGetFile ¶ added in v0.0.9
func TargetDirRemoveFile ¶ added in v0.0.9
func TargetDirSize ¶ added in v0.0.9
Types ¶
type TargetDirFile ¶ added in v0.0.9
type TargetDirFile struct { Name string `json:"name"` CreationTime time.Time `json:"creationDate"` }
func TargetDirListFiles ¶ added in v0.0.9
func TargetDirListFiles() ([]TargetDirFile, error)
Click to show internal directories.
Click to hide internal directories.