Documentation
¶
Index ¶
- type RequestClient
- func (r *RequestClient) AddDeviceTags(deviceName string, tags map[string]string) (*emptypb.Empty, error)
- func (r *RequestClient) AddTaskTags(task string, tags map[string]string) (*emptypb.Empty, error)
- func (r *RequestClient) CheckCloneFile(recordName, fileName, sha256 string) bool
- func (r *RequestClient) CheckDeviceStatus(device string, exchangeCode string) (exist bool, ...)
- func (r *RequestClient) CountDiagnosisRuleHits(rule *openDpsV1alpha1Resource.DiagnosisRule, device string) (int32, error)
- func (r *RequestClient) CreateRecord(parent string, rc *openDpsV1alpha1Resource.Record) (*openDpsV1alpha1Resource.Record, error)
- func (r *RequestClient) CreateTask(projectName string, task *openDpsV1alpha1Resource.Task) (*openDpsV1alpha1Resource.Task, error)
- func (r *RequestClient) ExchangeDeviceAuthToken(device string, exchangeCode string) (string, int64, error)
- func (r *RequestClient) GenerateSecurityToken(project string) (*openStorV1alpha1Service.GenerateSecurityTokenResponse, error)
- func (r *RequestClient) GetConfigMapWithCache(name string) (*openDpsV1alpha1Resource.ConfigMap, error)
- func (r *RequestClient) GetDevice(name string) (*openDpsV1alpha1Resource.Device, error)
- func (r *RequestClient) GetNetworkChan() chan *model.NetworkUsage
- func (r *RequestClient) HitDiagnosisRule(rule *openDpsV1alpha1Resource.DiagnosisRule, device string, upload bool) error
- func (r *RequestClient) ListDeviceDiagnosisRules(device string) ([]*openDpsV1alpha1Resource.DiagnosisRule, error)
- func (r *RequestClient) ListDeviceTasks(deviceName string, state *openDpsV1alpha1Enum.TaskStateEnum_TaskState, ...) ([]*openDpsV1alpha1Resource.Task, error)
- func (r *RequestClient) ObtainEvent(projectName string, event *openDpsV1alpha1Resource.Event) (*openDpsV1alpha1Resource.Event, error)
- func (r *RequestClient) RegisterDevice(device *openDpsV1alpha1Resource.Device, orgSlug, projectSlug string) (*openDpsV1alpha1Resource.Device, string, error)
- func (r *RequestClient) SendHeartbeat(deviceName string, cosVersion string, ...) (*emptypb.Empty, error)
- func (r *RequestClient) SyncTask(projectName, taskName string) (*openDpsV1alpha1Resource.Task, error)
- func (r *RequestClient) TriggerDeviceEvent(projectName string, deviceEvent *openAnaV1alpha1Resource.DeviceEvent) error
- func (r *RequestClient) UpdateRecordLabels(projectName, recordName string, labels []string) (*openDpsV1alpha1Resource.Record, error)
- func (r *RequestClient) UpdateTaskState(name string, state *openDpsV1alpha1Enum.TaskStateEnum_TaskState) (*openDpsV1alpha1Resource.Task, error)
- func (r *RequestClient) UpsertTask(projectName string, task *openDpsV1alpha1Resource.Task) (*openDpsV1alpha1Resource.Task, error)
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 (*RequestClient) AddTaskTags ¶
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 (r *RequestClient) CreateRecord(parent string, rc *openDpsV1alpha1Resource.Record) (*openDpsV1alpha1Resource.Record, error)
func (*RequestClient) CreateTask ¶
func (r *RequestClient) CreateTask(projectName string, task *openDpsV1alpha1Resource.Task) (*openDpsV1alpha1Resource.Task, error)
func (*RequestClient) ExchangeDeviceAuthToken ¶
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 (r *RequestClient) UpdateTaskState(name string, state *openDpsV1alpha1Enum.TaskStateEnum_TaskState) (*openDpsV1alpha1Resource.Task, error)
func (*RequestClient) UpsertTask ¶ added in v1.1.1
func (r *RequestClient) UpsertTask(projectName string, task *openDpsV1alpha1Resource.Task) (*openDpsV1alpha1Resource.Task, error)
Click to show internal directories.
Click to hide internal directories.