github

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2021 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a wrapper of GitHub API client

func NewClient

func NewClient(accessToken string) *Client

NewClient creates new Client object

func (*Client) DescribeRelease

func (c *Client) DescribeRelease(ctx context.Context, owner, repo, tag string) (*Tag, error)

DescribeRelease returns detail of the given release

func (*Client) ListTagsAndReleases

func (c *Client) ListTagsAndReleases(ctx context.Context, owner, repo string) ([]*Tag, error)

ListTagsAndReleases retrieves all tags and releases of the given repository

type ClientInterface

type ClientInterface interface {
	DescribeRelease(ctx context.Context, owner, repo, tag string) (*Tag, error)
	ListTagsAndReleases(ctx context.Context, owner, repo string) ([]*Tag, error)
}

type Release

type Release struct {
	ArtifactURLs []string
	Author       string
	Body         string
	Commit       string
	CreatedAt    time.Time
	Name         string
	PublishedAt  time.Time
	URL          string
}

type RepositoriesServiceInterface

type RepositoriesServiceInterface interface {
	GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*github.RepositoryRelease, *github.Response, error)
	GetCommit(ctx context.Context, owner, repo, sha string) (*github.RepositoryCommit, *github.Response, error)
	ListReleases(ctx context.Context, owner, repo string, opt *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error)
	ListTags(ctx context.Context, owner string, repo string, opt *github.ListOptions) ([]*github.RepositoryTag, *github.Response, error)
}

type Tag

type Tag struct {
	Name    string
	Release *Release
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL