types

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReqTypeHeartRate = iota
	ReqTypeBattLevel
	ReqTypeFwVersion
	ReqTypeFwUpgrade
	ReqTypeBtAddress
	ReqTypeNotify
	ReqTypeSetTime
	ReqTypeWatchHeartRate
	ReqTypeWatchBattLevel
	ReqTypeMotion
	ReqTypeWatchMotion
	ReqTypeStepCount
	ReqTypeWatchStepCount
	ReqTypeCancel
	ReqTypeFS
	ReqTypeWeatherUpdate
)
View Source
const (
	UpgradeTypeArchive = iota
	UpgradeTypeFiles
)
View Source
const (
	FSTypeWrite = iota
	FSTypeRead
	FSTypeMove
	FSTypeDelete
	FSTypeList
	FSTypeMkdir
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DFUProgress added in v0.0.3

type DFUProgress struct {
	Received int64 `mapstructure:"recvd"`
	Total    int64 `mapstructure:"total"`
	Sent     int64 `mapstructure:"sent"`
}

type FSTransferProgress added in v0.0.5

type FSTransferProgress struct {
	Type  int    `json:"type" mapstructure:"type"`
	Total uint32 `json:"total" mapstructure:"total"`
	Sent  uint32 `json:"sent" mapstructure:"sent"`
	Done  bool   `json:"done" mapstructure:"done"`
}

type FileInfo added in v0.0.5

type FileInfo struct {
	Name  string `json:"name"`
	Size  int64  `json:"size"`
	IsDir bool   `json:"isDir"`
}

func (FileInfo) String added in v0.0.5

func (fi FileInfo) String() string

type MotionValues added in v0.0.4

type MotionValues struct {
	X int16
	Y int16
	Z int16
}

type ReqDataFS added in v0.0.5

type ReqDataFS struct {
	Type  int      `json:"type"`
	Files []string `json:"files"`
	Data  string   `json:"data,omitempty"`
}

type ReqDataFwUpgrade

type ReqDataFwUpgrade struct {
	Type  int
	Files []string
}

type ReqDataNotify

type ReqDataNotify struct {
	Title string
	Body  string
}

type Request

type Request struct {
	Type int         `json:"type"`
	Data interface{} `json:"data,omitempty"`
}

type Response

type Response struct {
	Type    int         `json:"type"`
	Value   interface{} `json:"value,omitempty"`
	Message string      `json:"msg,omitempty"`
	ID      string      `json:"id,omitempty"`
	Error   bool        `json:"error"`
}

Jump to

Keyboard shortcuts

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