loader

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManagedFieldManagerInput = "inputfileloader"
)

Variables

This section is empty.

Functions

func GetFSReader

func GetFSReader(path string) pkgio.Reader[[]byte]

func GetFSYAMLReader

func GetFSYAMLReader(path string, matchgvks []schema.GroupVersionKind) pkgio.Reader[*yaml.RNode]

Types

type APILoaderCommit2APIStore

type APILoaderCommit2APIStore struct {
	Client       resourceclient.Client // client to read from the db repo since this reader reads the api from commit
	APIStore     *api.APIStore
	InternalGVKs sets.Set[schema.GroupVersionKind]
	PathInRepo   string
	DBPath       string
}

This loader is reading committed apis from the commit

func (*APILoaderCommit2APIStore) Load

type APILoaderFile2APIStoreAndAPI

type APILoaderFile2APIStoreAndAPI struct {
	Flags        *genericclioptions.ConfigFlags
	Client       resourceclient.Client
	APIStore     *api.APIStore
	Branch       string
	InternalGVKs sets.Set[schema.GroupVersionKind]
	RepoPath     string
	PathInRepo   string
	DBPath       string
}

Loader to load files from fs and apply them to api and apistore

func (*APILoaderFile2APIStoreAndAPI) Load

type APILoaderInternal

type APILoaderInternal struct {
	APIStore   *api.APIStore
	Flags      *genericclioptions.ConfigFlags
	DBPath     string
	PathInRepo string
}

func (*APILoaderInternal) Load

func (r *APILoaderInternal) Load(ctx context.Context) error

type APIStoreLoader

type APIStoreLoader struct {
	APIStore     *api.APIStore
	InternalGVKs sets.Set[schema.GroupVersionKind]
	PathInRepo   string
	DBPath       string
}

func (*APIStoreLoader) Load

type DataLoader

type DataLoader struct {
	Flags      *genericclioptions.ConfigFlags
	Client     resourceclient.Client
	Branch     string
	GVKs       []schema.GroupVersionKind
	RepoPth    string
	PathInRepo string
	// used to clean reasources
	APIStore       *api.APIStore
	InternalAPISet sets.Set[schema.GroupVersionKind]
}

func (*DataLoader) Load

func (r *DataLoader) Load(ctx context.Context) error

type DataLoaderUpstream

type DataLoaderUpstream struct {
	UpstreamClient          resourceclient.Client // used to read data from commit from upstream repo
	Client                  resourceclient.Client
	Branch                  string
	ChildGVKSet             sets.Set[schema.GroupVersionKind]
	UpstreamAnnotationValue string
	NewUpstreamData         sets.Set[corev1.ObjectReference]
}

func (*DataLoaderUpstream) Load

func (r *DataLoaderUpstream) Load(ctx context.Context, commit *object.Commit) error

type InputLoader

type InputLoader struct {
	Client         resourceclient.Client
	Branch         string
	NewInput       sets.Set[corev1.ObjectReference]
	APIStore       *api.APIStore
	InternalAPISet sets.Set[schema.GroupVersionKind]
}

func (*InputLoader) Clean

func (r *InputLoader) Clean(ctx context.Context) error

func (*InputLoader) Load

func (r *InputLoader) Load(ctx context.Context, reader pkgio.Reader[*yaml.RNode]) error

type LibraryLoader

type LibraryLoader struct {
	Client       resourceclient.Client
	Branch       string
	NewLibraries sets.Set[string]
}

func (*LibraryLoader) Clean

func (r *LibraryLoader) Clean(ctx context.Context) error

func (*LibraryLoader) Load

func (r *LibraryLoader) Load(ctx context.Context, reader pkgio.Reader[[]byte]) error

type ReconcilerLoader

type ReconcilerLoader struct {
	Client         resourceclient.Client
	Branch         string
	NewReconcilers sets.Set[string]
}

func (*ReconcilerLoader) Clean

func (r *ReconcilerLoader) Clean(ctx context.Context) error

func (*ReconcilerLoader) Load

func (r *ReconcilerLoader) Load(ctx context.Context, reader pkgio.Reader[[]byte]) error

type UpstreamCallBackFn

type UpstreamCallBackFn func(ctx context.Context, repo repository.Repository, pathInRepo string, flags *genericclioptions.ConfigFlags, commit *object.Commit, annotationVal string) error

type UpstreamLoader

type UpstreamLoader struct {
	Flags      *genericclioptions.ConfigFlags
	Client     resourceclient.Client
	Branch     string
	RepoPath   string
	PathInRepo string
	TempDir    string
	CallbackFn UpstreamCallBackFn
}

func (*UpstreamLoader) Load

func (r *UpstreamLoader) Load(ctx context.Context) error

Jump to

Keyboard shortcuts

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