tasks

package
v2.52.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type Task

type Task struct {
	Arguments                  map[string]interface{} `json:"Arguments,omitempty"`
	CanRerun                   bool                   `json:"CanRerun"`
	Completed                  string                 `json:"Completed,omitempty"`
	CompletedTime              *time.Time             `json:"CompletedTime,omitempty"`
	Description                string                 `json:"Description,omitempty"`
	Duration                   string                 `json:"Duration,omitempty"`
	ErrorMessage               string                 `json:"ErrorMessage,omitempty"`
	FinishedSuccessfully       *bool                  `json:"FinishedSuccessfully"`
	HasBeenPickedUpByProcessor bool                   `json:"HasBeenPickedUpByProcessor"`
	HasPendingInterruptions    bool                   `json:"HasPendingInterruptions"`
	HasWarningsOrErrors        bool                   `json:"HasWarningsOrErrors"`
	IsCompleted                *bool                  `json:"IsCompleted"`
	LastUpdatedTime            *time.Time             `json:"LastUpdatedTime,omitempty"`
	Name                       string                 `json:"Name,omitempty"`
	QueueTime                  *time.Time             `json:"QueueTime,omitempty"`
	QueueTimeExpiry            *time.Time             `json:"QueueTimeExpiry,omitempty"`
	ServerNode                 string                 `json:"ServerNode,omitempty"`
	SpaceID                    string                 `json:"SpaceId,omitempty"`
	StartTime                  *time.Time             `json:"StartTime,omitempty"`
	State                      string                 `json:"State,omitempty"`

	resources.Resource
}

func NewTask

func NewTask() *Task

NewTask creates and initializes a task.

type TaskService

type TaskService struct {
	services.Service
	// contains filtered or unexported fields
}

func NewTaskService

func NewTaskService(sling *sling.Sling, uriTemplate string, taskTypesPath string) *TaskService

func (*TaskService) Add

func (s *TaskService) Add(task *Task) (*Task, error)

Add creates a new task.

func (*TaskService) Get

func (s *TaskService) Get(tasksQuery TasksQuery) (*resources.Resources[*Task], error)

Get returns a collection of tasks based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

type TasksQuery

type TasksQuery struct {
	Environment             string   `uri:"environment,omitempty" url:"environment,omitempty"`
	HasPendingInterruptions bool     `uri:"hasPendingInterruptions,omitempty" url:"hasPendingInterruptions,omitempty"`
	HasWarningsOrErrors     bool     `uri:"hasWarningsOrErrors,omitempty" url:"hasWarningsOrErrors,omitempty"`
	IDs                     []string `uri:"ids,omitempty" url:"ids,omitempty"`
	IncludeSystem           bool     `uri:"includeSystem,omitempty" url:"includeSystem,omitempty"`
	IsActive                bool     `uri:"active,omitempty" url:"active,omitempty"`
	IsRunning               bool     `uri:"running,omitempty" url:"running,omitempty"`
	Name                    string   `uri:"name,omitempty" url:"name,omitempty"`
	Node                    string   `uri:"node,omitempty" url:"node,omitempty"`
	PartialName             string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Project                 string   `uri:"project,omitempty" url:"project,omitempty"`
	Runbook                 string   `uri:"runbook,omitempty" url:"runbook,omitempty"`
	Skip                    int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Spaces                  []string `uri:"spaces,omitempty" url:"spaces,omitempty"`
	States                  []string `uri:"states,omitempty" url:"states,omitempty"`
	Take                    int      `uri:"take,omitempty" url:"take,omitempty"`
	Tenant                  string   `uri:"tenant,omitempty" url:"tenant,omitempty"`
}

Jump to

Keyboard shortcuts

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