api

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestClient

type RequestClient struct {
	// contains filtered or unexported fields
}

func NewRequestClient

func NewRequestClient(apiConfig config.ApiConfig, storage storage.Storage, networkChan chan *model.NetworkUsage, registerChan chan model.DeviceStatusResponse) *RequestClient

func (*RequestClient) AddDeviceTags added in v1.1.7

func (r *RequestClient) AddDeviceTags(deviceName string, tags map[string]string) (*emptypb.Empty, error)

func (*RequestClient) AddTaskTags

func (r *RequestClient) AddTaskTags(task string, tags map[string]string) (*emptypb.Empty, error)

func (*RequestClient) CheckCloneFile

func (r *RequestClient) CheckCloneFile(recordName, fileName, sha256 string) bool

func (*RequestClient) CheckDeviceStatus

func (r *RequestClient) CheckDeviceStatus(device string, exchangeCode string) (exist bool, state openDpsV1alpha1Enum.DeviceAuthorizeStateEnum_DeviceAuthorizeState, e error)

func (*RequestClient) CountDiagnosisRuleHits

func (r *RequestClient) CountDiagnosisRuleHits(rule *openDpsV1alpha1Resource.DiagnosisRule, device string) (int32, error)

func (*RequestClient) CreateRecord

func (*RequestClient) CreateTask

func (r *RequestClient) CreateTask(projectName string, task *openDpsV1alpha1Resource.Task) (*openDpsV1alpha1Resource.Task, error)

func (*RequestClient) ExchangeDeviceAuthToken

func (r *RequestClient) ExchangeDeviceAuthToken(device string, exchangeCode string) (string, int64, error)

func (*RequestClient) GenerateSecurityToken

func (r *RequestClient) GenerateSecurityToken(project string) (*openStorV1alpha1Service.GenerateSecurityTokenResponse, error)

func (*RequestClient) GetConfigMapWithCache

func (r *RequestClient) GetConfigMapWithCache(name string) (*openDpsV1alpha1Resource.ConfigMap, error)

func (*RequestClient) GetDevice

func (r *RequestClient) GetDevice(name string) (*openDpsV1alpha1Resource.Device, error)

func (*RequestClient) GetNetworkChan

func (r *RequestClient) GetNetworkChan() chan *model.NetworkUsage

func (*RequestClient) HitDiagnosisRule

func (r *RequestClient) HitDiagnosisRule(rule *openDpsV1alpha1Resource.DiagnosisRule, device string, upload bool) error

func (*RequestClient) ListDeviceDiagnosisRules

func (r *RequestClient) ListDeviceDiagnosisRules(device string) ([]*openDpsV1alpha1Resource.DiagnosisRule, error)

func (*RequestClient) ListDeviceTasks

func (r *RequestClient) ListDeviceTasks(deviceName string, state *openDpsV1alpha1Enum.TaskStateEnum_TaskState, category string) ([]*openDpsV1alpha1Resource.Task, error)

func (*RequestClient) ObtainEvent

func (r *RequestClient) ObtainEvent(projectName string, event *openDpsV1alpha1Resource.Event) (*openDpsV1alpha1Resource.Event, error)

func (*RequestClient) RegisterDevice

func (r *RequestClient) RegisterDevice(device *openDpsV1alpha1Resource.Device, orgSlug, projectSlug string) (*openDpsV1alpha1Resource.Device, string, error)

func (*RequestClient) SendHeartbeat

func (r *RequestClient) SendHeartbeat(deviceName string, cosVersion string, networks *openDpsV1alpha1Service.NetworkUsage, extraInfo map[string]string) (*emptypb.Empty, error)

func (*RequestClient) SyncTask added in v1.1.1

func (r *RequestClient) SyncTask(projectName, taskName string) (*openDpsV1alpha1Resource.Task, error)

func (*RequestClient) TriggerDeviceEvent

func (r *RequestClient) TriggerDeviceEvent(projectName string, deviceEvent *openAnaV1alpha1Resource.DeviceEvent) error

func (*RequestClient) UpdateRecordLabels

func (r *RequestClient) UpdateRecordLabels(projectName, recordName string, labels []string) (*openDpsV1alpha1Resource.Record, error)

func (*RequestClient) UpdateTaskState

func (*RequestClient) UpsertTask added in v1.1.1

func (r *RequestClient) UpsertTask(projectName string, task *openDpsV1alpha1Resource.Task) (*openDpsV1alpha1Resource.Task, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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