packagecloud

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePackage

func DeletePackage(ctx context.Context, repos, distro, version string, fpath string) error

func PromotePackage

func PromotePackage(ctx context.Context, dstRepos, srcRepo, distro, version string, fpath string) error

func WithPackagecloudToken

func WithPackagecloudToken(ctx context.Context, token string) context.Context

Types

type CountValue

type CountValue struct {
	Value int `json:"value"`
}

func GetDownloadCount

func GetDownloadCount(ctx context.Context, pkg PackageDetail, startDate, endDate string) (*CountValue, error)

type Distribution

type Distribution struct {
	DisplayName string     `json:"display_name"`
	IndexName   string     `json:"index_name"`
	Versions    []Versions `json:"versions"`
}

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

func GetDistributions(ctx context.Context) (*Distributions, error)

func (*Distributions) DebianDistroVersionID

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"`
	Filename           string    `json:"filename"`
	Size               string    `json:"size"`
	Type               string    `json:"type"`
	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"`
	Md5Sum             string    `json:"md5sum"`
}

func PushPackage

func PushPackage(ctx context.Context, repos, distro, version string, fpath string) (PackageDetail, error)

func SearchPackage

func SearchPackage(ctx context.Context, repos, distro string, perPage int, query, filter string) ([]PackageDetail, error)

func ShowPackage

func ShowPackage(ctx context.Context, packageURL string) (PackageDetail, error)

type PackageDownloads

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

func GetDownloadDetail(ctx context.Context, pkg PackageDetail, startDate, endDate string) ([]PackageDownloads, error)

type Versions

type Versions struct {
	ID            int    `json:"id"`
	DisplayName   string `json:"display_name"`
	IndexName     string `json:"index_name"`
	VersionNumber string `json:"version_number"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL