github

package
v0.0.0-...-d521bd7 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRateLimitReached = errors.New("GitHub API request rate limit reached")
	ErrNoSuchUser       = errors.New("no such user")
)

Functions

func SplitRepositoryName

func SplitRepositoryName(fullName string) (owner, repo string)

SplitRepositoryName splits full GitHub repository name into owner and name parts.

Types

type Client

type Client interface {
	UserRepositories(ctx Context, username string) ([]bw.Repository, error)
}

type Context

type Context struct {
	context.Context
	// BaseURL overrides GitHub API endpoint and is intended for use in tests.
	BaseURL *url.URL
}

type GithubClient

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

func NewGithubClient

func NewGithubClient(tokenClient tokens.Client) *GithubClient

func (*GithubClient) UserRepositories

func (c *GithubClient) UserRepositories(ctx Context, username string) (repos []bw.Repository, err error)

Jump to

Keyboard shortcuts

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