config

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Email

type Email struct {
	Address        string        `json:"Address"`
	Anonymous      bool          `json:"Anonymous"`
	AttachEnable   bool          `json:"AttachEnable"`
	Authentication bool          `json:"Authentication"`
	CustomTitle    []interface{} `json:"CustomTitle"`
	Enable         bool          `json:"Enable"`
	HealthReport   struct {
		Enable   bool `json:"Enable"`
		Interval int  `json:"Interval"`
	} `json:"HealthReport"`
	OnlyAttachment bool     `json:"OnlyAttachment"`
	Password       string   `json:"Password"`
	Port           int      `json:"Port"`
	Receivers      []string `json:"Receivers"`
	SendAddress    string   `json:"SendAddress"`
	SendInterv     int      `json:"SendInterv"`
	SslEnable      bool     `json:"SslEnable"`
	Title          string   `json:"Title"`
	TLSEnable      bool     `json:"TlsEnable"`
	UserName       string   `json:"UserName"`
}

func (Email) Merge

func (c Email) Merge(js string) (string, error)

func (Email) Validate

func (g Email) Validate() error

type General

type General struct {
	LocalNo           int    `json:"LocalNo"`
	LockLoginEnable   bool   `json:"LockLoginEnable"`
	LockLoginTimes    int    `json:"LockLoginTimes"`
	LoginFailLockTime int    `json:"LoginFailLockTime"`
	MachineName       string `json:"MachineName"`
	MaxOnlineTime     int    `json:"MaxOnlineTime"`
}

func (General) Merge

func (c General) Merge(js string) (string, error)

func (General) Validate

func (c General) Validate() error

type Locales

type Locales struct {
	DSTEnable bool `json:"DSTEnable"`
	DSTEnd    struct {
		Day    int `json:"Day"`
		Hour   int `json:"Hour"`
		Minute int `json:"Minute"`
		Month  int `json:"Month"`
		Week   int `json:"Week"`
		Year   int `json:"Year"`
	} `json:"DSTEnd"`
	DSTStart struct {
		Day    int `json:"Day"`
		Hour   int `json:"Hour"`
		Minute int `json:"Minute"`
		Month  int `json:"Month"`
		Week   int `json:"Week"`
		Year   int `json:"Year"`
	} `json:"DSTStart"`
	TimeFormat string `json:"TimeFormat"`
}

func (Locales) Merge

func (c Locales) Merge(js string) (string, error)

func (Locales) Validate

func (c Locales) Validate() error

type NTP

type NTP struct {
	Address  string `json:"Address"`
	Enable   bool   `json:"Enable"`
	Port     int    `json:"Port"`
	TimeZone int    `json:"TimeZone"`
	// TimeZoneDesc is the description of the TimeZone.
	TimeZoneDesc string `json:"TimeZoneDesc"`
	UpdatePeriod int    `json:"UpdatePeriod"`
}

func (NTP) Merge

func (c NTP) Merge(js string) (string, error)

func (NTP) Validate

func (c NTP) Validate() error

type Record

type Record struct {
	Format        string                   `json:"Format"`
	HolidayEnable bool                     `json:"HolidayEnable"`
	PreRecord     int                      `json:"PreRecord"`
	Redundancy    bool                     `json:"Redundancy"`
	SnapShot      bool                     `json:"SnapShot"`
	Stream        int                      `json:"Stream"`
	TimeSection   [][]dahuarpc.TimeSection `json:"TimeSection"`
}

func (Record) Merge

func (c Record) Merge(js string) (string, error)

func (Record) Validate

func (c Record) Validate() error

type StorageGroup

type StorageGroup struct {
	Channels []struct {
		MaxPictures int         `json:"MaxPictures"`
		Path        interface{} `json:"Path"`
	} `json:"Channels"`
	FileHoldTime    int    `json:"FileHoldTime"`
	Memo            string `json:"Memo"`
	Name            string `json:"Name"`
	OverWrite       bool   `json:"OverWrite"`
	PicturePathRule string `json:"PicturePathRule"`
	RecordPathRule  string `json:"RecordPathRule"`
}

func (StorageGroup) Merge

func (c StorageGroup) Merge(js string) (string, error)

func (StorageGroup) Validate

func (c StorageGroup) Validate() error

type SwitchMode

type SwitchMode int
const (
	SwitchModeGeneral SwitchMode = iota
	SwitchModeDay
	SwitchModeNight
	SwitchModeTime
	SwitchModeBrightness
)

func (SwitchMode) String

func (m SwitchMode) String() string

type VideoAnalyseRule

type VideoAnalyseRule struct {
	Class       string   `json:"Class"`
	Enable      bool     `json:"Enable"`
	ID          int      `json:"Id"`
	Name        string   `json:"Name"`
	ObjectTypes []string `json:"ObjectTypes"`
	PtzPresetID int      `json:"PtzPresetId"`
	TrackEnable bool     `json:"TrackEnable"`
	Type        string   `json:"Type"`
}

type VideoAnalyseRules

type VideoAnalyseRules []VideoAnalyseRule

func (VideoAnalyseRules) Merge

func (c VideoAnalyseRules) Merge(js string) (string, error)

func (VideoAnalyseRules) Validate

func (c VideoAnalyseRules) Validate() error

type VideoInMode

type VideoInMode struct {
	Config      []int                    `json:"Config"`
	Mode        int                      `json:"Mode"`
	TimeSection [][]dahuarpc.TimeSection `json:"TimeSection"`
}

func (VideoInMode) Merge

func (c VideoInMode) Merge(js string) (string, error)

func (*VideoInMode) SetSwitchMode

func (m *VideoInMode) SetSwitchMode(mode SwitchMode)

func (VideoInMode) SwitchMode

func (m VideoInMode) SwitchMode() SwitchMode

func (VideoInMode) Validate

func (c VideoInMode) Validate() error

Jump to

Keyboard shortcuts

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