Documentation
¶
Index ¶
- func Add(ctx context.Context, client *github.Client, name string, permissions []string) (*github.Authorization, error)
- func AnonClient() *github.Client
- func ClientFromCredentials(username string, password string, OTP string) *github.Client
- func ClientFromToken(token string) *github.Client
- func CreateRelease(ctx context.Context, client *github.Client, ...) (*github.RepositoryRelease, error)
- func Delete(ctx context.Context, client *github.Client, id int) error
- func DeleteRelease(ctx context.Context, client *github.Client, owner string, repo string, ...) error
- func DeleteReleaseAsset(ctx context.Context, client *github.Client, owner string, repo string, id int) error
- func DownloadAsset(url string, out io.Writer) error
- func GeneratePersonalAuthTokenRequest(name string, permissions []string) (*github.AuthorizationRequest, []string)
- func GetReleaseByID(ctx context.Context, client *github.Client, owner string, repo string, id int) (*github.RepositoryRelease, error)
- func List(ctx context.Context, client *github.Client) (map[string]*github.Authorization, error)
- func ListReleaseAssets(ctx context.Context, client *github.Client, owner string, repo string, ...) ([]*github.ReleaseAsset, error)
- func ListReleases(ctx context.Context, client *github.Client, owner string, repo string) ([]*github.RepositoryRelease, error)
- func ReleaseExists(ctx context.Context, client *github.Client, owner string, repo string, ...) (bool, error)
- func ReleaseID(ctx context.Context, client *github.Client, owner string, repo string, ...) (int, error)
- func UploadMultipleReleaseAssets(ctx context.Context, client *github.Client, owner string, repo string, ...)
- func UploadReleaseAsset(ctx context.Context, client *github.Client, owner string, repo string, ...) error
- func UploadReleaseAssets(ctx context.Context, client *github.Client, owner string, repo string, ...) []error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(ctx context.Context, client *github.Client, name string, permissions []string) (*github.Authorization, error)
Add creates a new authorization token on the remote.
func AnonClient ¶
AnonClient creates a new github.Client instance, using an anonymous transport.
func ClientFromCredentials ¶
ClientFromCredentials creates a new github.Client instance, using a BasicAuthTransport.
func ClientFromToken ¶
ClientFromToken creates a new github.Client instance, using an OAuth2 transport.
func CreateRelease ¶
func CreateRelease(ctx context.Context, client *github.Client, owner, repo, version, author string, draft bool, body string) (*github.RepositoryRelease, error)
CreateRelease creates a new release on the remote repository.
func DeleteRelease ¶
func DeleteRelease(ctx context.Context, client *github.Client, owner string, repo string, version string) error
DeleteRelease deletes a release from the remote repository.
func DeleteReleaseAsset ¶
func DeleteReleaseAsset(ctx context.Context, client *github.Client, owner string, repo string, id int) error
DeleteReleaseAsset deletes a release asset from the remote repository.
func DownloadAsset ¶
DownloadAsset downloads an asset from a release, it handles redirect.
func GeneratePersonalAuthTokenRequest ¶
func GeneratePersonalAuthTokenRequest(name string, permissions []string) (*github.AuthorizationRequest, []string)
GeneratePersonalAuthTokenRequest forges a request to create the personal access token on the remote
func GetReleaseByID ¶
func GetReleaseByID(ctx context.Context, client *github.Client, owner string, repo string, id int) (*github.RepositoryRelease, error)
GetReleaseByID gets a release by its id on the the remote
func ListReleaseAssets ¶
func ListReleaseAssets(ctx context.Context, client *github.Client, owner string, repo string, release github.RepositoryRelease) ([]*github.ReleaseAsset, error)
ListReleaseAssets retrieves the first 200 release assets on the remote
func ListReleases ¶
func ListReleases(ctx context.Context, client *github.Client, owner string, repo string) ([]*github.RepositoryRelease, error)
ListReleases fetches first 200 releases on the remote.
func ReleaseExists ¶
func ReleaseExists(ctx context.Context, client *github.Client, owner string, repo string, version string, draft bool) (bool, error)
ReleaseExists tells if a release exits by its version on the remote
func ReleaseID ¶
func ReleaseID(ctx context.Context, client *github.Client, owner string, repo string, version string) (int, error)
ReleaseID get ID of a release givne its version.
func UploadMultipleReleaseAssets ¶
func UploadMultipleReleaseAssets(ctx context.Context, client *github.Client, owner string, repo string, releaseID int, files []string, info chan<- error)
UploadMultipleReleaseAssets uploads multiple assets to the remote release identified by its release ID.
Types ¶
This section is empty.