Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEndpointsNotFound is the returned error when couldn't find // endpoints for a certain repository. ErrEndpointsNotFound = errors.NewKind("endpoinds not found for %s") // ErrNewRepositoriesNotFound is returned when there aren't new // repositories in the organization. ErrNewRepositoriesNotFound = errors.NewKind( "couldn't find new repositories") // ErrRateLimitExceeded is returned when the api rate limit is reached. ErrRateLimitExceeded = errors.NewKind("rate limit requests exceeded") // ErrDiscoveryStopped is returned when a discovery has been stopped. ErrDiscoveryStopped = errors.NewKind("discovery stopped") // ErrDiscoveryStop is returned when a discovery fails on Stop. ErrDiscoveryStop = errors.NewKind("discovery failed on stop") // ErrAdvertiseTimeout is returned when an advertise functions exceeds // the timeout. ErrAdvertiseTimeout = errors.NewKind("advertise repositories timeout") )
Functions ¶
func GetGHEndpoint ¶ added in v0.0.3
func GetGHEndpoint(r *github.Repository) (string, error)
GetGHEndpoint gets the enpoint for a github repository.
Types ¶
type AdvertiseGHRepositoriesFn ¶ added in v0.0.3
type AdvertiseGHRepositoriesFn func(context.Context, []*github.Repository) error
AdvertiseGHRepositoriesFn is used by a GitHub to notify that a new repository has been discovered.
type GHOrgReposIter ¶
type GHOrgReposIter struct {
// contains filtered or unexported fields
}
GHOrgReposIter is a GHRepositoriesIter by organization name.
func NewGHOrgReposIter ¶
func NewGHOrgReposIter(org string, excludedRepos []string, opts *GHReposIterOpts) *GHOrgReposIter
NewGHOrgReposIter builds a new GHOrgReposIter.
func (*GHOrgReposIter) Next ¶
func (p *GHOrgReposIter) Next( ctx context.Context, ) (*github.Repository, time.Duration, error)
Next implements the GHRepositoriesIter interface.
type GHReposIterOpts ¶
type GHReposIterOpts struct {
HTTPTimeout time.Duration
ResultsPerPage int
TimeNewRepos time.Duration
AuthToken string
}
GHReposIterOpts represents configuration options for a GHReposIter.
type GHRepositoriesIter ¶
type GHRepositoriesIter interface {
Next(context.Context) (*github.Repository, time.Duration, error)
}
GHRepositoriesIter represents an iterator of *github.Repositories
type GitHub ¶ added in v0.0.3
type GitHub struct {
// contains filtered or unexported fields
}
GitHub will retrieve the information for all the repositories for the given GHRepositoriesIterator.
func NewGitHub ¶ added in v0.0.3
func NewGitHub( advertiseRepos AdvertiseGHRepositoriesFn, iter GHRepositoriesIter, opts *GitHubOpts, ) *GitHub
NewGitHub builds a new GitHub.
Click to show internal directories.
Click to hide internal directories.