Documentation
¶
Index ¶
- type CollectInfo
- type CollectInfoCut
- type CollectInfoMoment
- type DeviceStatusResponse
- type FileInfo
- type Moment
- type NetworkUsage
- func (nu *NetworkUsage) AddReceived(n int64)
- func (nu *NetworkUsage) AddSent(n int64)
- func (nu *NetworkUsage) GetTotalReceived() int64
- func (nu *NetworkUsage) GetTotalSent() int64
- func (nu *NetworkUsage) ReduceReceived(n int64) int64
- func (nu *NetworkUsage) ReduceSent(n int64) int64
- func (nu *NetworkUsage) Reset()
- type RecordCache
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectInfo ¶
type CollectInfo struct {
ProjectName string `json:"project_name" yaml:"project_name"`
Record map[string]interface{} `json:"record" yaml:"record"`
Labels []string `json:"labels" yaml:"labels"`
DiagnosisTask map[string]interface{} `json:"diagnosis_task" yaml:"diagnosis_task"`
Cut *CollectInfoCut `json:"cut" yaml:"cut"`
Moments []CollectInfoMoment `json:"moments" yaml:"moments"`
Skip bool `json:"skip" yaml:"skip"`
// id field does not need to be serialized
Id string `json:"-" yaml:"-"`
}
func (*CollectInfo) Clean ¶
func (ci *CollectInfo) Clean() string
func (*CollectInfo) GetFilePath ¶
func (ci *CollectInfo) GetFilePath() string
func (*CollectInfo) Load ¶
func (ci *CollectInfo) Load(id string) error
func (*CollectInfo) Save ¶
func (ci *CollectInfo) Save() error
type CollectInfoCut ¶
type CollectInfoMoment ¶
type CollectInfoMoment struct {
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
Timestamp float64 `json:"timestamp" yaml:"timestamp"`
StartTime float64 `json:"start_time" yaml:"start_time"`
CustomFields map[string]string `json:"custom_fields" yaml:"custom_fields"`
Code string `json:"code" yaml:"code"`
CreateTask bool `json:"create_task" yaml:"create_task"`
SyncTask bool `json:"sync_task" yaml:"sync_task"`
AssignTo string `json:"assign_to" yaml:"assign_to"` //todo: change to assignee
}
type DeviceStatusResponse ¶ added in v1.1.3
type Moment ¶
type Moment struct {
Name string `json:"name" yaml:"name"`
IsNew bool `json:"is_new" yaml:"is_new"`
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
// Timestamp seconds
Timestamp float64 `json:"timestamp" yaml:"timestamp"`
// Duration seconds
Duration float64 `json:"duration" yaml:"duration"`
Metadata map[string]string `json:"metadata" yaml:"metadata"`
Task Task `json:"task" yaml:"task"`
Event map[string]interface{} `json:"event" yaml:"event"`
Code string `json:"code" yaml:"code"`
RuleName string `json:"rule_name" yaml:"rule_name"`
}
type NetworkUsage ¶
func (*NetworkUsage) AddReceived ¶
func (nu *NetworkUsage) AddReceived(n int64)
func (*NetworkUsage) AddSent ¶
func (nu *NetworkUsage) AddSent(n int64)
func (*NetworkUsage) GetTotalReceived ¶
func (nu *NetworkUsage) GetTotalReceived() int64
func (*NetworkUsage) GetTotalSent ¶
func (nu *NetworkUsage) GetTotalSent() int64
func (*NetworkUsage) ReduceReceived ¶
func (nu *NetworkUsage) ReduceReceived(n int64) int64
func (*NetworkUsage) ReduceSent ¶
func (nu *NetworkUsage) ReduceSent(n int64) int64
func (*NetworkUsage) Reset ¶
func (nu *NetworkUsage) Reset()
type RecordCache ¶
type RecordCache struct {
Uploaded bool `json:"uploaded" yaml:"uploaded"`
Skipped bool `json:"skipped" yaml:"skipped"`
EventCode string `json:"event_code" yaml:"event_code"`
ProjectName string `json:"project_name" yaml:"project_name"`
// Timestamp milliseconds
Timestamp int64 `json:"timestamp" yaml:"timestamp"`
Labels []string `json:"labels" yaml:"labels"`
Record map[string]interface{} `json:"record" yaml:"record"`
Moments []Moment `json:"moments" yaml:"moments"`
UploadTask map[string]interface{} `json:"task" yaml:"task"`
DiagnosisTask map[string]interface{} `json:"diagnosis_task" yaml:"diagnosis_task"`
// key is absolute file path, value is file info
OriginalFiles map[string]FileInfo `json:"files" yaml:"files"`
UploadedFilePaths []string `json:"uploaded_filepaths" yaml:"uploaded_filepaths"`
// randomPostfix is used to avoid conflict when creating cache folder
RandomPostfix string `json:"random_postfix" yaml:"random_postfix"`
// contains filtered or unexported fields
}
func (*RecordCache) Clean ¶
func (rc *RecordCache) Clean() string
func (*RecordCache) GetBaseFolder ¶
func (rc *RecordCache) GetBaseFolder() string
func (*RecordCache) GetRecordCachePath ¶
func (rc *RecordCache) GetRecordCachePath() string
func (*RecordCache) Reload ¶
func (rc *RecordCache) Reload() (*RecordCache, error)
func (*RecordCache) Save ¶
func (rc *RecordCache) Save() error
type Task ¶
type Task struct {
ShouldCreate bool `json:"should_create" yaml:"should_create"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
RecordName string `json:"record_name" yaml:"record_name"`
Assignee string `json:"assignee" yaml:"assignee"`
SyncTask bool `json:"sync_task" yaml:"sync_task"`
}
Click to show internal directories.
Click to hide internal directories.