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
- type Content
- type Error
- type ErrorResponse
- type GetRepositoryOptions
- type Importer
- type ImporterConfig
- type ListOptions
- 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 { 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 { SizeTotal int `json:"size_total"` ItemsLeft int `json:"items_left"` ItemsTotal int `json:"items_total"` State string `json:"state"` SizeLeft int `json:"size_left"` ErrorDetails []string `json:"error_details"` ContentDetails struct { RpmTotal int `json:"rpm_total"` RpmDone int `json:"rpm_done"` DrpmTotal int `json:"drpm_total"` DrpmDone int `json:"drpm_done"` } `json:"details"` }
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"` }
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 { YumImporter struct { Content *Content Metadata struct { State string Error string } } `json:"yum_importer"` } `json:"progress_report"` Result struct { Details struct { Content *Content `json:"content"` } `json:"details"` } `json:"result"` }
type TasksService ¶
type TasksService struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.