bundles

package
v1.2.236 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArchiveSchema  = "archive:"
	RegistrySchema = "docker://"
)

Variables

This section is empty.

Functions

func BundleTagToChartVersion added in v1.2.172

func BundleTagToChartVersion(ctx context.Context, tag string, now time.Time) (*semver.Version, error)

func BytesToChart added in v1.2.169

func BytesToChart(data []byte) (*chart.Chart, error)

func ChartToBytes added in v1.2.169

func ChartToBytes(ch *chart.Chart) ([]byte, error)

func Copy added in v1.2.92

func Copy(ctx context.Context, fromAddr, toAddr *Addr, opts CopyOptions) error

func GetChartNameOverwrite added in v1.2.200

func GetChartNameOverwrite(targetRepo, renameChart string, helmCompatibleChart bool) *string

func Publish

func Publish(ctx context.Context, bundle *chart_extender.Bundle, bundleRef string, bundlesRegistryClient *registry.Client, opts PublishOptions) error

func Pull

func Pull(ctx context.Context, bundleRef, destDir string, bundlesRegistryClient *registry.Client) error

func SaveChartValues added in v1.2.172

func SaveChartValues(ctx context.Context, ch *chart.Chart) error

Types

type Addr added in v1.2.169

type Addr struct {
	*ArchiveAddress
	*RegistryAddress
}

func ParseAddr added in v1.2.169

func ParseAddr(addr string) (*Addr, error)

func (*Addr) String added in v1.2.169

func (addr *Addr) String() string

type ArchiveAddress added in v1.2.169

type ArchiveAddress struct {
	Path string
}

type BundleAccessor added in v1.2.170

type BundleAccessor interface {
	ReadChart(ctx context.Context) (*chart.Chart, error)
	WriteChart(ctx context.Context, ch *chart.Chart) error

	CopyTo(ctx context.Context, to BundleAccessor, opts copyToOptions) error
	CopyFromArchive(ctx context.Context, fromArchive *BundleArchive, opts copyToOptions) error
	CopyFromRemote(ctx context.Context, fromRemote *RemoteBundle, opts copyToOptions) error
}

func NewBundleAccessor added in v1.2.170

func NewBundleAccessor(addr *Addr, opts BundleAccessorOptions) BundleAccessor

type BundleAccessorOptions added in v1.2.170

type BundleAccessorOptions struct {
	BundlesRegistryClient BundlesRegistryClient
	RegistryClient        docker_registry.Interface
}

type BundleArchive added in v1.2.169

type BundleArchive struct {
	Reader BundleArchiveReader
	Writer BundleArchiveWriter
}

func NewBundleArchive added in v1.2.169

func NewBundleArchive(reader BundleArchiveReader, writer BundleArchiveWriter) *BundleArchive

func (*BundleArchive) CopyFromArchive added in v1.2.170

func (bundle *BundleArchive) CopyFromArchive(ctx context.Context, fromArchive *BundleArchive, opts copyToOptions) error

func (*BundleArchive) CopyFromRemote added in v1.2.170

func (bundle *BundleArchive) CopyFromRemote(ctx context.Context, fromRemote *RemoteBundle, opts copyToOptions) error

func (*BundleArchive) CopyTo added in v1.2.170

func (bundle *BundleArchive) CopyTo(ctx context.Context, to BundleAccessor, opts copyToOptions) error

func (*BundleArchive) GetImageArchiveOpener added in v1.2.169

func (bundle *BundleArchive) GetImageArchiveOpener(imageTag string) *ImageArchiveOpener

func (*BundleArchive) ReadChart added in v1.2.170

func (bundle *BundleArchive) ReadChart(ctx context.Context) (*chart.Chart, error)

func (*BundleArchive) WriteChart added in v1.2.170

func (bundle *BundleArchive) WriteChart(ctx context.Context, ch *chart.Chart) error

type BundleArchiveFileReader added in v1.2.172

type BundleArchiveFileReader struct {
	Path string
}

func NewBundleArchiveFileReader added in v1.2.172

func NewBundleArchiveFileReader(path string) *BundleArchiveFileReader

func (*BundleArchiveFileReader) ReadChartArchive added in v1.2.172

func (reader *BundleArchiveFileReader) ReadChartArchive() ([]byte, error)

func (*BundleArchiveFileReader) ReadImageArchive added in v1.2.172

func (reader *BundleArchiveFileReader) ReadImageArchive(imageTag string) (*ImageArchiveReadCloser, error)

func (*BundleArchiveFileReader) String added in v1.2.172

func (reader *BundleArchiveFileReader) String() string

type BundleArchiveFileWriter added in v1.2.172

type BundleArchiveFileWriter struct {
	Path string
	// contains filtered or unexported fields
}

func NewBundleArchiveFileWriter added in v1.2.172

func NewBundleArchiveFileWriter(path string) *BundleArchiveFileWriter

func (*BundleArchiveFileWriter) Open added in v1.2.172

func (writer *BundleArchiveFileWriter) Open() error

func (*BundleArchiveFileWriter) Save added in v1.2.172

func (writer *BundleArchiveFileWriter) Save() error

func (*BundleArchiveFileWriter) WriteChartArchive added in v1.2.172

func (writer *BundleArchiveFileWriter) WriteChartArchive(data []byte) error

func (*BundleArchiveFileWriter) WriteImageArchive added in v1.2.172

func (writer *BundleArchiveFileWriter) WriteImageArchive(imageTag string, data []byte) error

type BundleArchiveReader added in v1.2.169

type BundleArchiveReader interface {
	String() string
	ReadChartArchive() ([]byte, error)
	ReadImageArchive(imageTag string) (*ImageArchiveReadCloser, error)
}

type BundleArchiveWriter added in v1.2.169

type BundleArchiveWriter interface {
	Open() error
	WriteChartArchive(data []byte) error
	WriteImageArchive(imageTag string, data []byte) error
	Save() error
}

type BundlesRegistryClient added in v1.2.170

type BundlesRegistryClient interface {
	PullChartToCache(ref *bundles_registry.Reference) error
	LoadChart(ref *bundles_registry.Reference) (*chart.Chart, error)
	SaveChart(ch *chart.Chart, ref *bundles_registry.Reference) error
	PushChart(ref *bundles_registry.Reference) error
}

type CopyOptions added in v1.2.169

type CopyOptions struct {
	BundlesRegistryClient                BundlesRegistryClient
	FromRegistryClient, ToRegistryClient docker_registry.Interface
	HelmCompatibleChart                  bool
	RenameChart                          string
}

type ImageArchiveOpener added in v1.2.169

type ImageArchiveOpener struct {
	Archive  *BundleArchive
	ImageTag string
}

func NewImageArchiveOpener added in v1.2.169

func NewImageArchiveOpener(archive *BundleArchive, imageTag string) *ImageArchiveOpener

func (*ImageArchiveOpener) Open added in v1.2.169

func (opener *ImageArchiveOpener) Open() (io.ReadCloser, error)

type ImageArchiveReadCloser added in v1.2.169

type ImageArchiveReadCloser struct {
	// contains filtered or unexported fields
}

func NewImageArchiveReadCloser added in v1.2.169

func NewImageArchiveReadCloser(reader io.Reader, closer func() error) *ImageArchiveReadCloser

func (*ImageArchiveReadCloser) Close added in v1.2.169

func (opener *ImageArchiveReadCloser) Close() error

func (*ImageArchiveReadCloser) Read added in v1.2.169

func (opener *ImageArchiveReadCloser) Read(p []byte) (int, error)

type PublishOptions added in v1.2.200

type PublishOptions struct {
	HelmCompatibleChart bool
	RenameChart         string
}

type RegistryAddress added in v1.2.169

type RegistryAddress struct {
	*registry.Reference
}

type RemoteBundle added in v1.2.169

type RemoteBundle struct {
	RegistryAddress       *RegistryAddress
	BundlesRegistryClient BundlesRegistryClient
	RegistryClient        docker_registry.Interface
}

func NewRemoteBundle added in v1.2.169

func NewRemoteBundle(registryAddress *RegistryAddress, bundlesRegistryClient BundlesRegistryClient, registryClient docker_registry.Interface) *RemoteBundle

func (*RemoteBundle) CopyFromArchive added in v1.2.170

func (bundle *RemoteBundle) CopyFromArchive(ctx context.Context, fromArchive *BundleArchive, opts copyToOptions) error

func (*RemoteBundle) CopyFromRemote added in v1.2.170

func (bundle *RemoteBundle) CopyFromRemote(ctx context.Context, fromRemote *RemoteBundle, opts copyToOptions) error

func (*RemoteBundle) CopyTo added in v1.2.170

func (bundle *RemoteBundle) CopyTo(ctx context.Context, to BundleAccessor, opts copyToOptions) error

func (*RemoteBundle) ReadChart added in v1.2.170

func (bundle *RemoteBundle) ReadChart(ctx context.Context) (*chart.Chart, error)

func (*RemoteBundle) WriteChart added in v1.2.170

func (bundle *RemoteBundle) WriteChart(ctx context.Context, ch *chart.Chart) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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