Documentation
¶
Index ¶
- func DeletePackage(ctx context.Context, repos, distro, version string, fpath string) error
- func DownloadPackage(ctx context.Context, pkg PackageDetail, w io.Writer) error
- func PromotePackage(ctx context.Context, dstRepos, srcRepo, distro, version string, fpath string) error
- func PushPackage(ctx context.Context, repos, distro, version string, fpath string) error
- func WithPackagecloudToken(ctx context.Context, token string) context.Context
- type CountValue
- type Distribution
- type Distributions
- type PackageDetail
- type PackageDownloads
- type Versions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeletePackage ¶
func DownloadPackage ¶ added in v0.4.0
DownloadPackage sends the token so that packages in private repositories can be downloaded.
func PromotePackage ¶
func PushPackage ¶
Types ¶
type CountValue ¶ added in v0.3.0
type CountValue struct {
Value int `json:"value"`
}
func GetDownloadCount ¶ added in v0.3.0
func GetDownloadCount(ctx context.Context, pkg PackageDetail, startDate, endDate string) (*CountValue, error)
type Distribution ¶
type Distributions ¶
type Distributions struct {
Deb []Distribution `json:"deb"`
Rpm []Distribution `json:"rpm"`
Py []Distribution `json:"py"`
Jar []Distribution `json:"jar"`
Node []Distribution `json:"node"`
Alpine []Distribution `json:"alpine"`
Anyfile []Distribution `json:"anyfile"`
Helm []Distribution `json:"helm"`
Dsc []Distribution `json:"dsc"`
}
func GetDistributions ¶ added in v0.1.5
func GetDistributions(ctx context.Context) (*Distributions, error)
GetDistributions caches only a successful result. sync.Once is not used because it would also cache a failure and never retry.
func (*Distributions) DebianDistroVersionID ¶ added in v0.1.7
func (d *Distributions) DebianDistroVersionID(distro, version string) (id string, ok bool)
type PackageDetail ¶
type PackageDetail struct {
Name string `json:"name"`
Arch string `json:"architecture"`
Release string `json:"release"`
DistroVersion string `json:"distro_version"`
CreateTime time.Time `json:"created_at"`
Version string `json:"version"`
Type string `json:"type"`
Filename string `json:"filename"`
UploaderName string `json:"uploader_name"`
Indexed bool `json:"indexed"`
PackageURL string `json:"package_url"`
DownloadURL string `json:"download_url"`
DownloadsCountURL string `json:"downloads_count_url"`
DownloadsDetailURL string `json:"downloads_detail_url"`
}
func SearchPackage ¶
func SearchPackage(ctx context.Context, repos, distro string, perPage int, query, filter string) ([]PackageDetail, error)
SearchPackage follows the Link header to return every page. distro may be a distribution name ("ubuntu") or a distribution with a version ("ubuntu/xenial").
type PackageDownloads ¶ added in v0.3.0
type PackageDownloads struct {
DownloadedAt time.Time `json:"downloaded_at"`
IpAddress string `json:"ip_address"`
UserAgent string `json:"user_agent"`
Source string `json:"source"`
ReadToken string `json:"read_token"`
}
func GetDownloadDetail ¶ added in v0.3.0
func GetDownloadDetail(ctx context.Context, pkg PackageDetail, startDate, endDate string) ([]PackageDownloads, error)
GetDownloadDetail follows the Link header to return every page.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.