Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActivityElement ¶ added in v2.64.3
type ActivityElement struct {
ID string `json:"Id"`
Name string `json:"Name"`
Started *time.Time `json:"Started"`
Ended *time.Time `json:"Ended"`
Status string `json:"Status"`
Children []*ActivityElement `json:"Children"`
ShowAtSummaryLevel bool `json:"ShowAtSummaryLevel"`
LogElements []*ActivityLogElement `json:"LogElements"`
}
type ActivityLogElement ¶ added in v2.64.3
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
}
type TaskDetailsResource ¶ added in v2.64.3
type TaskDetailsResource struct {
Task *Task `json:"Task"`
ActivityLogs []*ActivityElement `json:"ActivityLogs"`
PhysicalLogSize int64 `json:"PhysicalLogSize"`
Progress *TaskProgress `json:"Progress"`
Links map[string]string `json:"Links"`
}
func GetDetails ¶ added in v2.64.3
func GetDetails(client newclient.Client, spaceID string, taskID string) (*TaskDetailsResource, error)
GetDetails returns task details by ID
type TaskProgress ¶ added in v2.64.3
type TaskService ¶
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"`
}
Click to show internal directories.
Click to hide internal directories.