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 ¶
we cache "bundle" in a directory with name "{repo host}/{name}-{version} or {repo host}/{name}-{version}.tgz" under cache directory
func DownloadGit ¶
func PerRepoCacheDir ¶
Types ¶
type BundleApplier ¶
type BundleApplier struct { Options *Options // contains filtered or unexported fields }
func NewDefaultApply ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.