fake

package
v0.0.0-...-c7d747a Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageRevision

type PackageRevision struct {
	Name               string
	Namespace          string
	Uid                types.UID
	PackageRevisionKey repository.PackageRevisionKey
	PackageLifecycle   v1alpha1.PackageRevisionLifecycle
	PackageRevision    *v1alpha1.PackageRevision
	Resources          *v1alpha1.PackageRevisionResources
	Kptfile            kptfile.KptFile
}

Implementation of the repository.PackageRevision interface for testing.

func (*PackageRevision) GetKptfile

func (f *PackageRevision) GetKptfile(ctx context.Context) (kptfile.KptFile, error)

func (*PackageRevision) GetLock

func (*PackageRevision) GetPackageRevision

func (pr *PackageRevision) GetPackageRevision(context.Context) (*v1alpha1.PackageRevision, error)

func (*PackageRevision) GetResources

func (*PackageRevision) GetUpstreamLock

func (*PackageRevision) Key

func (*PackageRevision) KubeObjectName

func (pr *PackageRevision) KubeObjectName() string

func (*PackageRevision) KubeObjectNamespace

func (pr *PackageRevision) KubeObjectNamespace() string

func (*PackageRevision) Lifecycle

func (*PackageRevision) UID

func (pr *PackageRevision) UID() types.UID

func (*PackageRevision) UpdateLifecycle

type Repository

type Repository struct {
	PackageRevisions []repository.PackageRevision
	Packages         []repository.Package
}

Implementation of the repository.Repository interface for testing. TODO(mortent): Implement stub functionality for all functions from the interface.

func (*Repository) CreatePackage

func (r *Repository) CreatePackage(_ context.Context, pr *v1alpha1.Package) (repository.Package, error)

func (*Repository) CreatePackageRevision

func (r *Repository) CreatePackageRevision(_ context.Context, pr *v1alpha1.PackageRevision) (repository.PackageDraft, error)

func (*Repository) DeletePackage

func (r *Repository) DeletePackage(_ context.Context, pr repository.Package) error

func (*Repository) DeletePackageRevision

func (r *Repository) DeletePackageRevision(context.Context, repository.PackageRevision) error

func (*Repository) ListPackageRevisions

func (*Repository) ListPackages

func (*Repository) UpdatePackageRevision

Jump to

Keyboard shortcuts

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