repository

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSelectedSupplyChain added in v0.7.4

func GetSelectedSupplyChain(allSupplyChains []*v1alpha1.ClusterSupplyChain, workload *v1alpha1.Workload, log logr.Logger) ([]*v1alpha1.ClusterSupplyChain, error)

Types

type Logger added in v0.0.7

type Logger interface {
	Info(msg string, keysAndValues ...interface{})
}

type RepoCache

type RepoCache interface {
	Set(submitted, persisted *unstructured.Unstructured, ownerDiscriminant string)
	UnchangedSinceCached(submitted *unstructured.Unstructured, existingObj *unstructured.Unstructured) *unstructured.Unstructured
	UnchangedSinceCachedFromList(local *unstructured.Unstructured, remote []*unstructured.Unstructured, ownerDiscriminant string) *unstructured.Unstructured
}

func NewCache

func NewCache(l Logger) RepoCache

type Repository

type Repository interface {
	EnsureImmutableObjectExistsOnCluster(ctx context.Context, obj *unstructured.Unstructured, labels map[string]string) error
	EnsureMutableObjectExistsOnCluster(ctx context.Context, obj *unstructured.Unstructured) error
	GetTemplate(ctx context.Context, name, kind string) (client.Object, error)
	GetRunTemplate(ctx context.Context, ref v1alpha1.TemplateReference) (*v1alpha1.ClusterRunTemplate, error)
	GetSupplyChainsForWorkload(ctx context.Context, workload *v1alpha1.Workload) ([]*v1alpha1.ClusterSupplyChain, error)
	GetDeliveriesForDeliverable(ctx context.Context, deliverable *v1alpha1.Deliverable) ([]*v1alpha1.ClusterDelivery, error)
	GetWorkload(ctx context.Context, name string, namespace string) (*v1alpha1.Workload, error)
	GetDeliverable(ctx context.Context, name string, namespace string) (*v1alpha1.Deliverable, error)
	GetSupplyChain(ctx context.Context, name string) (*v1alpha1.ClusterSupplyChain, error)
	StatusUpdate(ctx context.Context, object client.Object) error
	GetRunnable(ctx context.Context, name string, namespace string) (*v1alpha1.Runnable, error)
	GetUnstructured(ctx context.Context, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
	ListUnstructured(ctx context.Context, gvk schema.GroupVersionKind, namespace string, labels map[string]string) ([]*unstructured.Unstructured, error)
	GetDelivery(ctx context.Context, name string) (*v1alpha1.ClusterDelivery, error)
	GetScheme() *runtime.Scheme
	GetServiceAccount(ctx context.Context, serviceAccountName, ns string) (*corev1.ServiceAccount, error)
	Delete(ctx context.Context, objToDelete *unstructured.Unstructured) error
}

func NewRepository

func NewRepository(client client.Client, repoCache RepoCache) Repository

type RepositoryBuilder added in v0.0.8

type RepositoryBuilder func(client client.Client, repoCache RepoCache) Repository

type SelectingObject added in v0.3.0

type SelectingObject interface {
	GetSelectors() v1alpha1.LegacySelector
	GetObjectKind() schema.ObjectKind
	GetName() string
}

func BestSelectorMatch added in v0.3.0

func BestSelectorMatch(selectable selector.Selectable, selectingObjects []SelectingObject) ([]SelectingObject, error)

BestSelectorMatch attempts at finding the selectors that best match their selectors against the selectors.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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