Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) AllReleaseTagNames(ctx context.Context, owner string, repository string) ([]string, error)
- func (c *Client) CreateRelease(ctx context.Context, owner GithubOwner, repo GithubRepo, ...) (*github.RepositoryRelease, error)
- func (c *Client) DownloadReleaseState(ctx context.Context, release *github.RepositoryRelease) (*statev1alpha1.GlobalState, error)
- func (c *Client) EditRelease(ctx context.Context, owner GithubOwner, repo GithubRepo, releaseID int64, ...) (*github.RepositoryRelease, error)
- func (c *Client) GetLatestRelease(ctx context.Context, owner GithubOwner, repo GithubRepo) (*github.RepositoryRelease, error)
- func (c *Client) GetReleaseByTag(ctx context.Context, owner GithubOwner, repo GithubRepo, tag string) (*github.RepositoryRelease, error)
- func (c *Client) UploadReleaseAsset(ctx context.Context, owner GithubOwner, repo GithubRepo, releaseID int64, ...) error
- type GithubOwner
- type GithubRepo
Constants ¶
const ( GithubOwnerBufbuild GithubOwner = "bufbuild" GithubRepoModules GithubRepo = "modules" )
Variables ¶
var ErrNotFound = errors.New("release not found")
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
NewClient returns a new HTTP client which can be used to perform actions on GitHub releases.
func (*Client) AllReleaseTagNames ¶
func (c *Client) AllReleaseTagNames( ctx context.Context, owner string, repository string, ) ([]string, error)
AllReleaseTagNames gets all release tag names for the repository.
func (*Client) CreateRelease ¶
func (c *Client) CreateRelease( ctx context.Context, owner GithubOwner, repo GithubRepo, release *github.RepositoryRelease, ) (*github.RepositoryRelease, error)
CreateRelease creates a new GitHub release under the owner and repo.
func (*Client) DownloadReleaseState ¶
func (c *Client) DownloadReleaseState( ctx context.Context, release *github.RepositoryRelease, ) (*statev1alpha1.GlobalState, error)
DownloadReleaseState loads the state.json file from the specified GitHub release.
func (*Client) EditRelease ¶
func (c *Client) EditRelease( ctx context.Context, owner GithubOwner, repo GithubRepo, releaseID int64, releaseChanges *github.RepositoryRelease, ) (*github.RepositoryRelease, error)
EditRelease performs an update of editable properties of a release (i.e. marking it not as a draft).
func (*Client) GetLatestRelease ¶
func (c *Client) GetLatestRelease( ctx context.Context, owner GithubOwner, repo GithubRepo, ) (*github.RepositoryRelease, error)
GetLatestRelease returns information about the latest GitHub release for the given org and repo (i.e. 'bufbuild', 'modules'). If no release is found, returns ErrReleaseNotFound.
func (*Client) GetReleaseByTag ¶
func (c *Client) GetReleaseByTag( ctx context.Context, owner GithubOwner, repo GithubRepo, tag string, ) (*github.RepositoryRelease, error)
GetReleaseByTag returns information about a given release (by tag name).
func (*Client) UploadReleaseAsset ¶
func (c *Client) UploadReleaseAsset( ctx context.Context, owner GithubOwner, repo GithubRepo, releaseID int64, filename string, ) error
UploadReleaseAsset uploads the specified file to the release.
type GithubOwner ¶
type GithubOwner string
type GithubRepo ¶
type GithubRepo string