upload

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileIter

type FileIter interface {
	ForEach(cb func(*object.File) error) error
}

FileIter provides an iterator for the files in a tree.

type LoadType added in v0.0.5

type LoadType int

LoadType upload type.

const (
	ConfigMap LoadType = iota
	Secret
	Folder
)

LoadType options enum.

type MergeType

type MergeType string

MergeType how to merge ConfigMap data.

const (
	// Delete merge all keys (files) including removal of missing keys.
	Delete MergeType = "delete"
	// Upsert merge all keys (files) but don't remove missing keys from the repository.
	Upsert = "upsert"
)

type Uploader

type Uploader interface {
	// Upload files into config map tagged by commitID
	Upload(commitID string, iter FileIter) error
}

Uploader uploading data to target.

func NewUploader added in v0.0.5

func NewUploader(lt LoadType, o UploaderOptions) (Uploader, error)

NewUploader create uploader of specific type.

type UploaderFactory added in v0.0.5

type UploaderFactory func(o UploaderOptions) (Uploader, error)

UploaderFactory factory constructing Uploaders.

type UploaderOptions

type UploaderOptions struct {
	Kubeconfig  bool
	Source      string
	Target      string
	Namespace   string
	MergeType   MergeType
	Includes    []string
	Excludes    []string
	Labels      []string
	Annotations []string
}

UploaderOptions uploader options.

Jump to

Keyboard shortcuts

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