puller

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPuller

type MockPuller struct {
	mock.Mock
}

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

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

type MockPuller_Pull_Call struct {
	*mock.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 (*MockPuller_Pull_Call) Run

func (*MockPuller_Pull_Call) RunAndReturn

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

func WithLogger

func WithLogger(l *slog.Logger) Option

WithLogger sets the logger 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

func NewPuller

func NewPuller(opts ...Option) Puller

NewPuller creates a new puller

Jump to

Keyboard shortcuts

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