Documentation
¶
Index ¶
- type MockPuller
- type MockPuller_Expecter
- type MockPuller_Pull_Call
- type Option
- type PullMethod
- type PullOption
- func WithGithubReleaseOptions(o *github.ReleaseOptions) PullOption
- func WithHTTPOptions(o *archive.HTTPOptions) PullOption
- func WithHelmOptions(o *helm.ChartOptions) PullOption
- func WithJsonnetBundlerOptions(o *jsonnetbundler.PackageOptions) PullOption
- func WithRepositoryAuth(a transport.AuthMethod) PullOption
- type Puller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPuller ¶
MockPuller is an autogenerated mock type for the Puller type
func NewMockPuller ¶
func NewMockPuller(t interface {
mock.TestingT
Cleanup(func())
}) *MockPuller
NewMockPuller creates a new instance of MockPuller. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockPuller) EXPECT ¶
func (_m *MockPuller) EXPECT() *MockPuller_Expecter
func (*MockPuller) Pull ¶
func (_m *MockPuller) Pull(_a0 context.Context, _a1 PullMethod, _a2 *artifact.Artifact, _a3 ...PullOption) (*artifact.PullResult, error)
Pull provides a mock function with given fields: _a0, _a1, _a2, _a3
type MockPuller_Expecter ¶
type MockPuller_Expecter struct {
// contains filtered or unexported fields
}
func (*MockPuller_Expecter) Pull ¶
func (_e *MockPuller_Expecter) Pull(_a0 interface{}, _a1 interface{}, _a2 interface{}, _a3 ...interface{}) *MockPuller_Pull_Call
Pull is a helper method to define mock.On call
- _a0 context.Context
- _a1 PullMethod
- _a2 *artifact.Artifact
- _a3 ...PullOption
type MockPuller_Pull_Call ¶
MockPuller_Pull_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pull'
func (*MockPuller_Pull_Call) Return ¶
func (_c *MockPuller_Pull_Call) Return(_a0 *artifact.PullResult, _a1 error) *MockPuller_Pull_Call
func (*MockPuller_Pull_Call) Run ¶
func (_c *MockPuller_Pull_Call) Run(run func(_a0 context.Context, _a1 PullMethod, _a2 *artifact.Artifact, _a3 ...PullOption)) *MockPuller_Pull_Call
func (*MockPuller_Pull_Call) RunAndReturn ¶
func (_c *MockPuller_Pull_Call) RunAndReturn(run func(context.Context, PullMethod, *artifact.Artifact, ...PullOption) (*artifact.PullResult, error)) *MockPuller_Pull_Call
type Option ¶ added in v0.8.19
type Option func(*puller)
func WithGitRepository ¶
func WithGitRepository(r git.Repository) Option
WithGitRepository sets the git repository for the puller
type PullMethod ¶
type PullMethod int
PullMethod is the method used to pull an artifact
const ( PullMethodUnknown PullMethod = iota PullMethodHelmChart PullMethodGithubRelease PullMethodHTTPArchive PullMethodGit PullMethodJsonnetBundler )
type PullOption ¶
type PullOption func(*puller)
func WithGithubReleaseOptions ¶
func WithGithubReleaseOptions(o *github.ReleaseOptions) PullOption
WithGithubReleaseOptions sets the github release options for the puller
func WithHTTPOptions ¶
func WithHTTPOptions(o *archive.HTTPOptions) PullOption
WithHTTPOptions sets the HTTP options for the puller
func WithHelmOptions ¶
func WithHelmOptions(o *helm.ChartOptions) PullOption
WithHelmOptions sets the helm options for the puller
func WithJsonnetBundlerOptions ¶ added in v0.12.0
func WithJsonnetBundlerOptions(o *jsonnetbundler.PackageOptions) PullOption
WithJsonnetBundlerOptions sets the jsonnet bundler options for the puller
func WithRepositoryAuth ¶ added in v0.8.5
func WithRepositoryAuth(a transport.AuthMethod) PullOption
WithRepositoryAuth sets the auth transport on the git repository
type Puller ¶
type Puller interface {
// Pull pulls an artifact from a source to a destination
Pull(context.Context, PullMethod, *artifact.Artifact, ...PullOption) (*artifact.PullResult, error)
}
Puller is the interface for pulling artifacts