iot

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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) Close

func (c *Client) Close()

func (*Client) CreateTask

func (c *Client) CreateTask(task iot_grpcapi.InitialTaskDescription) (taskID string, err error)

func (*Client) CreateTaskWithContext

func (c *Client) CreateTaskWithContext(ctx context.Context, task iot_grpcapi.InitialTaskDescription) (taskID string, err error)

func (*Client) DeepPing

func (c *Client) DeepPing() error

func (*Client) DeepPingWithContext

func (c *Client) DeepPingWithContext(ctx context.Context) error

func (*Client) DeleteNodeData

func (c *Client) DeleteNodeData(input iot_grpcapi.DeleteNodeDataInput) (err error)

Delete Node data functions

func (*Client) DeleteNodeDataWithContext

func (c *Client) DeleteNodeDataWithContext(ctx context.Context, input iot_grpcapi.DeleteNodeDataInput) (err error)

func (*Client) DeleteTask

func (c *Client) DeleteTask(userID, taskID string) (err error)

func (*Client) DeleteTaskWithContext

func (c *Client) DeleteTaskWithContext(ctx context.Context, userID, taskID string) (err error)

func (*Client) Dial

func (c *Client) Dial(host, port string, opts ...grpc.DialOption) (err error)

func (*Client) GetAllTasks

func (c *Client) GetAllTasks(userID string) (out []iot_grpcapi.TaskDescription, err error)

func (*Client) GetAllTasksWithContext

func (c *Client) GetAllTasksWithContext(ctx context.Context, userID string) (out []iot_grpcapi.TaskDescription, err error)

func (*Client) GetLatestNodeData

func (c *Client) GetLatestNodeData(input iot_grpcapi.GetLatestNodeDataInput) (*iot_grpcapi.NodeData, error)

func (*Client) GetLatestNodeDataWithContext

func (c *Client) GetLatestNodeDataWithContext(ctx context.Context, input iot_grpcapi.GetLatestNodeDataInput) (nodeData *iot_grpcapi.NodeData, err error)

func (*Client) GetMedia

func (c *Client) GetMedia(input iot_grpcapi.GetMediaInput) (iot_grpcapi.Media, error)

func (*Client) GetMediaWithContext

func (c *Client) GetMediaWithContext(ctx context.Context, input iot_grpcapi.GetMediaInput) (media iot_grpcapi.Media, err error)

func (*Client) GetNodeData

func (c *Client) GetNodeData(input iot_grpcapi.GetNodeDataInput) (out []iot_grpcapi.NodeData, err error)

func (*Client) GetNodeDataLog added in v1.5.5

func (c *Client) GetNodeDataLog(input iot_grpcapi.GetNodeDataLogInput) (output *iot_grpcapi.GetNodeDataLogOutput, err error)

func (*Client) GetNodeDataLogWithContext added in v1.5.5

func (c *Client) GetNodeDataLogWithContext(ctx context.Context, input iot_grpcapi.GetNodeDataLogInput) (output *iot_grpcapi.GetNodeDataLogOutput, err error)

func (*Client) GetNodeDataStream added in v1.0.0

func (c *Client) GetNodeDataStream(input iot_grpcapi.GetNodeDataStreamInput, dc chan<- iot_grpcapi.GetNodeDataStreamOutput) (err error)

func (*Client) GetNodeDataStreamWithContext added in v1.0.0

func (c *Client) GetNodeDataStreamWithContext(ctx context.Context, input iot_grpcapi.GetNodeDataStreamInput, dc chan<- iot_grpcapi.GetNodeDataStreamOutput) (err error)

func (*Client) GetNodeDataWithContext

func (c *Client) GetNodeDataWithContext(ctx context.Context, input iot_grpcapi.GetNodeDataInput) (out []iot_grpcapi.NodeData, err error)

func (*Client) GetTaskByLongId

func (c *Client) GetTaskByLongId(input int64) (output *iot_grpcapi.TaskDescription, err error)

func (*Client) GetTaskByLongIdWithContext

func (c *Client) GetTaskByLongIdWithContext(ctx context.Context, input int64) (output *iot_grpcapi.TaskDescription, err error)

func (*Client) GetTaskByUUID

func (c *Client) GetTaskByUUID(input string) (output *iot_grpcapi.TaskDescription, err error)

func (*Client) GetTaskByUUIDWithContext

func (c *Client) GetTaskByUUIDWithContext(ctx context.Context, input string) (output *iot_grpcapi.TaskDescription, err error)

func (*Client) GetTaskStream

func (c *Client) GetTaskStream(input iot_grpcapi.GetTaskStreamInput, dc chan<- iot_grpcapi.GetTaskStreamOutput) (err error)

func (*Client) GetTaskStreamWithContext

func (c *Client) GetTaskStreamWithContext(ctx context.Context, input iot_grpcapi.GetTaskStreamInput, dc chan<- iot_grpcapi.GetTaskStreamOutput) (err error)

func (*Client) GetTasksByStatus

func (c *Client) GetTasksByStatus(input iot_grpcapi.GetTasksByStatusInput) ([]*iot_grpcapi.TaskDescription, error)

func (*Client) GetTasksByStatusWithContext

func (c *Client) GetTasksByStatusWithContext(ctx context.Context, input iot_grpcapi.GetTasksByStatusInput) (tasks []*iot_grpcapi.TaskDescription, err error)

func (*Client) GetUncompletedTasks

func (c *Client) GetUncompletedTasks(userID string) (out []iot_grpcapi.TaskDescription, err error)

func (*Client) GetUncompletedTasksByHierarchy

func (c *Client) GetUncompletedTasksByHierarchy(nodeID string) (out []iot_grpcapi.TaskDescription, err error)

func (*Client) GetUncompletedTasksByHierarchyWithContext

func (c *Client) GetUncompletedTasksByHierarchyWithContext(ctx context.Context, nodeID string) (out []iot_grpcapi.TaskDescription, err error)

func (*Client) GetUncompletedTasksWithContext

func (c *Client) GetUncompletedTasksWithContext(ctx context.Context, userID string) (out []iot_grpcapi.TaskDescription, err error)

func (*Client) IngestNodeData

func (c *Client) IngestNodeData(input iot_grpcapi.IngestNodeDataInput) (err error)

func (*Client) IngestNodeDataStream added in v1.0.0

func (c *Client) IngestNodeDataStream(inputChannel <-chan iot_grpcapi.IngestNodeDataStreamInput) (err error)

func (*Client) IngestNodeDataStreamWithContext added in v1.0.0

func (c *Client) IngestNodeDataStreamWithContext(ctx context.Context, inputChannel <-chan iot_grpcapi.IngestNodeDataStreamInput) (err error)

func (*Client) IngestNodeDataWithContext

func (c *Client) IngestNodeDataWithContext(ctx context.Context, input iot_grpcapi.IngestNodeDataInput) (err error)

func (*Client) SetTaskCompleted

func (c *Client) SetTaskCompleted(userID, taskID string) (err error)

func (*Client) SetTaskCompletedWithContext

func (c *Client) SetTaskCompletedWithContext(ctx context.Context, userID, taskID string) (err error)

func (*Client) SetTaskStatus

func (c *Client) SetTaskStatus(input iot_grpcapi.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

func (c *Client) SetTaskStatusWithContext(ctx context.Context, input iot_grpcapi.SetTaskStatusInput) (err error)

type IoTClient

type IoTClient interface {
	Dial(host, port string, opts ...grpc.DialOption) error
	Close()

	DeepPing() error
	DeepPingWithContext(ctx context.Context) error

	CreateTask(task iot_grpcapi.InitialTaskDescription) (string, error)
	CreateTaskWithContext(ctx context.Context, task iot_grpcapi.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) ([]iot_grpcapi.TaskDescription, error)
	GetAllTasksWithContext(ctx context.Context, userID string) ([]iot_grpcapi.TaskDescription, error)

	GetUncompletedTasks(userID string) ([]iot_grpcapi.TaskDescription, error)
	GetUncompletedTasksWithContext(ctx context.Context, userID string) ([]iot_grpcapi.TaskDescription, error)

	GetUncompletedTasksByHierarchy(nodeID string) (out []iot_grpcapi.TaskDescription, err error)
	GetUncompletedTasksByHierarchyWithContext(ctx context.Context, nodeID string) (out []iot_grpcapi.TaskDescription, err error)

	SetTaskStatus(input iot_grpcapi.SetTaskStatusInput) (err error)
	SetTaskStatusWithContext(ctx context.Context, input iot_grpcapi.SetTaskStatusInput) (err error)

	GetTaskStream(input iot_grpcapi.GetTaskStreamInput, dc chan<- iot_grpcapi.GetTaskStreamOutput) (err error)
	GetTaskStreamWithContext(ctx context.Context, input iot_grpcapi.GetTaskStreamInput, dc chan<- iot_grpcapi.GetTaskStreamOutput) (err error)

	GetTasksByStatus(input iot_grpcapi.GetTasksByStatusInput) ([]*iot_grpcapi.TaskDescription, error)
	GetTasksByStatusWithContext(ctx context.Context, input iot_grpcapi.GetTasksByStatusInput) ([]*iot_grpcapi.TaskDescription, error)

	GetTaskByUUID(input string) (*iot_grpcapi.TaskDescription, error)
	GetTaskByUUIDWithContext(ctx context.Context, input string) (*iot_grpcapi.TaskDescription, error)

	GetTaskByLongId(input int64) (*iot_grpcapi.TaskDescription, error)
	GetTaskByLongIdWithContext(ctx context.Context, input int64) (*iot_grpcapi.TaskDescription, error)

	GetTasksModifiedSinceTimestamp(input iot_grpcapi.GetTasksModifiedSinceTimestampInput) (*iot_grpcapi.GetTasksModifiedSinceTimestampOutput, error)
	GetTasksModifiedSinceTimestampWithContext(ctx context.Context, input iot_grpcapi.GetTasksModifiedSinceTimestampInput) (*iot_grpcapi.GetTasksModifiedSinceTimestampOutput, error)

	IngestNodeData(input iot_grpcapi.IngestNodeDataInput) error
	IngestNodeDataWithContext(ctx context.Context, input iot_grpcapi.IngestNodeDataInput) error

	IngestNodeDataStream(c <-chan iot_grpcapi.IngestNodeDataStreamInput) error
	IngestNodeDataStreamWithContext(ctx context.Context, c <-chan iot_grpcapi.IngestNodeDataStreamInput) error

	GetLatestNodeData(input iot_grpcapi.GetLatestNodeDataInput) (*iot_grpcapi.NodeData, error)
	GetLatestNodeDataWithContext(ctx context.Context, input iot_grpcapi.GetLatestNodeDataInput) (*iot_grpcapi.NodeData, error)

	GetNodeData(input iot_grpcapi.GetNodeDataInput) ([]iot_grpcapi.NodeData, error)
	GetNodeDataWithContext(ctx context.Context, input iot_grpcapi.GetNodeDataInput) ([]iot_grpcapi.NodeData, error)

	GetNodeDataStream(input iot_grpcapi.GetNodeDataStreamInput, c chan<- iot_grpcapi.GetNodeDataStreamOutput) error
	GetNodeDataStreamWithContext(ctx context.Context, input iot_grpcapi.GetNodeDataStreamInput, c chan<- iot_grpcapi.GetNodeDataStreamOutput) error

	GetMedia(input iot_grpcapi.GetMediaInput) (iot_grpcapi.Media, error)
	GetMediaWithContext(ctx context.Context, input iot_grpcapi.GetMediaInput) (iot_grpcapi.Media, error)

	DeleteNodeData(input iot_grpcapi.DeleteNodeDataInput) error
	DeleteNodeDataWithContext(ctx context.Context, input iot_grpcapi.DeleteNodeDataInput) error

	GetNodeDataLog(input iot_grpcapi.GetNodeDataLogInput) (*iot_grpcapi.GetNodeDataLogOutput, error)
	GetNodeDataLogWithContext(ctx context.Context, input iot_grpcapi.GetNodeDataLogInput) (*iot_grpcapi.GetNodeDataLogOutput, error)
}

func CreateClient

func CreateClient() IoTClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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