Documentation
¶
Index ¶
- Variables
- func GetMockedRepos(owner string, names []string) (repos []*github.Repository)
- type RepoFetcherMock
- func (r *RepoFetcherMock) Get(_ context.Context, owner, repo string) (*github.Repository, *github.Response, error)
- func (r *RepoFetcherMock) List(_ context.Context, owner string, opts *github.RepositoryListOptions) ([]*github.Repository, *github.Response, error)
- func (r *RepoFetcherMock) Reset()
- func (r *RepoFetcherMock) Stats(owner string) int
Constants ¶
This section is empty.
Variables ¶
View Source
var MockedReposData = map[string][]string{ "devPinned1": []string{"d1", "pinned11", "pinned12", "d3", "pinned13", "pinned14.sometimes", "d5"}, "devPinned2": []string{"pinned21", "d1", "pinned22"}, "devPinned3": []string{"d1", "pinned31"}, "devNoRepos": []string{}, "devSeven": []string{"d1", "d2", "d3", "d4", "d5", "d6", "d7"}, }
MockedReposData stores valid input data for RepoFetcherMock
Functions ¶
func GetMockedRepos ¶
func GetMockedRepos(owner string, names []string) (repos []*github.Repository)
GetMockedRepos returns MockedRepos for the passed owner and repository names
Types ¶
type RepoFetcherMock ¶
type RepoFetcherMock struct {
// contains filtered or unexported fields
}
RepoFetcherMock is a RepoFetcher mock that implements RepoFetcher
func NewRepoFetcherMock ¶
func NewRepoFetcherMock(data map[string][]string) *RepoFetcherMock
func (*RepoFetcherMock) Get ¶
func (r *RepoFetcherMock) Get(_ context.Context, owner, repo string) (*github.Repository, *github.Response, error)
func (*RepoFetcherMock) List ¶
func (r *RepoFetcherMock) List(_ context.Context, owner string, opts *github.RepositoryListOptions) ([]*github.Repository, *github.Response, error)
func (*RepoFetcherMock) Reset ¶
func (r *RepoFetcherMock) Reset()
Reset initializes the Stats of the RepoFetcherMock
func (*RepoFetcherMock) Stats ¶
func (r *RepoFetcherMock) Stats(owner string) int
Stats returns the number of times that it was called the List method for certain owner
Click to show internal directories.
Click to hide internal directories.