upload

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: MIT Imports: 19 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 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 MergeType = "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 NewConfigMapUploader

func NewConfigMapUploader(o *UploaderOptions) (Uploader, error)

NewConfigMapUploader creates new ConfigMapUploader

func NewFolderUploader

func NewFolderUploader(o *UploaderOptions) (Uploader, error)

NewFolderUploader creates new FolderUploader

func NewSecretUploader

func NewSecretUploader(o *UploaderOptions) (Uploader, error)

NewSecretUploader creates new SecretUploader

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