Documentation ¶
Overview ¶
Package apiclient implements a client for the autodeb-server REST API
Index ¶
- type APIClient
- func (c *APIClient) Aptly() *aptly.APIClient
- func (c *APIClient) CreateJob(job *models.Job) (*models.Job, error)
- func (c *APIClient) GetArchiveUpgrade(id uint) (*models.ArchiveUpgrade, error)
- func (c *APIClient) GetArchiveUpgradeJobs(id uint) ([]*models.Job, error)
- func (c *APIClient) GetArchiveUpgradeSuccessfulBuilds(id uint) ([]*models.Job, error)
- func (c *APIClient) GetArtifact(artifactID uint) (*models.Artifact, error)
- func (c *APIClient) GetArtifactContent(artifactID uint) (io.Reader, error)
- func (c *APIClient) GetCurrentUser() (*models.User, error)
- func (c *APIClient) GetJob(jobID uint) (*models.Job, error)
- func (c *APIClient) GetJobArtifactContent(jobID uint, filename string) (io.Reader, error)
- func (c *APIClient) GetJobArtifacts(jobID uint) ([]*models.Artifact, error)
- func (c *APIClient) GetJobLogContent(jobID uint) (io.Reader, error)
- func (c *APIClient) GetUpload(jobID uint) (*models.Upload, error)
- func (c *APIClient) GetUploadChanges(uploadID uint) (io.Reader, error)
- func (c *APIClient) GetUploadChangesURL(uploadID uint) *url.URL
- 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, content io.Reader) (*models.Artifact, 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) GetArchiveUpgrade ¶ added in v0.11.0
func (c *APIClient) GetArchiveUpgrade(id uint) (*models.ArchiveUpgrade, error)
GetArchiveUpgrade will retrieve an archive upgrade by ID
func (*APIClient) GetArchiveUpgradeJobs ¶ added in v0.13.0
GetArchiveUpgradeJobs returns all jobs for an ArchiveUpgrade
func (*APIClient) GetArchiveUpgradeSuccessfulBuilds ¶ added in v0.13.0
GetArchiveUpgradeSuccessfulBuilds returns all successful builds for an ArchiveUpgrade
func (*APIClient) GetArtifact ¶ added in v0.10.1
GetArtifact will retrieve an artifact
func (*APIClient) GetArtifactContent ¶ added in v0.10.1
GetArtifactContent will retrieve an artifact's content
func (*APIClient) GetCurrentUser ¶ added in v0.9.1
GetCurrentUser will retrieve the current user
func (*APIClient) GetJobArtifactContent ¶ added in v0.10.1
GetJobArtifactContent will retrieve the content of a job's artifact
func (*APIClient) GetJobArtifacts ¶ added in v0.9.1
GetJobArtifacts retrieves all artifacts associated with a job
func (*APIClient) GetJobLogContent ¶ added in v0.10.1
GetJobLogContent will retrieve the content of a job's log
func (*APIClient) GetUploadChanges ¶ added in v0.10.1
GetUploadChanges returns the .changes of an upload
func (*APIClient) GetUploadChangesURL ¶ added in v0.10.1
GetUploadChangesURL returns the .changes URL for a given upload
func (*APIClient) GetUploadDSC ¶ added in v0.9.1
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.9.1
GetUploadFile returns an upload's file
func (*APIClient) GetUploadFiles ¶ added in v0.9.1
func (c *APIClient) GetUploadFiles(uploadID uint) ([]*models.FileUpload, error)
GetUploadFiles returns all files for an upload
func (*APIClient) SetJobStatus ¶
SetJobStatus will set the Job Status
func (*APIClient) SubmitJobArtifact ¶ added in v0.9.1
func (c *APIClient) SubmitJobArtifact(jobID uint, filename string, content io.Reader) (*models.Artifact, error)
SubmitJobArtifact will submit a job artifact
func (*APIClient) SubmitJobLog ¶
SubmitJobLog will submit logs for a job