Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToError ¶
func ToError(e *APIErrorResponse) error
ToError - Converts an APIErrorResponse to an error.
Types ¶
type APIErrorResponse ¶
type APIErrorResponse struct { Code string `json:"code"` Reason string `json:"reason"` Message string `json:"message"` }
func (*APIErrorResponse) FormatError ¶
func (e *APIErrorResponse) FormatError() string
FormatError - Formats the error.
type JobCreatedAPIResponse ¶
JobCreatedAPIResponse - This is the response structure for the JobCreatedAPIResponse.
func (*JobCreatedAPIResponse) GetJobStatus ¶
func (j *JobCreatedAPIResponse) GetJobStatus() (response *JobStatus, err error)
GetJobStatus - Returns the status of a job.
type JobStatus ¶
type JobStatus struct { JobID string `json:"jobId,omitempty"` Actions []struct { Name string `json:"name"` Status string `json:"status"` Details string `json:"details"` } `json:"actions"` Description string `json:"description"` Name string `json:"name"` Status JobStatusMessage `json:"status"` }
JobStatus - This is the response structure for the JobStatus.
func (*JobStatus) OnError ¶ added in v0.11.0
OnError - Returns true if the job is done with an error.
type JobStatusMessage ¶
type JobStatusMessage string
JobStatusMessage is a type for job status.
const ( // DONE is the done status message. DONE JobStatusMessage = "DONE" // FAILED is the failed status message. FAILED JobStatusMessage = "FAILED" // CREATED is the created status message. CREATED JobStatusMessage = "CREATED" // PENDING is the pending status message. PENDING JobStatusMessage = "PENDING" // INPROGRESS is the in progress status message. INPROGRESS JobStatusMessage = "IN_PROGRESS" // ERROR is the error status message. ERROR JobStatusMessage = "ERROR" )
Click to show internal directories.
Click to hide internal directories.