loader

package
v0.0.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ManagedFieldManagerInput = "inputfileloader"
)

Variables

This section is empty.

Functions

func GetCommitFileReader added in v0.0.9

func GetCommitFileReader(path string, commit *object.Commit) pkgio.Reader[*yaml.RNode]

func GetFSReader

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

func GetFSYAMLReader

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

Types

type APILoaderFile2APIStoreAndAPI

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

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

func (*APILoaderFile2APIStoreAndAPI) Load

func (*APILoaderFile2APIStoreAndAPI) LoadFromCommit added in v0.0.9

func (r *APILoaderFile2APIStoreAndAPI) LoadFromCommit(ctx context.Context, commit *object.Commit) error

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 {
	Flags      *genericclioptions.ConfigFlags
	PathInRepo string
	//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 DevLoader added in v0.0.9

type DevLoader struct {
	Flags *genericclioptions.ConfigFlags
	Path  string
}

func (*DevLoader) Load added in v0.0.9

func (r *DevLoader) Load(ctx context.Context) 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 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
}

UpstreamLoader

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