github

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Repository RepositoryInterface
}

func NewClient

func NewClient() Client

func (Client) DownloadDB

func (c Client) DownloadDB(ctx context.Context, fileName string) (io.ReadCloser, int, error)

type DownloadDBExpectation added in v0.4.0

type DownloadDBExpectation struct {
	Args       DownloadDBInput
	ReturnArgs DownloadDBOutput
}

type DownloadDBInput added in v0.4.0

type DownloadDBInput struct {
	FileName string
}

type DownloadDBOutput added in v0.4.0

type DownloadDBOutput struct {
	FileName string
	Size     int
	Err      error
}

type MockClient added in v0.3.0

type MockClient struct {
	mock.Mock
}

func NewMockClient added in v0.4.0

func NewMockClient(downloadDBExpectations []DownloadDBExpectation) (*MockClient, error)

func (*MockClient) DownloadDB added in v0.3.0

func (_m *MockClient) DownloadDB(ctx context.Context, fileName string) (io.ReadCloser, int, error)

type Operation added in v0.3.0

type Operation interface {
	DownloadDB(ctx context.Context, fileName string) (io.ReadCloser, int, error)
}

type Repository

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

func (Repository) DownloadAsset

func (r Repository) DownloadAsset(ctx context.Context, id int64) (io.ReadCloser, string, error)

func (Repository) ListReleases

type RepositoryInterface

type RepositoryInterface interface {
	ListReleases(ctx context.Context, opt *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error)
	DownloadAsset(ctx context.Context, id int64) (io.ReadCloser, string, error)
}

Jump to

Keyboard shortcuts

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