bintray

package
v2.110.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadContent

func DownloadContent(url string, w io.Writer) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(subject, apikey string, logger *zap.Logger) *Client

func (Client) GetOrganization

func (c Client) GetOrganization(subject string) (GetOrganizationResponse, error)

func (Client) GetPackage

func (c Client) GetPackage(subject, repo, pkg string) (GetPackageResponse, error)

func (Client) GetPackageFiles

func (c Client) GetPackageFiles(subject, repo, pkg string) (GetPackageFilesResponse, error)

func (Client) GetPackages

func (c Client) GetPackages(subject, repo string) (GetPackagesResponse, error)

func (Client) GetRepositories

func (c Client) GetRepositories(subject string) (GetRepositoriesResponse, error)

func (Client) GetRepository

func (c Client) GetRepository(subject, repo string) (GetRepositoryResponse, error)

func (Client) GetUser

func (c Client) GetUser(subject string) (GetUserResponse, error)

func (Client) GetVersion

func (c Client) GetVersion(subject, repo, pkg, version string) (GetVersionResponse, error)

func (Client) Subject

func (c Client) Subject() string

type GetOrganizationResponse

type GetOrganizationResponse struct {
	Name           string    `json:"name"`
	Repos          []string  `json:"repos"`
	FollowersCount int       `json:"followers_count"`
	Registered     time.Time `json:"registered"`
	Owner          string    `json:"owner"`
	FullName       string    `json:"full_name"`
	Members        []struct {
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"members"`
	QuotaUsedBytes                 int   `json:"quota_used_bytes"`
	FreeStorage                    int   `json:"free_storage"`
	FreeStorageQuotaLimit          int64 `json:"free_storage_quota_limit"`
	LastMonthFreeDownloads         int   `json:"last_month_free_downloads"`
	MonthlyFreeDownloadsQuotaLimit int64 `json:"monthly_free_downloads_quota_limit"`
}

type GetPackageFilesResponse

type GetPackageFilesResponse []struct {
	Name    string    `json:"name"`
	Path    string    `json:"path"`
	Repo    string    `json:"repo"`
	Package string    `json:"package"`
	Version string    `json:"version"`
	Owner   string    `json:"owner"`
	Created time.Time `json:"created"`
	Size    int       `json:"size"`
	Sha1    string    `json:"sha1"`
	Sha256  string    `json:"sha256"`
}

type GetPackageResponse

type GetPackageResponse struct {
	Name                   string        `json:"name"`
	Repo                   string        `json:"repo"`
	Owner                  string        `json:"owner"`
	Desc                   string        `json:"desc"`
	Labels                 []string      `json:"labels"`
	AttributeNames         []string      `json:"attribute_names"`
	Licenses               []string      `json:"licenses"`
	CustomLicenses         []interface{} `json:"custom_licenses"`
	FollowersCount         int           `json:"followers_count"`
	Created                time.Time     `json:"created"`
	WebsiteURL             string        `json:"website_url"`
	IssueTrackerURL        string        `json:"issue_tracker_url"`
	GithubRepo             string        `json:"github_repo"`
	GithubReleaseNotesFile string        `json:"github_release_notes_file"`
	PublicDownloadNumbers  bool          `json:"public_download_numbers"`
	PublicStats            bool          `json:"public_stats"`
	LinkedToRepos          []interface{} `json:"linked_to_repos"`
	Versions               []string      `json:"versions"`
	LatestVersion          string        `json:"latest_version"`
	Updated                time.Time     `json:"updated"`
	RatingCount            int           `json:"rating_count"`
	SystemIds              []interface{} `json:"system_ids"`
	VcsURL                 string        `json:"vcs_url"`
	Maturity               string        `json:"maturity"`
	Permissions            []interface{} `json:"permissions"`
}

type GetPackagesResponse

type GetPackagesResponse []struct {
	Name   string `json:"name"`
	Linked bool   `json:"linked"`
}

type GetRepositoriesResponse

type GetRepositoriesResponse []struct {
	Name        string    `json:"name"`
	Owner       string    `json:"owner"`
	LastUpdated time.Time `json:"lastUpdated"`
}

type GetRepositoryResponse

type GetRepositoryResponse struct {
	Name            string    `json:"name"`
	Owner           string    `json:"owner"`
	Type            string    `json:"type"`
	Private         bool      `json:"private"`
	Premium         bool      `json:"premium"`
	Desc            string    `json:"desc"`
	Labels          []string  `json:"labels"`
	Created         time.Time `json:"created"`
	PackageCount    int       `json:"package_count"`
	GpgUseOwnerKey  bool      `json:"gpg_use_owner_key"`
	GpgSignFiles    bool      `json:"gpg_sign_files"`
	GpgSignMetadata bool      `json:"gpg_sign_metadata"`
}

type GetUserResponse

type GetUserResponse struct {
	Name                           string    `json:"name"`
	FullName                       string    `json:"full_name"`
	GravatarID                     string    `json:"gravatar_id"`
	Repos                          []string  `json:"repos"`
	Organizations                  []string  `json:"organizations"`
	FollowersCount                 int       `json:"followers_count"`
	Registered                     time.Time `json:"registered"`
	QuotaUsedBytes                 int       `json:"quota_used_bytes"`
	FreeStorage                    int       `json:"free_storage"`
	FreeStorageQuotaLimit          int64     `json:"free_storage_quota_limit"`
	LastMonthFreeDownloads         int       `json:"last_month_free_downloads"`
	MonthlyFreeDownloadsQuotaLimit int64     `json:"monthly_free_downloads_quota_limit"`
}

type GetVersionResponse

type GetVersionResponse struct {
	Attributes               map[string][]string `json:"attributes"`
	Created                  time.Time           `json:"created"`
	Desc                     string              `json:"desc"`
	GithubReleaseNotesFile   string              `json:"github_release_notes_file"`
	GithubUseTagReleaseNotes bool                `json:"github_use_tag_release_notes"`
	Labels                   []string            `json:"labels"`
	Name                     string              `json:"name"`
	Ordinal                  float64             `json:"ordinal"`
	Owner                    string              `json:"owner"`
	Package                  string              `json:"package"`
	Published                bool                `json:"published"`
	RatingCount              float64             `json:"rating_count"`
	Released                 time.Time           `json:"released"`
	Repo                     string              `json:"repo"`
	Updated                  time.Time           `json:"updated"`
	VcsTag                   string              `json:"vcs_tag"`
}

Jump to

Keyboard shortcuts

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