Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an import api client which can be used to make requests to the API
func (*Client) Checker ¶
Checker calls import api health endpoint and returns a check object to the caller.
type ErrInvalidAPIResponse ¶
type ErrInvalidAPIResponse struct {
// contains filtered or unexported fields
}
ErrInvalidAPIResponse is returned when the api does not respond with a valid status
func NewAPIResponse ¶
func NewAPIResponse(resp *http.Response, uri string) (e *ErrInvalidAPIResponse)
NewAPIResponse creates an error response, optionally adding body to e when status is 404
func (ErrInvalidAPIResponse) Code ¶
func (e ErrInvalidAPIResponse) Code() int
Code returns the status code received from the api if an error is returned
func (ErrInvalidAPIResponse) Error ¶
func (e ErrInvalidAPIResponse) Error() string
Error should be called by the user to print out the stringified version of the error
type ImportJob ¶
ImportJob comes from the Import API and links an import job to its (other) instances
type InstanceLink ¶
InstanceLink identifies an (instance or import-job) by id and url (from Import API)
type LinkMap ¶
type LinkMap struct {
Instances []InstanceLink `json:"instances"`
}
LinkMap is an array of instance links associated with am import job