reolink

package
v0.0.0-...-939b314 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// Basic connection details.
	Name string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c *config.Camera) *Client

func (*Client) Download

func (c *Client) Download(file string, out io.Writer) error

func (*Client) List

func (c *Client) List() ([]File, error)

func (*Client) Stream

func (c *Client) Stream(w http.ResponseWriter) (*http.Response, error)

type Error

type Error struct {
	Detail  string `json:"detail"`
	RSPCode int    `json:"rspCode"`
}

type File

type File struct {
	Duration  time.Duration
	EndTime   time.Time
	Name      string
	Size      int
	StartTime time.Time
}

type Param

type Param struct {
	User   *User   `json:"User,omitempty"`
	Search *Search `json:"Search,omitempty"`
}

type Request

type Request struct {
	Command string `json:"cmd"`
	Action  int    `json:"action"`
	Param   Param  `json:"param"`
}

type Response

type Response struct {
	Command string `json:"cmd"`
	Code    int    `json:"code"`
	Value   *Value `json:"value,omitempty"`
	Error   *Error `json:"error,omitempty"`
}
type Search struct {
	Channel    int    `json:"channel"`
	OnlyStatus int    `json:"onlyStatus"`
	StreamType string `json:"streamType"`
	StartTime  Time   `json:"StartTime"`
	EndTime    Time   `json:"EndTime"`
}

type SearchResult

type SearchResult struct {
	File    []SearchResultFile   `json:"File,omitempty"`
	Status  []SearchResultStatus `json:"Status"`
	Channel int                  `json:"channel"`
}

type SearchResultFile

type SearchResultFile struct {
	RawEndTime   Time   `json:"EndTime"`
	RawStartTime Time   `json:"StartTime"`
	FrameRate    int    `json:"frameRate"`
	Height       int    `json:"height"`
	Name         string `json:"name"`
	Size         int    `json:"size"`
	Type         string `json:"type"`
	Width        int    `json:"width"`
}

type SearchResultStatus

type SearchResultStatus struct {
	Month int    `json:"mon"`
	Table string `json:"table"`
	Year  int    `json:"year"`
}

type Time

type Time struct {
	Day    int `json:"day"`
	Hour   int `json:"hour"`
	Minute int `json:"min"`
	Month  int `json:"mon"`
	Second int `json:"sec"`
	Year   int `json:"year"`
}

type Token

type Token struct {
	LeaseTime time.Duration `json:"leaseTime"`
	Name      string        `json:"name"`
}

type User

type User struct {
	Username string `json:"userName"`
	Password string `json:"password"`
}

type Value

type Value struct {
	Token        *Token        `json:"Token,omitempty"`
	SearchResult *SearchResult `json:"SearchResult,omitempty"`
}

Jump to

Keyboard shortcuts

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