Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct { ID string `json:"id,omitempty"` Type Type `json:"type"` Size int64 `json:"size,omitempty"` // length in bytes for regular files; 0 when Canceled or Deleted Status Status `json:"status"` Started time.Time `json:"started_at,omitempty"` Stopped time.Time `json:"stopped_at,omitempty"` Errors []string `json:"errors,omitempty"` }
Bundle represents a bundle object received from the diagnostics API
func (*Bundle) IsFinished ¶
IsFinished returns if the bundle has a status that indicating that it is finished.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a REST API wrapper around the new Diagnostics API.
func NewClient ¶
func NewClient(baseClient *httpclient.Client) *Client
NewClient creates a new Client.
type Status ¶
type Status int
Status represents an bundle status
const ( Unknown Status = iota // No information about this bundle Started // Diagnostics is preparing InProgress // Diagnostics in progress Done // Diagnostics finished and the file is ready to be downloaded Canceled // Diagnostics has been canceled Deleted // Diagnostics was finished but was deleted Failed // Diagnostics could not be downloaded )
Possible statuses
func (Status) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*Status) UnmarshalJSON ¶
UnmarshalJSON unmashals a quoted json string to the enum value
type Type ¶
type Type int
Type represents a bundle type
func (Type) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (*Type) UnmarshalJSON ¶
UnmarshalJSON unmashals a quoted json string to the enum value
Click to show internal directories.
Click to hide internal directories.