iot

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: MIT Imports: 7 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 api.InitialTaskDescription) (taskID string, err error)

func (*Client) CreateTaskWithContext

func (c *Client) CreateTaskWithContext(ctx context.Context, task api.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) 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 []api.TaskDescription, err error)

func (*Client) GetAllTasksWithContext

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

func (*Client) GetLatestNodeData

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

func (*Client) GetLatestNodeDataWithContext

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

func (*Client) GetMedia

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

func (*Client) GetMediaWithContext

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

func (*Client) GetNodeData

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

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 (c *Client) GetNodeDataWithContext(ctx context.Context, input api.GetNodeDataInput) (out []api.NodeData, err error)

func (*Client) GetTaskByLongId

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

func (*Client) GetTaskByLongIdWithContext

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

func (*Client) GetTaskByUUID

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

func (*Client) GetTaskByUUIDWithContext

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

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

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

func (*Client) GetTasksByStatusWithContext

func (c *Client) GetTasksByStatusWithContext(ctx context.Context, input api.GetTasksByStatusInput) (tasks []*api.TaskDescription, 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 (c *Client) GetUncompletedTasksByHierarchyWithContext(ctx context.Context, nodeID string) (out []api.TaskDescription, err error)

func (*Client) GetUncompletedTasksWithContext

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

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 (c *Client) IngestNodeDataStreamWithContext(ctx context.Context, inputChannel <-chan api.IngestNodeDataStreamInput) (err error)

func (*Client) IngestNodeDataWithContext

func (c *Client) IngestNodeDataWithContext(ctx context.Context, input api.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 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

func (c *Client) SetTaskStatusWithContext(ctx context.Context, input api.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 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)

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

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

	GetTaskByLongId(input int64) (*api.TaskDescription, error)
	GetTaskByLongIdWithContext(ctx context.Context, input int64) (*api.TaskDescription, 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

	GetMedia(input api.GetMediaInput) (api.Media, error)
	GetMediaWithContext(ctx context.Context, input api.GetMediaInput) (api.Media, 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