{"modulePath":"github.com/carabiner-dev/drop","version":"v0.2.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Constants\n\n```go\nconst DefaultHost = \"github.com\"\n```\nDefaultHost is the hostname of the public GitHub instance\n\n## Variables\n\n```go\nvar ErrRepositoryNotFound = errors.New(\"repository not found\")\n```\nErrRepositoryNotFound is returned when a repository does not exist (or is not visible to the client).\n\n## Functions\n\n```go\nfunc RepoURLFromString(str string) (string, error)\n```\nRepoURLFromString\n\n## Types\n\n```go\ntype Asset struct {\n\t// RepoData\n\tHost string\n\tRepo string\n\tOrg  string\n\n\t// Release\n\tVersion string\n\n\t// Asset\n\tName        string\n\tDownloadURL string\n\tAuthor      string\n\tSize        int\n\tLabel       string\n\tCreatedAt   time.Time\n\tUpdatedAt   time.Time\n\tArch        string\n\tOs          string\n}\n```\nAsset is an abstraction of a file released on GitHub. It captures the basic file information but also its type platform and version.\n\n```go\nfunc NewAssetFromURLString(urlString string) *Asset\n```\n\n```go\nfunc (a *Asset) GetAuthor() string\n```\n\n```go\nfunc (a *Asset) GetCreatedAt() time.Time\n```\n\n```go\nfunc (a *Asset) GetDownloadURL() string\n```\n\n```go\nfunc (a *Asset) GetHost() string\n```\n\n```go\nfunc (a *Asset) GetLabel() string\n```\n\n```go\nfunc (a *Asset) GetName() string\n```\n\n```go\nfunc (a *Asset) GetOrg() string\n```\n\n```go\nfunc (a *Asset) GetRepo() string\n```\n\n```go\nfunc (a *Asset) GetRepoURL() string\n```\n\n```go\nfunc (a *Asset) GetSize() int\n```\n\n```go\nfunc (a *Asset) GetUpdatedAt() time.Time\n```\n\n```go\nfunc (a *Asset) GetVersion() string\n```\n\n```go\ntype AssetDataProvider interface {\n\tReleaseDataProvider\n\n\tGetName() string\n\tGetAuthor() string\n\tGetSize() int\n\tGetCreatedAt() time.Time\n\tGetUpdatedAt() time.Time\n\tGetDownloadURL() string\n\tGetLabel() string\n}\n```\n\n```go\ntype Client struct {\n\tOptions Options\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New() (*Client, error)\n```\n\n```go\nfunc (c *Client) GetRepository(rdata RepoDataProvider) (*Repository, error)\n```\nGetRepository fetches a repository, checking that it exists. A missing repository is reported as ErrRepositoryNotFound.\n\n```go\nfunc (c *Client) LatestRelease(rdata RepoDataProvider) (ReleaseDataProvider, error)\n```\nLatestRelease returns the release that \"latest\" resolves to for a repo.\n\n```go\nfunc (c *Client) ListReleaseAssets(rdata ReleaseDataProvider) ([]AssetDataProvider, error)\n```\n\n```go\nfunc (c *Client) ListReleaseInstallables(rdata ReleaseDataProvider) ([]AssetDataProvider, error)\n```\n\n```go\nfunc (c *Client) ListReleases(rdata RepoDataProvider) ([]ReleaseDataProvider, error)\n```\nListReleases returns a list of the latest releases in a repo\n\n```go\ntype Installable struct {\n\t// RepoData\n\tHost string\n\tRepo string\n\tOrg  string\n\n\t// Release\n\tVersion string\n\n\tName     string\n\tVariants []*Asset\n\n\t// Asset\n\tDownloadURL string\n\tAuthor      string\n\tSize        int\n\tLabel       string\n\tCreatedAt   time.Time\n\tUpdatedAt   time.Time\n\tArch        string\n\tOs          string\n}\n```\nInstallable abstracts a group of released assets of the same app that are variants for different architectures and OSs.\n\n```go\nfunc (i *Installable) GetArchVariants() []string\n```\n\n```go\nfunc (i *Installable) GetArchiveTypes() []string\n```\n\n```go\nfunc (i *Installable) GetAuthor() string\n```\n\n```go\nfunc (i *Installable) GetCreatedAt() time.Time\n```\n\n```go\nfunc (i *Installable) GetDownloadURL() string\n```\n\n```go\nfunc (i *Installable) GetHost() string\n```\n\n```go\nfunc (i *Installable) GetLabel() string\n```\n\n```go\nfunc (i *Installable) GetName() string\n```\n\n```go\nfunc (i *Installable) GetOrg() string\n```\n\n```go\nfunc (i *Installable) GetOsVariants() []string\n```\n\n```go\nfunc (i *Installable) GetPackageTypes() []string\n```\n\n```go\nfunc (i *Installable) GetRepo() string\n```\n\n```go\nfunc (i *Installable) GetRepoURL() string\n```\n\n```go\nfunc (i *Installable) GetSize() int\n```\n\n```go\nfunc (i *Installable) GetUpdatedAt() time.Time\n```\n\n```go\nfunc (i *Installable) GetVersion() string\n```\n\n```go\nfunc (i *Installable) LocalVariant() *Asset\n```\n\n```go\ntype Options struct {\n\tHost string\n}\n```\n\n```go\ntype Release struct {\n\t// Repository\n\tHost string\n\tRepo string\n\tOrg  string\n\n\t// Release\n\tVersion    string\n\tID         int64\n\tPreRelease bool\n\tCreatedAt  time.Time\n\tAuthor     string\n}\n```\nRelease captures the information of a GitHub release.\n\n```go\nfunc (r *Release) GetAuthor() string\n```\n\n```go\nfunc (r *Release) GetCreatedAt() time.Time\n```\n\n```go\nfunc (r *Release) GetHost() string\n```\n\n```go\nfunc (r *Release) GetOrg() string\n```\n\n```go\nfunc (r *Release) GetRepo() string\n```\n\n```go\nfunc (r *Release) GetRepoURL() string\n```\n\n```go\nfunc (r *Release) GetVersion() string\n```\n\n```go\ntype ReleaseDataProvider interface {\n\tRepoDataProvider\n\tGetVersion() string\n\tGetCreatedAt() time.Time\n\tGetAuthor() string\n}\n```\n\n```go\ntype RepoDataProvider interface {\n\tGetHost() string\n\tGetRepo() string\n\tGetOrg() string\n\tGetRepoURL() string\n}\n```\n\n```go\ntype Repository struct {\n\tHost string\n\tRepo string\n\tOrg  string\n}\n```\nRepository is the basic construct that exposes information of a repository.\n\n```go\nfunc (r *Repository) GetHost() string\n```\n\n```go\nfunc (r *Repository) GetOrg() string\n```\n\n```go\nfunc (r *Repository) GetRepo() string\n```\n\n```go\nfunc (r *Repository) GetRepoURL() string\n```\n\n","path":"github.com/carabiner-dev/drop/pkg/github","name":"github","synopsis":"","isRedistributable":true}
