Documentation
¶
Index ¶
- type APIClient
- func (client *APIClient) AddPackageToRepository(pkg, dir, repository string) error
- func (client *APIClient) CreateRepository(name, comment, defaultDistribution, defaultComponent string) (*Repository, error)
- func (client *APIClient) Publish(prefix string, publishParameters *PublishParameters) error
- func (client *APIClient) PublishDefaults(repositoryName string) error
- func (client *APIClient) UpdatePublishedRepository(prefix, distribution string, params *PublishedRepositoryUpdateParameters) error
- func (client *APIClient) UpdatePublishedRepositoryDefaults(repositoryName string) error
- func (client *APIClient) UploadFileInDirectory(content io.Reader, filename, directory string) error
- type HTTPClient
- type PublishParameters
- type PublishedRepositoryUpdateParameters
- type Repository
- type SigningOptions
- type Source
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 to the aptly REST API
func NewClient ¶
func NewClient(apiURL *url.URL, httpClient HTTPClient) *APIClient
NewClient creates a new APIClient.
apiURL should contain "/api". For example: "http://localhost:8080/api"
func (*APIClient) AddPackageToRepository ¶
AddPackageToRepository adds a package to a repositoryA
func (*APIClient) CreateRepository ¶
func (client *APIClient) CreateRepository(name, comment, defaultDistribution, defaultComponent string) (*Repository, error)
CreateRepository creates a new repository
func (*APIClient) Publish ¶
func (client *APIClient) Publish(prefix string, publishParameters *PublishParameters) error
Publish will publish a snapshot or a local repo
func (*APIClient) PublishDefaults ¶
PublishDefaults will publish a snapshot or a local repo with sensible defaults
func (*APIClient) UpdatePublishedRepository ¶
func (client *APIClient) UpdatePublishedRepository(prefix, distribution string, params *PublishedRepositoryUpdateParameters) error
UpdatePublishedRepository updates a published repository
func (*APIClient) UpdatePublishedRepositoryDefaults ¶
UpdatePublishedRepositoryDefaults updates a published repository with sensible defaults
type HTTPClient ¶
HTTPClient is needed for the APIClient to perform requests. Typically, it would be an &http.Client.
type PublishParameters ¶
type PublishParameters struct {
SourceKind string `json:"SourceKind"`
Sources []*Source `json:"Sources"`
Distribution string `json:"Distribution"`
Label string `json:"Label"`
Origin string `json:"Origin"`
ForceOverwrite bool `json:"ForceOverwrite"`
Architectures []string `json:"Architectures"`
Signing *SigningOptions `json:"Signing"`
NotAutomatic string `json:"NotAutomatic"`
ButAutomaticUpgrades string `json:"ButAutomaticUpgrades"`
SkipCleanup string `json:"SkipCleanup"`
AcquireByHash bool `json:"AcquireByHash"`
}
PublishParameters are used to publish a snapshot or local repository
type PublishedRepositoryUpdateParameters ¶
type PublishedRepositoryUpdateParameters struct {
Snapshots []*Source `json:"Snapshots"`
ForceOverwrite bool `json:"ForceOverwrite"`
Signing *SigningOptions `json:"Signing"`
AcquireByHash bool `json:"AcquireByHash"`
}
PublishedRepositoryUpdateParameters holds parameters required to update a published repository
type Repository ¶
type Repository struct {
Name string `json:"Name"`
Comment string `json:"Comment"`
DefaultDistribution string `json:"DefaultDistribution"`
DefaultComponent string `json:"DefaultComponent"`
}
Repository represents a repository
type SigningOptions ¶
type SigningOptions struct {
Skip bool `json:"Skip"`
Batch bool `json:"Batch"`
GpgKey string `json:"GpgKey"`
Keyring string `json:"Keyring"`
SecretKeyring string `json:"SecretKeyring"`
Passphrase string `json:"Passphrase"`
PassphraseFile string `json:"PassphraseFile"`
}
SigningOptions contain gpg options