client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFromContext added in v0.0.2

func ConfigFromContext(ctx context.Context) *rest.Config

func NewPackage

func NewPackage(packageName, version string) *v1alpha1.Package

NewPackage instantiates a new v1alpha1.Package struct with the given package name

func RawConfigFromContext added in v0.0.3

func RawConfigFromContext(ctx context.Context) *api.Config

func SetupContext

func SetupContext(ctx context.Context, config *rest.Config, rawConfig *api.Config) (context.Context, error)

func SetupContextWithClient added in v0.0.3

func SetupContextWithClient(
	ctx context.Context,
	config *rest.Config,
	rawConfig *api.Config,
	client PackageV1Alpha1Client,
) context.Context

Types

type PackageInfoInterface added in v0.0.2

type PackageInfoInterface interface {
	Get(ctx context.Context, name string, packageInfo *packagev1alpha1.PackageInfo) error
	GetAll(ctx context.Context, packageInfo *packagev1alpha1.PackageInfoList) error
}

type PackageInterface

type PackageInterface interface {
	Create(ctx context.Context, p *v1alpha1.Package) error
	Update(ctx context.Context, p *v1alpha1.Package) error
	Get(ctx context.Context, pkgName string, p *v1alpha1.Package) error
	GetAll(ctx context.Context, result *v1alpha1.PackageList) error
	Watch(ctx context.Context) (watch.Interface, error)
	Delete(ctx context.Context, pkg *v1alpha1.Package, options metav1.DeleteOptions) error
}

type PackageStatus

type PackageStatus struct {
	Status  string
	Reason  string
	Message string
}

func GetStatus

func GetStatus(status *v1alpha1.PackageStatus) *PackageStatus

func GetStatusOrPending added in v0.0.3

func GetStatusOrPending(status *v1alpha1.PackageStatus) *PackageStatus

func NewPendingStatus added in v0.0.3

func NewPendingStatus() *PackageStatus

type PackageV1Alpha1Client

type PackageV1Alpha1Client interface {
	Packages() PackageInterface
	PackageInfos() PackageInfoInterface
	WithPackageStore(store cache.Store) PackageV1Alpha1Client
}

func FromContext

func FromContext(ctx context.Context) PackageV1Alpha1Client

func New added in v0.0.2

Jump to

Keyboard shortcuts

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