Documentation ¶
Index ¶
- func Fatal(doing string, err error)
- func Sayf(message string, args ...interface{})
- func SortByTimestamp(releases []*github.RepositoryRelease)
- func SortByVersion(releases []*github.RepositoryRelease, versionParser *versionParser)
- type CheckCommand
- type CheckRequest
- type GitHub
- type GitHubClient
- func (g *GitHubClient) CreateRelease(release github.RepositoryRelease) (*github.RepositoryRelease, error)
- func (g *GitHubClient) DeleteReleaseAsset(asset github.ReleaseAsset) error
- func (g *GitHubClient) DownloadReleaseAsset(asset github.ReleaseAsset) (io.ReadCloser, error)
- func (g *GitHubClient) GetRelease(id int) (*github.RepositoryRelease, error)
- func (g *GitHubClient) GetReleaseByTag(tag string) (*github.RepositoryRelease, error)
- func (g *GitHubClient) GetTarballLink(tag string) (*url.URL, error)
- func (g *GitHubClient) GetZipballLink(tag string) (*url.URL, error)
- func (g *GitHubClient) ListReleaseAssets(release github.RepositoryRelease) ([]*github.ReleaseAsset, error)
- func (g *GitHubClient) ListReleases() ([]*github.RepositoryRelease, error)
- func (g *GitHubClient) ResolveTagToCommitSHA(tagName string) (string, error)
- func (g *GitHubClient) UpdateRelease(release github.RepositoryRelease) (*github.RepositoryRelease, error)
- func (g *GitHubClient) UploadReleaseAsset(release github.RepositoryRelease, name string, file *os.File) error
- type InCommand
- type InParams
- type InRequest
- type InResponse
- type MetadataPair
- type OutCommand
- type OutParams
- type OutRequest
- type OutResponse
- type ReleaseObject
- type ReleaseObjectEnterprise
- type Source
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortByTimestamp ¶ added in v1.1.0
func SortByTimestamp(releases []*github.RepositoryRelease)
func SortByVersion ¶ added in v1.1.0
func SortByVersion(releases []*github.RepositoryRelease, versionParser *versionParser)
Types ¶
type CheckCommand ¶
type CheckCommand struct {
// contains filtered or unexported fields
}
func NewCheckCommand ¶
func NewCheckCommand(github GitHub) *CheckCommand
func (*CheckCommand) Run ¶
func (c *CheckCommand) Run(request CheckRequest) ([]Version, error)
type CheckRequest ¶
func NewCheckRequest ¶
func NewCheckRequest() CheckRequest
type GitHub ¶
type GitHub interface { ListReleases() ([]*github.RepositoryRelease, error) GetReleaseByTag(tag string) (*github.RepositoryRelease, error) GetRelease(id int) (*github.RepositoryRelease, error) CreateRelease(release github.RepositoryRelease) (*github.RepositoryRelease, error) UpdateRelease(release github.RepositoryRelease) (*github.RepositoryRelease, error) ListReleaseAssets(release github.RepositoryRelease) ([]*github.ReleaseAsset, error) UploadReleaseAsset(release github.RepositoryRelease, name string, file *os.File) error DeleteReleaseAsset(asset github.ReleaseAsset) error DownloadReleaseAsset(asset github.ReleaseAsset) (io.ReadCloser, error) GetTarballLink(tag string) (*url.URL, error) GetZipballLink(tag string) (*url.URL, error) ResolveTagToCommitSHA(tag string) (string, error) }
type GitHubClient ¶
type GitHubClient struct {
// contains filtered or unexported fields
}
func NewGitHubClient ¶
func NewGitHubClient(source Source) (*GitHubClient, error)
func (*GitHubClient) CreateRelease ¶
func (g *GitHubClient) CreateRelease(release github.RepositoryRelease) (*github.RepositoryRelease, error)
func (*GitHubClient) DeleteReleaseAsset ¶
func (g *GitHubClient) DeleteReleaseAsset(asset github.ReleaseAsset) error
func (*GitHubClient) DownloadReleaseAsset ¶
func (g *GitHubClient) DownloadReleaseAsset(asset github.ReleaseAsset) (io.ReadCloser, error)
func (*GitHubClient) GetRelease ¶
func (g *GitHubClient) GetRelease(id int) (*github.RepositoryRelease, error)
func (*GitHubClient) GetReleaseByTag ¶
func (g *GitHubClient) GetReleaseByTag(tag string) (*github.RepositoryRelease, error)
func (*GitHubClient) GetTarballLink ¶
func (g *GitHubClient) GetTarballLink(tag string) (*url.URL, error)
func (*GitHubClient) GetZipballLink ¶
func (g *GitHubClient) GetZipballLink(tag string) (*url.URL, error)
func (*GitHubClient) ListReleaseAssets ¶
func (g *GitHubClient) ListReleaseAssets(release github.RepositoryRelease) ([]*github.ReleaseAsset, error)
func (*GitHubClient) ListReleases ¶
func (g *GitHubClient) ListReleases() ([]*github.RepositoryRelease, error)
func (*GitHubClient) ResolveTagToCommitSHA ¶ added in v1.2.0
func (g *GitHubClient) ResolveTagToCommitSHA(tagName string) (string, error)
func (*GitHubClient) UpdateRelease ¶
func (g *GitHubClient) UpdateRelease(release github.RepositoryRelease) (*github.RepositoryRelease, error)
func (*GitHubClient) UploadReleaseAsset ¶
func (g *GitHubClient) UploadReleaseAsset(release github.RepositoryRelease, name string, file *os.File) error
type InRequest ¶
type InRequest struct { Source Source `json:"source"` Version *Version `json:"version"` Params InParams `json:"params"` }
func NewInRequest ¶
func NewInRequest() InRequest
type InResponse ¶
type InResponse struct { Version Version `json:"version"` Metadata []MetadataPair `json:"metadata"` }
type MetadataPair ¶
type OutCommand ¶
type OutCommand struct {
// contains filtered or unexported fields
}
func NewOutCommand ¶
func NewOutCommand(github GitHub, writer io.Writer) *OutCommand
func (*OutCommand) Run ¶
func (c *OutCommand) Run(sourceDir string, request OutRequest) (OutResponse, error)
type OutRequest ¶
func NewOutRequest ¶
func NewOutRequest() OutRequest
type OutResponse ¶
type OutResponse struct { Version Version `json:"version"` Metadata []MetadataPair `json:"metadata"` }
type ReleaseObject ¶ added in v1.5.0
type ReleaseObject struct { CreatedAt githubv4.DateTime `graphql:"createdAt"` PublishedAt githubv4.DateTime `graphql:"publishedAt"` ID string `graphql:"id"` DatabaseId githubv4.Int `graphql:"databaseId"` IsDraft bool `graphql:"isDraft"` IsPrerelease bool `graphql:"isPrerelease"` Name string `graphql:"name"` TagName string `graphql:"tagName"` URL string `graphql:"url"` }
ReleaseObject represent the graphql release object https://developer.github.com/v4/object/release
type ReleaseObjectEnterprise ¶ added in v1.7.0
type ReleaseObjectEnterprise struct { CreatedAt githubv4.DateTime `graphql:"createdAt"` PublishedAt githubv4.DateTime `graphql:"publishedAt"` ID string `graphql:"id"` IsDraft bool `graphql:"isDraft"` IsPrerelease bool `graphql:"isPrerelease"` Name string `graphql:"name"` TagName string `graphql:"tagName"` URL string `graphql:"url"` }
ReleaseObjectEnterprise Workaround until DatabaseId will appear in enterprise installation https://github.com/concourse/github-release-resource/issues/109
type Source ¶
type Source struct { Owner string `json:"owner"` Repository string `json:"repository"` // Deprecated; use Owner instead User string `json:"user"` GitHubAPIURL string `json:"github_api_url"` GitHubV4APIURL string `json:"github_v4_api_url"` GitHubUploadsURL string `json:"github_uploads_url"` AccessToken string `json:"access_token"` Drafts bool `json:"drafts"` PreRelease bool `json:"pre_release"` Release bool `json:"release"` Insecure bool `json:"insecure"` TagFilter string `json:"tag_filter"` OrderBy string `json:"order_by"` SemverConstraint string `json:"semver_constraint"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.