Documentation
¶
Index ¶
- Variables
- func GetSupportedFileExtensions() []string
- func ValidateFileExtensions(paths []string) error
- type APIResponse
- type Client
- func (c *Client) GetDistributions() (types.PackageTypes, error)
- func (c *Client) LatestVersion(options ListVersionsOptions) (string, error)
- func (c *Client) ListPackages(repo Repo) (types.PackageFragments, error)
- func (c *Client) ListPackagesStream(repo Repo, fn func(types.PackageFragments)) error
- func (c *Client) ListVersions(options ListVersionsOptions) (types.PackageVersions, error)
- func (c *Client) PreviousVersion(options ListVersionsOptions) (string, error)
- func (c *Client) PromoteByFilename(src Repo, dst Repo, distro Distro, filename string) error
- func (c *Client) PromoteBySearch(dst Repo, options SearchOptions) error
- func (c *Client) PushPackage(options PushPackageOptions) (*types.PackageDetails, error)
- func (c *Client) Search(options SearchOptions) (types.PackageFragments, error)
- func (c *Client) SearchStream(options SearchOptions, fn func(types.PackageFragments)) error
- type Config
- type Distro
- type GetClientFn
- type ListVersionsOptions
- type MissingOptionError
- type MissingSearchOptionsError
- type PushPackageOptions
- type Repo
- type SearchOptions
- type UnmarshalError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetSupportedFileExtensions ¶
func GetSupportedFileExtensions() []string
TODO: packagecloud supports more than this, implement the others
func ValidateFileExtensions ¶
Types ¶
type APIResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetDistributions ¶
func (c *Client) GetDistributions() (types.PackageTypes, error)
func (*Client) LatestVersion ¶
func (c *Client) LatestVersion(options ListVersionsOptions) (string, error)
func (*Client) ListPackages ¶
func (c *Client) ListPackages(repo Repo) (types.PackageFragments, error)
func (*Client) ListPackagesStream ¶
func (c *Client) ListPackagesStream(repo Repo, fn func(types.PackageFragments)) error
func (*Client) ListVersions ¶
func (c *Client) ListVersions(options ListVersionsOptions) (types.PackageVersions, error)
func (*Client) PreviousVersion ¶
func (c *Client) PreviousVersion(options ListVersionsOptions) (string, error)
func (*Client) PromoteByFilename ¶
PromoteByFilename will promote a single package by filename.
func (*Client) PromoteBySearch ¶
func (c *Client) PromoteBySearch(dst Repo, options SearchOptions) error
PromoteBySearch will search for any packages matching the given search options and then promote all matches to the destination repository.
func (*Client) PushPackage ¶
func (c *Client) PushPackage(options PushPackageOptions) (*types.PackageDetails, error)
func (*Client) Search ¶
func (c *Client) Search(options SearchOptions) (types.PackageFragments, error)
func (*Client) SearchStream ¶
func (c *Client) SearchStream(options SearchOptions, fn func(types.PackageFragments)) error
type Config ¶
type Distro ¶
func NewDistroFromString ¶
type GetClientFn ¶
type ListVersionsOptions ¶
type ListVersionsOptions struct {
// Repo is the repository to list versions for.
Repo Repo
// PackageName is the name of the package to list versions for.
PackageName string
// Filter can be used to search by package type.
// (RPMs, Debs, DSCs, Gem, Python, Node).
// Ignored when Dist is present.
Filter string
// Dist is the name of the distribution that the package is in.
// (i.e. ubuntu, el/6)
Dist string
// Arch is the architecture of the packages. (i.e. x86_64, arm64, amd64).
// Alpine/RPM/Debian only.
Arch string
// PerPage is the number of packages to return from the results set. If
// nothing passed the default is 30.
PerPage string
}
func (ListVersionsOptions) SearchOptions ¶
func (o ListVersionsOptions) SearchOptions() SearchOptions
func (ListVersionsOptions) Validate ¶
func (o ListVersionsOptions) Validate() error
type MissingOptionError ¶
type MissingOptionError struct {
Field string
}
func (*MissingOptionError) Error ¶
func (e *MissingOptionError) Error() string
type MissingSearchOptionsError ¶
type MissingSearchOptionsError struct{}
func (*MissingSearchOptionsError) Error ¶
func (e *MissingSearchOptionsError) Error() string
type PushPackageOptions ¶
type Repo ¶
func NewRepoFromString ¶
type SearchOptions ¶
type SearchOptions struct {
// RepoUser is the username that the repository to search belongs to.
RepoUser string
// RepoName is the name of the repository to search.
RepoName string
// Query is a query string to search for package filename. If empty string
// is passed, all packages are returned.
Query string
// Filter can be used to search by package type.
// (RPMs, Debs, DSCs, Gem, Python, Node).
// Ignored when Dist is present.
Filter string
// Dist is the name of the distribution that the package is in.
// (i.e. ubuntu, el/6)
// Overrides Filter.
Dist string
// Arch is the architecture of the packages. (i.e. x86_64, arm64, amd64).
// Alpine/RPM/Debian only.
Arch string
// PerPage is the number of packages to return from the results set. If
// nothing passed the default is 30.
PerPage string
}
func (SearchOptions) Validate ¶
func (o SearchOptions) Validate() error
type UnmarshalError ¶
func (*UnmarshalError) Error ¶
func (e *UnmarshalError) Error() string
Click to show internal directories.
Click to hide internal directories.