Documentation
¶
Index ¶
- func Download(ctx context.Context, repo, name, version, path, cacheDir string) (string, error)
- func DownloadFile(ctx context.Context, src string, subpath, into string) error
- func DownloadGit(ctx context.Context, cloneurl string, rev string, subpath, into string) error
- func DownloadTgz(ctx context.Context, uri, subpath, into string) error
- func DownloadZip(ctx context.Context, uri, subpath, into string) error
- func PerRepoCacheDir(repo string, basedir string) string
- func UnTarGz(r io.Reader, subpath, into string) error
- type Apply
- type BundleApplier
- func (b *BundleApplier) Apply(ctx context.Context, bundle *pluginsv1beta1.Plugin) error
- func (b *BundleApplier) Download(ctx context.Context, bundle *pluginsv1beta1.Plugin) (string, error)
- func (b *BundleApplier) Remove(ctx context.Context, bundle *pluginsv1beta1.Plugin) error
- func (b *BundleApplier) Template(ctx context.Context, bundle *pluginsv1beta1.Plugin) ([]byte, error)
- type DownloadMeta
- type Options
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
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)
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
Click to show internal directories.
Click to hide internal directories.