Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateRelease(ctx context.Context, req *github.RepositoryRelease) (*github.RepositoryRelease, error)
- func (c *Client) EditRelease(ctx context.Context, releaseID int64, req *github.RepositoryRelease) (*github.RepositoryRelease, error)
- func (c *Client) GetRelease(ctx context.Context, tag string) (*github.RepositoryRelease, error)
- func (c *Client) GetRepository(ctx context.Context) (*github.Repository, error)
- func (c *Client) ListAssets(ctx context.Context, releaseID int64) ([]*github.ReleaseAsset, error)
- func (c *Client) ListReleases(ctx context.Context) ([]*github.RepositoryRelease, error)
- func (c *Client) UploadAsset(ctx context.Context, releaseID int64, filename string) (*github.ReleaseAsset, error)
- type GitHub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the client for interacting with the GitHub API
func (*Client) CreateRelease ¶
func (c *Client) CreateRelease(ctx context.Context, req *github.RepositoryRelease) (*github.RepositoryRelease, error)
CreateRelease creates a new release object in the GitHub API
func (*Client) EditRelease ¶
func (c *Client) EditRelease(ctx context.Context, releaseID int64, req *github.RepositoryRelease) (*github.RepositoryRelease, error)
EditRelease edit a release object within the GitHub API
func (*Client) GetRelease ¶
GetRelease queries the GitHub API for a specified release object
func (*Client) GetRepository ¶
GetRepository fetches a repository
func (*Client) ListAssets ¶
ListAssets lists assets associated with a given release
func (*Client) ListReleases ¶
ListReleases lists Releases given a repository
func (*Client) UploadAsset ¶
func (c *Client) UploadAsset(ctx context.Context, releaseID int64, filename string) (*github.ReleaseAsset, error)
UploadAsset uploads specified assets to a given release object
type GitHub ¶
type GitHub interface { GetRepository(ctx context.Context) (*github.Repository, error) CreateRelease(ctx context.Context, req *github.RepositoryRelease) (*github.RepositoryRelease, error) GetRelease(ctx context.Context, tag string) (*github.RepositoryRelease, error) EditRelease(ctx context.Context, releaseID int64, req *github.RepositoryRelease) (*github.RepositoryRelease, error) ListReleases(ctx context.Context) ([]*github.RepositoryRelease, error) UploadAsset(ctx context.Context, releaseID int64, filename string) (*github.ReleaseAsset, error) ListAssets(ctx context.Context, releaseID int64) ([]*github.ReleaseAsset, error) }
GitHub contains the functions necessary for interacting with GitHub release objects
func NewGitHubClient ¶
NewGitHubClient creates and initializes a new GitHubClient
Click to show internal directories.
Click to hide internal directories.