jobs

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entities

type Entities struct {
	// Desktop ID.
	DesktopId string `json:"desktop_id"`
	// Product ID.
	ProductId string `json:"product_id"`
	// User name.
	UserName string `json:"user_name"`
}

Entities is an object to specified the job entity details of desktop.

type Job

type Job struct {
	// Job ID.
	ID string `json:"id"`
	// Job type.
	Type string `json:"job_type"`
	// Job entity.
	Entities Entities `json:"entities"`
	// Start time.
	BeginTime string `json:"begin_time"`
	// End time.
	EndTime string `json:"end_time"`
	// Job status.
	Status string `json:"status"`
	// Error code.
	ErrorCode string `json:"error_code"`
	// The fail reason.
	FailReason string `json:"fail_reason"`
	// The message of fail reason.
	Message string `json:"message"`
	// Sub-job ID.
	SubJobID string `json:"job_id"`
}

Job is an object to specified the operation detail of desktop.

type ListOpts

type ListOpts struct {
	// Job status.
	Status string `q:"status"`
	// Job ID.
	JobId string `q:"job_id"`
	//Job type.
	JobType string `q:"job_type"`
	// Number of records to be queried.
	// Value range: 0–1000.
	// Default value: 1000, indicating that a maximum of 1000 records can be queried and all records are displayed on
	// the same page.
	Limit int `q:"limit"`
	// The offset number, start with 0.
	Offset int `q:"offset"`
}

ListOpts is the structure required by the List method to query job list.

type QueryResp

type QueryResp struct {
	// The total count of job list.
	TotalCount int `json:"total_count"`
	// The job list.
	Jobs []Job `json:"jobs"`
}

QueryResp is the structure that represents the API response of Create method request.

func List

func List(c *golangsdk.ServiceClient, opts ListOpts) (*QueryResp, error)

List is a method to query the job details using given parameters.

Jump to

Keyboard shortcuts

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