Documentation
¶
Index ¶
- func RepoURLFromString(str string) (string, error)
- type Asset
- func (a *Asset) GetAuthor() string
- func (a *Asset) GetCreatedAt() time.Time
- func (a *Asset) GetDownloadURL() string
- func (a *Asset) GetHost() string
- func (a *Asset) GetLabel() string
- func (a *Asset) GetName() string
- func (a *Asset) GetOrg() string
- func (a *Asset) GetRepo() string
- func (a *Asset) GetRepoURL() string
- func (a *Asset) GetSize() int
- func (a *Asset) GetUpdatedAt() time.Time
- func (a *Asset) GetVersion() string
- type AssetDataProvider
- type Client
- type Installable
- func (i *Installable) GetArchVariants() []string
- func (i *Installable) GetArchiveTypes() []string
- func (i *Installable) GetAuthor() string
- func (i *Installable) GetCreatedAt() time.Time
- func (i *Installable) GetDownloadURL() string
- func (i *Installable) GetHost() string
- func (i *Installable) GetLabel() string
- func (i *Installable) GetName() string
- func (i *Installable) GetOrg() string
- func (i *Installable) GetOsVariants() []string
- func (i *Installable) GetPackageTypes() []string
- func (i *Installable) GetRepo() string
- func (i *Installable) GetRepoURL() string
- func (i *Installable) GetSize() int
- func (i *Installable) GetUpdatedAt() time.Time
- func (i *Installable) GetVersion() string
- func (i *Installable) LocalVariant() *Asset
- type Options
- type Release
- type ReleaseDataProvider
- type RepoDataProvider
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Asset ¶
type Asset struct { // RepoData Host string Repo string Org string // Release Version string // Asset Name string DownloadURL string Author string Size int Label string CreatedAt time.Time UpdatedAt time.Time Arch string Os string }
Asset is an abstraction of a file released on GitHub. It captures the basic file information but also its type platform and version.
func NewAssetFromURLString ¶
func (*Asset) GetCreatedAt ¶
func (*Asset) GetDownloadURL ¶
func (*Asset) GetRepoURL ¶
func (*Asset) GetUpdatedAt ¶
func (*Asset) GetVersion ¶
type AssetDataProvider ¶
type Client ¶
type Client struct { Options Options // contains filtered or unexported fields }
func (*Client) ListReleaseAssets ¶
func (c *Client) ListReleaseAssets(rdata ReleaseDataProvider) ([]AssetDataProvider, error)
func (*Client) ListReleaseInstallables ¶
func (c *Client) ListReleaseInstallables(rdata ReleaseDataProvider) ([]AssetDataProvider, error)
func (*Client) ListReleases ¶
func (c *Client) ListReleases(rdata RepoDataProvider) ([]ReleaseDataProvider, error)
ListReleases returns a list of the latest releases in a repo
type Installable ¶
type Installable struct { // RepoData Host string Repo string Org string // Release Version string Name string Variants []*Asset // Asset DownloadURL string Author string Size int Label string CreatedAt time.Time UpdatedAt time.Time Arch string Os string }
Installable abstracts a group of released assets of the same app that are variants for different architectures and OSs.
func (*Installable) GetArchVariants ¶
func (i *Installable) GetArchVariants() []string
func (*Installable) GetArchiveTypes ¶
func (i *Installable) GetArchiveTypes() []string
func (*Installable) GetAuthor ¶
func (i *Installable) GetAuthor() string
func (*Installable) GetCreatedAt ¶
func (i *Installable) GetCreatedAt() time.Time
func (*Installable) GetDownloadURL ¶
func (i *Installable) GetDownloadURL() string
func (*Installable) GetHost ¶
func (i *Installable) GetHost() string
func (*Installable) GetLabel ¶
func (i *Installable) GetLabel() string
func (*Installable) GetName ¶
func (i *Installable) GetName() string
func (*Installable) GetOrg ¶
func (i *Installable) GetOrg() string
func (*Installable) GetOsVariants ¶
func (i *Installable) GetOsVariants() []string
func (*Installable) GetPackageTypes ¶
func (i *Installable) GetPackageTypes() []string
func (*Installable) GetRepo ¶
func (i *Installable) GetRepo() string
func (*Installable) GetRepoURL ¶
func (i *Installable) GetRepoURL() string
func (*Installable) GetSize ¶
func (i *Installable) GetSize() int
func (*Installable) GetUpdatedAt ¶
func (i *Installable) GetUpdatedAt() time.Time
func (*Installable) GetVersion ¶
func (i *Installable) GetVersion() string
func (*Installable) LocalVariant ¶
func (i *Installable) LocalVariant() *Asset
type Release ¶
type Release struct { // Repository Host string Repo string Org string // Release Version string ID int64 PreRelease bool CreatedAt time.Time Author string }
Release captures the information of a GitHub release.
func (*Release) GetCreatedAt ¶
func (*Release) GetRepoURL ¶
func (*Release) GetVersion ¶
type ReleaseDataProvider ¶
type ReleaseDataProvider interface { RepoDataProvider GetVersion() string GetCreatedAt() time.Time GetAuthor() string }
type RepoDataProvider ¶
type Repository ¶
Repository is the basic construct that exposes information of a repository.
func (*Repository) GetHost ¶
func (r *Repository) GetHost() string
func (*Repository) GetOrg ¶
func (r *Repository) GetOrg() string
func (*Repository) GetRepo ¶
func (r *Repository) GetRepo() string
func (*Repository) GetRepoURL ¶
func (r *Repository) GetRepoURL() string
Click to show internal directories.
Click to hide internal directories.