Documentation ¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) CreateTask(task api.InitialTaskDescription) (taskID string, err error)
- func (c *Client) CreateTaskWithContext(ctx context.Context, task api.InitialTaskDescription) (taskID string, err error)
- func (c *Client) DeepPing() error
- func (c *Client) DeepPingWithContext(ctx context.Context) error
- func (c *Client) DeleteTask(userID, taskID string) (err error)
- func (c *Client) DeleteTaskWithContext(ctx context.Context, userID, taskID string) (err error)
- func (c *Client) Dial(host, port string, opts ...grpc.DialOption) (err error)
- func (c *Client) GetAllTasks(userID string) (out []api.TaskDescription, err error)
- func (c *Client) GetAllTasksWithContext(ctx context.Context, userID string) (out []api.TaskDescription, err error)
- func (c *Client) GetLatestNodeData(input api.GetLatestNodeDataInput) (*api.NodeData, error)
- func (c *Client) GetLatestNodeDataWithContext(ctx context.Context, input api.GetLatestNodeDataInput) (nodeData *api.NodeData, err error)
- func (c *Client) GetNodeData(input api.GetNodeDataInput) (out []api.NodeData, err error)
- func (c *Client) GetNodeDataStream(input api.GetNodeDataStreamInput, dc chan<- api.GetNodeDataStreamOutput) (err error)
- func (c *Client) GetNodeDataStreamWithContext(ctx context.Context, input api.GetNodeDataStreamInput, ...) (err error)
- func (c *Client) GetNodeDataWithContext(ctx context.Context, input api.GetNodeDataInput) (out []api.NodeData, err error)
- func (c *Client) GetTaskStream(input api.GetTaskStreamInput, dc chan<- api.GetTaskStreamOutput) (err error)
- func (c *Client) GetTaskStreamWithContext(ctx context.Context, input api.GetTaskStreamInput, ...) (err error)
- func (c *Client) GetUncompletedTasks(userID string) (out []api.TaskDescription, err error)
- func (c *Client) GetUncompletedTasksByHierarchy(nodeID string) (out []api.TaskDescription, err error)
- func (c *Client) GetUncompletedTasksByHierarchyWithContext(ctx context.Context, nodeID string) (out []api.TaskDescription, err error)
- func (c *Client) GetUncompletedTasksWithContext(ctx context.Context, userID string) (out []api.TaskDescription, err error)
- func (c *Client) IngestNodeData(input api.IngestNodeDataInput) (err error)
- func (c *Client) IngestNodeDataStream(inputChannel <-chan api.IngestNodeDataStreamInput) (err error)
- func (c *Client) IngestNodeDataStreamWithContext(ctx context.Context, inputChannel <-chan api.IngestNodeDataStreamInput) (err error)
- func (c *Client) IngestNodeDataWithContext(ctx context.Context, input api.IngestNodeDataInput) (err error)
- func (c *Client) SetTaskCompleted(userID, taskID string) (err error)
- func (c *Client) SetTaskCompletedWithContext(ctx context.Context, userID, taskID string) (err error)
- func (c *Client) SetTaskStatus(input api.SetTaskStatusInput) (err error)
- func (c *Client) SetTaskStatusWithContext(ctx context.Context, input api.SetTaskStatusInput) (err error)
- type IoTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateTask ¶
func (c *Client) CreateTask(task api.InitialTaskDescription) (taskID string, err error)
func (*Client) CreateTaskWithContext ¶
func (*Client) DeepPingWithContext ¶
func (*Client) DeleteTask ¶
func (*Client) DeleteTaskWithContext ¶
func (*Client) GetAllTasks ¶
func (c *Client) GetAllTasks(userID string) (out []api.TaskDescription, err error)
func (*Client) GetAllTasksWithContext ¶
func (*Client) GetLatestNodeData ¶
func (*Client) GetLatestNodeDataWithContext ¶
func (*Client) GetNodeData ¶
func (*Client) GetNodeDataStream ¶ added in v1.0.0
func (c *Client) GetNodeDataStream(input api.GetNodeDataStreamInput, dc chan<- api.GetNodeDataStreamOutput) (err error)
func (*Client) GetNodeDataStreamWithContext ¶ added in v1.0.0
func (c *Client) GetNodeDataStreamWithContext(ctx context.Context, input api.GetNodeDataStreamInput, dc chan<- api.GetNodeDataStreamOutput) (err error)
func (*Client) GetNodeDataWithContext ¶
func (*Client) GetTaskStream ¶
func (c *Client) GetTaskStream(input api.GetTaskStreamInput, dc chan<- api.GetTaskStreamOutput) (err error)
func (*Client) GetTaskStreamWithContext ¶
func (c *Client) GetTaskStreamWithContext(ctx context.Context, input api.GetTaskStreamInput, dc chan<- api.GetTaskStreamOutput) (err error)
func (*Client) GetUncompletedTasks ¶
func (c *Client) GetUncompletedTasks(userID string) (out []api.TaskDescription, err error)
func (*Client) GetUncompletedTasksByHierarchy ¶
func (c *Client) GetUncompletedTasksByHierarchy(nodeID string) (out []api.TaskDescription, err error)
func (*Client) GetUncompletedTasksByHierarchyWithContext ¶
func (*Client) GetUncompletedTasksWithContext ¶
func (*Client) IngestNodeData ¶
func (c *Client) IngestNodeData(input api.IngestNodeDataInput) (err error)
func (*Client) IngestNodeDataStream ¶ added in v1.0.0
func (c *Client) IngestNodeDataStream(inputChannel <-chan api.IngestNodeDataStreamInput) (err error)
func (*Client) IngestNodeDataStreamWithContext ¶ added in v1.0.0
func (*Client) IngestNodeDataWithContext ¶
func (*Client) SetTaskCompleted ¶
func (*Client) SetTaskCompletedWithContext ¶
func (*Client) SetTaskStatus ¶
func (c *Client) SetTaskStatus(input api.SetTaskStatusInput) (err error)
SetTaskStatus will set the status of the task.
SetTaskStatusInput: task_id uuid (required) user_id uuid (required) status TaskStatus (required) - allowed values: NOT_SENT, SENT, RECEIVED, IN_PROGRESS, COMPLETED updated_at int (optional) - UNIX timestamp in ms
func (*Client) SetTaskStatusWithContext ¶
type IoTClient ¶
type IoTClient interface { Dial(host, port string, opts ...grpc.DialOption) error Close() DeepPing() error DeepPingWithContext(ctx context.Context) error CreateTask(task api.InitialTaskDescription) (string, error) CreateTaskWithContext(ctx context.Context, task api.InitialTaskDescription) (string, error) DeleteTask(userID, taskID string) error DeleteTaskWithContext(ctx context.Context, userID, taskID string) error SetTaskCompleted(userID, taskID string) error SetTaskCompletedWithContext(ctx context.Context, userID, taskID string) error GetAllTasks(userID string) ([]api.TaskDescription, error) GetAllTasksWithContext(ctx context.Context, userID string) ([]api.TaskDescription, error) GetUncompletedTasks(userID string) ([]api.TaskDescription, error) GetUncompletedTasksWithContext(ctx context.Context, userID string) ([]api.TaskDescription, error) GetUncompletedTasksByHierarchy(nodeID string) (out []api.TaskDescription, err error) GetUncompletedTasksByHierarchyWithContext(ctx context.Context, nodeID string) (out []api.TaskDescription, err error) SetTaskStatus(input api.SetTaskStatusInput) (err error) SetTaskStatusWithContext(ctx context.Context, input api.SetTaskStatusInput) (err error) GetTaskStream(input api.GetTaskStreamInput, dc chan<- api.GetTaskStreamOutput) (err error) GetTaskStreamWithContext(ctx context.Context, input api.GetTaskStreamInput, dc chan<- api.GetTaskStreamOutput) (err error) IngestNodeData(input api.IngestNodeDataInput) error IngestNodeDataWithContext(ctx context.Context, input api.IngestNodeDataInput) error IngestNodeDataStream(c <-chan api.IngestNodeDataStreamInput) error IngestNodeDataStreamWithContext(ctx context.Context, c <-chan api.IngestNodeDataStreamInput) error GetLatestNodeData(input api.GetLatestNodeDataInput) (*api.NodeData, error) GetLatestNodeDataWithContext(ctx context.Context, input api.GetLatestNodeDataInput) (*api.NodeData, error) GetNodeData(input api.GetNodeDataInput) ([]api.NodeData, error) GetNodeDataWithContext(ctx context.Context, input api.GetNodeDataInput) ([]api.NodeData, error) GetNodeDataStream(input api.GetNodeDataStreamInput, c chan<- api.GetNodeDataStreamOutput) error GetNodeDataStreamWithContext(ctx context.Context, input api.GetNodeDataStreamInput, c chan<- api.GetNodeDataStreamOutput) error }
func CreateClient ¶
func CreateClient() IoTClient
Click to show internal directories.
Click to hide internal directories.