comStruct

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ButtonMessage

type ButtonMessage struct {
	Status   string
	T        time.Time
	Override string
}

type ClientConfig

type ClientConfig struct {
	Server     ClientConfigServer
	Local      ClientConfigLocal
	Record     ClientConfigRecord
	BlockChain ClientConfigBlockChain
	MasterKey  string
}

type ClientConfigBlockChain

type ClientConfigBlockChain struct {
	Port int
}

type ClientConfigLocal

type ClientConfigLocal struct {
	Id            string
	Sn            string
	RecordFolder  string
	UploadFolder  string
	ConvertFolder string
	SenderFolder  string
}

type ClientConfigRecord

type ClientConfigRecord struct {
	Device         string
	UseDummyDevice bool
	UseDummyFile   string
	Height         int
	Width          int
	FPS            int
	RecordLimit    int
	ShareFramePath string
}

type ClientConfigServer

type ClientConfigServer struct {
	IoT string
	Upd string
}

type ClientStatus

type ClientStatus struct {
	DeviceId   string `bson:"devid"`
	DeviceName string `bson:"name"`   //设备编号 B201
	Status     string `bson:"status"` //设备状态 busy, idle, offline

	DeviceIsWarmUp    bool `bson:"warmup"` // 设备热机(自动过程)
	DeviceIsBuffering bool `bson:"buffer"` // 设备缓冲(自动过程)
	DeviceIsRecording bool `bson:"record"` // 设备录像(手动控制)
	DeviceIsEncoding  bool `bson:"encode"` // 设备编码(自动过程)
	DeviceIsUploading bool `bson:"upload"` // 设备上传(自动过程)

	DataSpaces    string `bson:"space"`   // 剩余数据空间
	NetworkStatus string `bson:"network"` // 网络状态
	DiskStatus    string `bson:"disk"`    // 磁盘状态
	UploadTasks   string `bson:"task"`    // 上传数据队列
	MachineStatus string `bson:"machine"` // 设备信息

	CurrentRecordFrames int    `bson:"rec_frames"` // 当前录制帧数
	CurrentUploadFile   string `bson:"uploading"`  // 正在上传的文件

	LastUpload UploadRecord `bson:"last_file"`   // 上次上传文件信息
	LastTalk   time.Time    `bson:"last_report"` // 上次心跳时间

	Logs []Log // 待上传日志

	LatestCuid string `bson:"last_command"` // 最近指令序号
	Version    string `bson:"version"`      // 客户端软件版本
}

type ClientUpdate

type ClientUpdate struct {
	Reinstall bool
	Downgrade bool
	Version   string
}

type Device

type Device struct {
	ID      string
	SN      string
	Version string
}

type Frame

type Frame struct {
	Data  []byte
	Index int
}

type Log

type Log struct {
	Time    time.Time
	Module  string
	Level   string
	Message string
}

type MboxRegister

type MboxRegister struct {
	Id   string
	Code string
}

type MboxRegisterResponse

type MboxRegisterResponse struct {
	Platform   string
	Config     ClientConfig
	DeviceName string
	UseVersion string
}

type Message

type Message struct {
	Type      string      `json:"type"`
	Data      interface{} `json:"data"`
	Time      time.Time   `json:"time"`
	Signature string      `json:"signature"`
}

type MessagePacket

type MessagePacket struct {
	Time         time.Time
	Type         string
	Cuid         string
	Data         []byte
	DataCompress bool
	Success      bool
	Message      string
}

type NetworkStatus

type NetworkStatus struct {
	Online   bool
	Ethernet bool
}

type ServerBeep

type ServerBeep struct {
	Script string
}

type ServerCapture

type ServerCapture struct {
	UploadUrl string
	Filename  string
	Height    int
	Width     int
	Remark    string
	SandBox   string
}

type ServerCommand

type ServerCommand struct {
	Command string
	Params  []string
	Output  string
	Error   string
	Success bool
}

type ServerFile

type ServerFile struct {
	Filename  string
	Content   []byte
	Checksum  string
	Path      string
	Overwrite bool

	MultiVolume      bool
	MultiVolumeCount int
	MultiVolumeMaps  []int
	MVTotalBytes     int

	Success bool
}

type ServerRecord

type ServerRecord struct {
	UploadUrl string
	Filename  string
	Duration  int
	Height    int
	Width     int
	Remark    string
}

type ServerRemoteSSH

type ServerRemoteSSH struct {
	RemoteServer string
	RemotePort   int
	AccessKey    string
}

type ServerResponseJson

type ServerResponseJson struct {
	Data    interface{} `json:"data"`
	Code    int         `json:"code"`
	Message string      `json:"msg"`
}

type ServerRxDeviceCommand

type ServerRxDeviceCommand struct {
	Command      string
	Width        int
	Height       int
	Fps          int
	BufferTimeMs int
	Error        string
	Success      bool
}

type ServerUpload

type ServerUpload struct {
	Message string
	Success bool
}

type TaskDetail

type TaskDetail struct {
	Index        int
	Name         string
	OriginalFile string
	GroupHash    string
	Hash         string
	Size         int64
	URL          string
	Uploading    bool
	Result       bool
	Time         time.Time
	Duration     time.Duration
	Details      []TaskDetail
}

type UploadRecord

type UploadRecord struct {
	Time     time.Time // 上传时间
	Filemask string    // 文件掩码
	Filename string    // 原始名
	Filetype string    //文件类型
}

type VideoRawDescribe

type VideoRawDescribe struct {
	FPS       int
	Height    int
	Width     int
	Format    string
	Size      int
	Frames    int
	Target    string
	TimeStart time.Time
	TimeStop  time.Time
	Finish    bool
	Remark    string
	URL       string
}

type WatchdogRequest

type WatchdogRequest struct {
	Id              string
	Sn              string
	VersionCore     string
	VersionWatchdog string
	RemoteSshPort   int
	Message         string
}

type WatchdogResponse

type WatchdogResponse struct {
	EnableAutoReboot            bool
	EnableRemoteSSH             bool
	ForceUpgradeCoreVersion     string
	ForceUpgradeWatchdogVersion string
	ReportDuration              time.Duration
	RemoteSshConfigure          ServerRemoteSSH
	Message                     string
}

Jump to

Keyboard shortcuts

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