Documentation ¶
Index ¶
- Variables
- func ValidTaskStatus(status string) bool
- func ValidateSetTaskStatusInput(input iotgrpcapi.SetTaskStatusInput) error
- type Device
- type Node
- type NodeDataAndPair
- type Task
- func (task *Task) FromGRPC(td iotgrpcapi.TaskDescription)
- func (task *Task) FromGRPCInitial(request iotgrpcapi.InitialTaskDescription) (err error)
- func (task Task) ToGRPC() iotgrpcapi.TaskDescription
- func (task Task) ToGRPCInitial() iotgrpcapi.InitialTaskDescription
- func (task Task) Validate() (err error)
- type Tasks
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTaskInvalidDueDate = errors.New("Invalid due date, not unix timestamp in ms") ErrTaskInvalidUserID = errors.New("Required field 'userId' is invalid") ErrTaskInvalidExternalID = errors.New("Required field 'externalId' is invalid") ErrTaskFLIDsAndNodeIdsEmpty = errors.New("'FunctionalLocationIds' or 'NodeIds' must contain at least one value") ErrTaskFLIDsAndNodeIdsFilledIn = errors.New("'FunctionalLocationIds' and 'NodeIds' cannot contain values") ErrTaskFLAndNodeIdsNilEmpty = errors.New("Both 'functionalLocationIds' and 'NodeIDs' cannot be nil/empty") ErrTaskInvalidHierarchy = errors.New("Required field 'hierarchyId' is invalid") ErrTaskInvalidID = errors.New("Required field 'id' is invalid") ErrTaskInvalidkTaskStatus = fmt.Errorf("Field 'taskstatus' is invalid, valid statuses: %v", validTaskStatuses) ErrTaskInvalidkTaskStatusUpdatedAt = errors.New("Invalid taskStatusUpdateAt, not unix timestamp in ms") ErrTaskNodeTypeEmpty = errors.New("Nodetype cannot be empty when 'NodeIds' is used") )
Functions ¶
func ValidTaskStatus ¶
func ValidateSetTaskStatusInput ¶
func ValidateSetTaskStatusInput(input iotgrpcapi.SetTaskStatusInput) error
Types ¶
type NodeDataAndPair ¶
type NodeDataAndPair struct { NodeData iotgrpcapi.NodeData `json:"nodeData"` NodeId string `json:"nodeId"` }
type Task ¶
type Task struct { ID uuid.UUID `json:"id"` Name string `json:"name"` HierarchyID uuid.UUID `json:"hierarchyId"` DueDate int64 `json:"dueDate"` IsCompleted bool `json:"isCompleted"` UserID uuid.UUID `json:"userId"` FunctionalLocationIDs []uuid.UUID `json:"functionalLocationIds"` ExternalID uuid.UUID `json:"externalId"` TaskStatus string `json:"taskStatus"` TaskStatusUpdatedAt int64 `json:"taskStatusUpdatedAt"` LongID int64 `json:"longId"` Nodes []Node `json:"nodeIds"` }
func (*Task) FromGRPC ¶
func (task *Task) FromGRPC(td iotgrpcapi.TaskDescription)
func (*Task) FromGRPCInitial ¶
func (task *Task) FromGRPCInitial(request iotgrpcapi.InitialTaskDescription) (err error)
func (Task) ToGRPC ¶
func (task Task) ToGRPC() iotgrpcapi.TaskDescription
func (Task) ToGRPCInitial ¶
func (task Task) ToGRPCInitial() iotgrpcapi.InitialTaskDescription
type Tasks ¶
type Tasks []Task
func (Tasks) FilterOnUncompleted ¶
func (Tasks) ToGRPC ¶
func (tasks Tasks) ToGRPC() (td *iotgrpcapi.TaskDescriptions)
Click to show internal directories.
Click to hide internal directories.