Documentation ¶
Overview ¶
Package service provides mock functionalities for github service.
Index ¶
- Variables
- type RepositoryService
- func (r *RepositoryService) DownloadContents(ctx context.Context, owner, repo, filepath string, ...) (rdr io.ReadCloser, resp *github.Response, err error)
- func (r *RepositoryService) DownloadReleaseAsset(ctx context.Context, owner, repo string, id int64, ...) (rdr io.ReadCloser, redirectURL string, err error)
- func (r *RepositoryService) GetLatestRelease(ctx context.Context, owner, repo string) (release *github.RepositoryRelease, resp *github.Response, err error)
- func (r *RepositoryService) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (release *github.RepositoryRelease, resp *github.Response, err error)
- type RepositoryServiceMocker
Constants ¶
This section is empty.
Variables ¶
View Source
var NoMockRepositoryService = MockRepositoryService()
NoMockRepositoryService is no mock RepositoryService.
Functions ¶
This section is empty.
Types ¶
type RepositoryService ¶
RepositoryService is a github.RepositoryService.
func (*RepositoryService) DownloadContents ¶
func (r *RepositoryService) DownloadContents( ctx context.Context, owner, repo, filepath string, opts *github.RepositoryContentGetOptions, ) (rdr io.ReadCloser, resp *github.Response, err error)
DownloadContents satisfies github.RepositoryService.
func (*RepositoryService) DownloadReleaseAsset ¶
func (r *RepositoryService) DownloadReleaseAsset( ctx context.Context, owner, repo string, id int64, followRedirectsClient *http.Client, ) (rdr io.ReadCloser, redirectURL string, err error)
DownloadReleaseAsset satisfies github.RepositoryService.
func (*RepositoryService) GetLatestRelease ¶
func (r *RepositoryService) GetLatestRelease( ctx context.Context, owner, repo string, ) (release *github.RepositoryRelease, resp *github.Response, err error)
GetLatestRelease satisfies github.RepositoryService.
func (*RepositoryService) GetReleaseByTag ¶
func (r *RepositoryService) GetReleaseByTag( ctx context.Context, owner, repo, tag string, ) (release *github.RepositoryRelease, resp *github.Response, err error)
GetReleaseByTag satisfies github.RepositoryService.
type RepositoryServiceMocker ¶
type RepositoryServiceMocker func(tb testing.TB) *RepositoryService
RepositoryServiceMocker is RepositoryService mocker.
func MockRepositoryService ¶
func MockRepositoryService(mocks ...func(s *RepositoryService)) RepositoryServiceMocker
MockRepositoryService creates RepositoryService mock with cleanup to ensure all the expectations are met.
Click to show internal directories.
Click to hide internal directories.