github

package
v0.0.0-...-b09c308 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.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 {
	Clock      clock.Clock
	Repository RepositoryInterface
}

func NewClient

func NewClient(ctx context.Context) Client

func (Client) UploadReleaseAssets

func (c Client) UploadReleaseAssets(ctx context.Context, filePaths []string) error

type CreateReleaseArgs

type CreateReleaseArgs struct {
	Ctx             context.Context
	CtxAnything     bool
	Release         *v28github.RepositoryRelease
	ReleaseAnything bool
}

type CreateReleaseExpectation

type CreateReleaseExpectation struct {
	Args    CreateReleaseArgs
	Returns CreateReleaseReturns
}

type CreateReleaseReturns

type CreateReleaseReturns struct {
	Result   *v28github.RepositoryRelease
	Response *v28github.Response
	Err      error
}

type DeleteRefArgs

type DeleteRefArgs struct {
	Ctx         context.Context
	CtxAnything bool
	Ref         string
	RefAnything bool
}

type DeleteRefExpectation

type DeleteRefExpectation struct {
	Args    DeleteRefArgs
	Returns DeleteRefReturns
}

type DeleteRefReturns

type DeleteRefReturns struct {
	Res *v28github.Response
	Err error
}

type DeleteReleaseArgs

type DeleteReleaseArgs struct {
	Ctx         context.Context
	CtxAnything bool
	Id          int64
	IdAnything  bool
}

type DeleteReleaseExpectation

type DeleteReleaseExpectation struct {
	Args    DeleteReleaseArgs
	Returns DeleteReleaseReturns
}

type DeleteReleaseReturns

type DeleteReleaseReturns struct {
	Res *v28github.Response
	Err error
}

type GetReleaseByTagArgs

type GetReleaseByTagArgs struct {
	Ctx         context.Context
	CtxAnything bool
	Tag         string
	TagAnything bool
}

type GetReleaseByTagExpectation

type GetReleaseByTagExpectation struct {
	Args    GetReleaseByTagArgs
	Returns GetReleaseByTagReturns
}

type GetReleaseByTagReturns

type GetReleaseByTagReturns struct {
	Release  *v28github.RepositoryRelease
	Response *v28github.Response
	Err      error
}

type ListReleasesArgs

type ListReleasesArgs struct {
	Ctx         context.Context
	CtxAnything bool
	Opt         *v28github.ListOptions
	OptAnything bool
}

type ListReleasesExpectation

type ListReleasesExpectation struct {
	Args    ListReleasesArgs
	Returns ListReleasesReturns
}

type ListReleasesReturns

type ListReleasesReturns struct {
	Releases []*v28github.RepositoryRelease
	Response *v28github.Response
	Err      error
}

type MockRepositoryInterface

type MockRepositoryInterface struct {
	mock.Mock
}

MockRepositoryInterface is an autogenerated mock type for the RepositoryInterface type

func (*MockRepositoryInterface) ApplyCreateReleaseExpectation

func (_m *MockRepositoryInterface) ApplyCreateReleaseExpectation(e CreateReleaseExpectation)

func (*MockRepositoryInterface) ApplyCreateReleaseExpectations

func (_m *MockRepositoryInterface) ApplyCreateReleaseExpectations(expectations []CreateReleaseExpectation)

func (*MockRepositoryInterface) ApplyDeleteRefExpectation

func (_m *MockRepositoryInterface) ApplyDeleteRefExpectation(e DeleteRefExpectation)

func (*MockRepositoryInterface) ApplyDeleteRefExpectations

func (_m *MockRepositoryInterface) ApplyDeleteRefExpectations(expectations []DeleteRefExpectation)

func (*MockRepositoryInterface) ApplyDeleteReleaseExpectation

func (_m *MockRepositoryInterface) ApplyDeleteReleaseExpectation(e DeleteReleaseExpectation)

func (*MockRepositoryInterface) ApplyDeleteReleaseExpectations

func (_m *MockRepositoryInterface) ApplyDeleteReleaseExpectations(expectations []DeleteReleaseExpectation)

func (*MockRepositoryInterface) ApplyGetReleaseByTagExpectation

func (_m *MockRepositoryInterface) ApplyGetReleaseByTagExpectation(e GetReleaseByTagExpectation)

func (*MockRepositoryInterface) ApplyGetReleaseByTagExpectations

func (_m *MockRepositoryInterface) ApplyGetReleaseByTagExpectations(expectations []GetReleaseByTagExpectation)

func (*MockRepositoryInterface) ApplyListReleasesExpectation

func (_m *MockRepositoryInterface) ApplyListReleasesExpectation(e ListReleasesExpectation)

func (*MockRepositoryInterface) ApplyListReleasesExpectations

func (_m *MockRepositoryInterface) ApplyListReleasesExpectations(expectations []ListReleasesExpectation)

func (*MockRepositoryInterface) ApplyUploadReleaseAssetExpectation

func (_m *MockRepositoryInterface) ApplyUploadReleaseAssetExpectation(e UploadReleaseAssetExpectation)

func (*MockRepositoryInterface) ApplyUploadReleaseAssetExpectations

func (_m *MockRepositoryInterface) ApplyUploadReleaseAssetExpectations(expectations []UploadReleaseAssetExpectation)

func (*MockRepositoryInterface) CreateRelease

CreateRelease provides a mock function with given fields: ctx, release

func (*MockRepositoryInterface) DeleteRef

DeleteRef provides a mock function with given fields: ctx, ref

func (*MockRepositoryInterface) DeleteRelease

func (_m *MockRepositoryInterface) DeleteRelease(ctx context.Context, id int64) (*v28github.Response, error)

DeleteRelease provides a mock function with given fields: ctx, id

func (*MockRepositoryInterface) GetReleaseByTag

GetReleaseByTag provides a mock function with given fields: ctx, tag

func (*MockRepositoryInterface) ListReleases

ListReleases provides a mock function with given fields: ctx, opt

func (*MockRepositoryInterface) UploadReleaseAsset

UploadReleaseAsset provides a mock function with given fields: ctx, id, opt, file

type MockVCSClientInterface

type MockVCSClientInterface struct {
	mock.Mock
}

MockVCSClientInterface is an autogenerated mock type for the VCSClientInterface type

func (*MockVCSClientInterface) ApplyUploadReleaseAssetsExpectation

func (_m *MockVCSClientInterface) ApplyUploadReleaseAssetsExpectation(e UploadReleaseAssetsExpectation)

func (*MockVCSClientInterface) ApplyUploadReleaseAssetsExpectations

func (_m *MockVCSClientInterface) ApplyUploadReleaseAssetsExpectations(expectations []UploadReleaseAssetsExpectation)

func (*MockVCSClientInterface) UploadReleaseAssets

func (_m *MockVCSClientInterface) UploadReleaseAssets(ctx context.Context, filePaths []string) error

UploadReleaseAssets provides a mock function with given fields: ctx, filePaths

type Repository

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

func (Repository) CreateRelease

func (Repository) DeleteRef

func (r Repository) DeleteRef(ctx context.Context, ref string) (*github.Response, error)

func (Repository) DeleteRelease

func (r Repository) DeleteRelease(ctx context.Context, id int64) (*github.Response, error)

func (Repository) GetReleaseByTag

func (r Repository) GetReleaseByTag(ctx context.Context, tag string) (*github.RepositoryRelease, *github.Response, error)

func (Repository) ListReleases

func (Repository) UploadReleaseAsset

func (r Repository) UploadReleaseAsset(ctx context.Context, id int64, opt *github.UploadOptions, file *os.File) (*github.ReleaseAsset, *github.Response, error)

type RepositoryInterface

type RepositoryInterface interface {
	ListReleases(ctx context.Context, opt *github.ListOptions) (releases []*github.RepositoryRelease, response *github.Response, err error)
	GetReleaseByTag(ctx context.Context, tag string) (release *github.RepositoryRelease, response *github.Response, err error)
	CreateRelease(ctx context.Context, release *github.RepositoryRelease) (result *github.RepositoryRelease, response *github.Response, err error)
	UploadReleaseAsset(ctx context.Context, id int64, opt *github.UploadOptions, file *os.File) (asset *github.ReleaseAsset, response *github.Response, err error)
	DeleteRelease(ctx context.Context, id int64) (res *github.Response, err error)
	DeleteRef(ctx context.Context, ref string) (res *github.Response, err error)
}

type UploadReleaseAssetArgs

type UploadReleaseAssetArgs struct {
	Ctx          context.Context
	CtxAnything  bool
	Id           int64
	IdAnything   bool
	Opt          *v28github.UploadOptions
	OptAnything  bool
	File         *os.File
	FileAnything bool
}

type UploadReleaseAssetExpectation

type UploadReleaseAssetExpectation struct {
	Args    UploadReleaseAssetArgs
	Returns UploadReleaseAssetReturns
}

type UploadReleaseAssetReturns

type UploadReleaseAssetReturns struct {
	Asset    *v28github.ReleaseAsset
	Response *v28github.Response
	Err      error
}

type UploadReleaseAssetsArgs

type UploadReleaseAssetsArgs struct {
	Ctx               context.Context
	CtxAnything       bool
	FilePaths         []string
	FilePathsAnything bool
}

type UploadReleaseAssetsExpectation

type UploadReleaseAssetsExpectation struct {
	Args    UploadReleaseAssetsArgs
	Returns UploadReleaseAssetsReturns
}

type UploadReleaseAssetsReturns

type UploadReleaseAssetsReturns struct {
	Err error
}

type VCSClientInterface

type VCSClientInterface interface {
	UploadReleaseAssets(ctx context.Context, filePaths []string) (err error)
}

Jump to

Keyboard shortcuts

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