bundle

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, repo, name, version, path, cacheDir string) (string, error)

we cache "bundle" in a directory with name "{repo host}/{name}-{version} or {repo host}/{name}-{version}.tgz" under cache directory

func DownloadFile

func DownloadFile(ctx context.Context, src string, subpath, into string) error

func DownloadGit

func DownloadGit(ctx context.Context, cloneurl string, rev string, subpath, into string) error

func DownloadTgz

func DownloadTgz(ctx context.Context, uri, subpath, into string) error

func DownloadZip

func DownloadZip(ctx context.Context, uri, subpath, into string) error

func PerRepoCacheDir

func PerRepoCacheDir(repo string, basedir string) string

func UnTarGz

func UnTarGz(r io.Reader, subpath, into string) error

Types

type Apply

type Apply interface {
	Apply(ctx context.Context, bundle *pluginsv1beta1.Plugin, into string) error
	Remove(ctx context.Context, bundle *pluginsv1beta1.Plugin) error
	Template(ctx context.Context, bundle *pluginsv1beta1.Plugin, into string) ([]byte, error)
}

type BundleApplier

type BundleApplier struct {
	Options *Options
	// contains filtered or unexported fields
}

func NewDefaultApply

func NewDefaultApply(cfg *rest.Config, cli client.Client, options *Options) *BundleApplier

func (*BundleApplier) Apply

func (b *BundleApplier) Apply(ctx context.Context, bundle *pluginsv1beta1.Plugin) error

func (*BundleApplier) Download

func (b *BundleApplier) Download(ctx context.Context, bundle *pluginsv1beta1.Plugin) (string, error)

func (*BundleApplier) Remove

func (b *BundleApplier) Remove(ctx context.Context, bundle *pluginsv1beta1.Plugin) error

func (*BundleApplier) Template

func (b *BundleApplier) Template(ctx context.Context, bundle *pluginsv1beta1.Plugin) ([]byte, error)

type DownloadMeta

type DownloadMeta struct {
	Name    string
	URL     string
	Path    string
	Chart   string
	Version string
}

type Options

type Options struct {
	CacheDir string
}

func NewDefaultOptions

func NewDefaultOptions() *Options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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