Documentation
¶
Overview ¶
Package apiclient implements a client for the autodeb-server REST API
Index ¶
- type APIClient
- func (c *APIClient) GetCurrentUser() (*models.User, error)
- func (c *APIClient) GetJob(jobID uint) (*models.Job, error)
- func (c *APIClient) GetJobArtifact(jobID uint, filename string) (io.Reader, error)
- func (c *APIClient) GetJobArtifacts(jobID uint) ([]*models.JobArtifact, error)
- func (c *APIClient) GetJobLog(jobID uint) (io.Reader, error)
- func (c *APIClient) GetUploadDSC(uploadID uint) (io.Reader, error)
- func (c *APIClient) GetUploadDSCURL(uploadID uint) *url.URL
- func (c *APIClient) GetUploadFile(uploadID uint, filename string) (io.Reader, error)
- func (c *APIClient) GetUploadFiles(uploadID uint) ([]*models.FileUpload, error)
- func (c *APIClient) SetJobStatus(jobID uint, status models.JobStatus) error
- func (c *APIClient) SetToken(token string)
- func (c *APIClient) SubmitJobArtifact(jobID uint, filename string, artifact io.Reader) error
- func (c *APIClient) SubmitJobLog(jobID uint, jobLog io.Reader) error
- func (c *APIClient) UnqueueNextJob() (*models.Job, error)
- type HTTPClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient is a client for the autodeb-server REST API
func New ¶
func New(serverURL, token string, httpClient HTTPClient) (*APIClient, error)
New creates a new APIClient
func (*APIClient) GetCurrentUser ¶ added in v0.8.0
GetCurrentUser will retrieve the current user
func (*APIClient) GetJobArtifact ¶ added in v0.8.0
GetJobArtifact will retrieve a job's artifact
func (*APIClient) GetJobArtifacts ¶ added in v0.8.0
func (c *APIClient) GetJobArtifacts(jobID uint) ([]*models.JobArtifact, error)
GetJobArtifacts retrieves all artifacts associated with a job
func (*APIClient) GetUploadDSC ¶ added in v0.8.0
GetUploadDSC returns the .dsc of an upload
func (*APIClient) GetUploadDSCURL ¶
GetUploadDSCURL returns the .dsc URL for a given upload
func (*APIClient) GetUploadFile ¶ added in v0.8.0
GetUploadFile returns an upload's file
func (*APIClient) GetUploadFiles ¶ added in v0.8.0
func (c *APIClient) GetUploadFiles(uploadID uint) ([]*models.FileUpload, error)
GetUploadFiles returns all files for an upload
func (*APIClient) SetJobStatus ¶ added in v0.4.0
SetJobStatus will set the Job Status
func (*APIClient) SubmitJobArtifact ¶ added in v0.8.0
SubmitJobArtifact will submit a job artifact
func (*APIClient) SubmitJobLog ¶ added in v0.4.0
SubmitJobLog will submit logs for a job
Click to show internal directories.
Click to hide internal directories.