Documentation
¶
Index ¶
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func Int(v int) *int
- func String(v string) *string
- func Stringify(message interface{}) string
- type CallReport
- type Client
- func (c *Client) BaseURL() *url.URL
- func (c *Client) Do(req *http.Request, v interface{}) (*Response, error)
- func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request, error)
- func (c *Client) SetBaseURL(urlStr string) error
- func (c *Client) SetHost(hostStr string) error
- func (c *Client) SetTimeout(timeout int)
- type Content
- type Error
- type ErrorResponse
- type GetRepositoryOptions
- type Importer
- type ImporterConfig
- type ListOptions
- type Metadata
- type RepositoriesService
- func (s *RepositoriesService) GetRepository(repository string, opt *GetRepositoryOptions) (*Repository, *Response, error)
- func (s *RepositoriesService) ListRepositories(opt *GetRepositoryOptions) ([]*Repository, *Response, error)
- func (s *RepositoriesService) SyncRepository(repository string) (*CallReport, *Response, error)
- type Repository
- type Response
- type Task
- type TasksService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
Types ¶
type CallReport ¶
type CallReport struct {
Result string `json:"result"`
Error *Error `json:"error"`
SpawnedTasks []struct {
Href string `json:"_href"`
TaskId string `json:"task_id"`
} `json:"spawned_tasks"`
}
Pulp Api docs: http://pulp.readthedocs.org/en/latest/dev-guide/conventions/sync-v-async.html#call-report
type Client ¶
type Client struct {
DisableSsl bool
InsecureSkipVerify bool
UserAgent string
// Services used for talking to different parts of the Pulp API.
Repositories *RepositoriesService
Tasks *TasksService
// contains filtered or unexported fields
}
func (*Client) NewRequest ¶
func (*Client) SetBaseURL ¶
type Content ¶
type Content struct {
State string `json:"state"`
ItemsTotal int `json:"items_total"`
ItemsLeft int `json:"items_left"`
SizeTotal int `json:"size_total"`
SizeLeft int `json:"size_left"`
ErrorDetails []string `json:"error_details"`
}
included in task
type Error ¶
type Error struct {
Code string `json:"code"`
Description string `json:"description"`
Data json.RawMessage `json:"data"`
Sub_errors json.RawMessage `json:"sub_errors"`
}
Pulp Api docs: http://pulp.readthedocs.org/en/latest/dev-guide/conventions/exceptions.html#error-details
type ErrorResponse ¶
type ErrorResponse struct {
Response *http.Response // HTTP response that caused this error
ResourceID string `json:"resource_id"`
Message string `json:"error_message"` // error message
ErrorDetails *Error `json:"error"` // more detail on individual errors
}
Pulp Api docs: http://pulp.readthedocs.org/en/latest/dev-guide/conventions/exceptions.html#exception-handling
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type GetRepositoryOptions ¶
type GetRepositoryOptions struct {
Details bool `url:"details,omitempty" json:"details,omitempty"`
}
type Importer ¶
type Importer struct {
Id string `json:"id"`
ImporterConfig *ImporterConfig `json:"config"`
Content *Content `json:"content"`
Metadata *Metadata `json:"metadata"`
}
type ImporterConfig ¶
type ListOptions ¶
type RepositoriesService ¶
type RepositoriesService struct {
// contains filtered or unexported fields
}
func (*RepositoriesService) GetRepository ¶
func (s *RepositoriesService) GetRepository( repository string, opt *GetRepositoryOptions) (*Repository, *Response, error)
func (*RepositoriesService) ListRepositories ¶
func (s *RepositoriesService) ListRepositories(opt *GetRepositoryOptions) ([]*Repository, *Response, error)
func (*RepositoriesService) SyncRepository ¶
func (s *RepositoriesService) SyncRepository(repository string) (*CallReport, *Response, error)
type Repository ¶
type Repository struct {
Id string `json:"id"`
Name string `json:"display_name"`
Importers []*Importer `json:"importers"`
}
func (Repository) String ¶
func (r Repository) String() string
type Task ¶
type Task struct {
Id string `json:"task_id"`
StartTime string `json:"start_time"`
FinishTime string `json:"finish_time"`
State string `json:"state"`
Error *Error `json:"error"`
ProgressReport struct {
// yum importer
YumImporter *Importer `json:"yum_importer"`
// docker importer
DockerImporter *Importer `json:"docker_importer"`
} `json:"progress_report"`
Result struct {
Details struct {
Content *Content `json:"content"`
} `json:"details"`
} `json:"result"`
}
included in task
type TasksService ¶
type TasksService struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.