Documentation
¶
Index ¶
- func BundleCreator(bundlePath string, options ...Option) func(bc sheaf.BundleConfig) error
- func LoadBundleConfig(path string) (sheaf.BundleConfig, error)
- type ArtifactsService
- type Bundle
- func (b *Bundle) Artifacts() sheaf.ArtifactsService
- func (b *Bundle) Codec() sheaf.Codec
- func (b *Bundle) Config() sheaf.BundleConfig
- func (b *Bundle) Copy(dest string) (sheaf.Bundle, error)
- func (b *Bundle) Images() (images.Set, error)
- func (b *Bundle) Manifests() (sheaf.ManifestService, error)
- func (b *Bundle) Path() string
- type BundleConfig
- func (b BundleConfig) GetName() string
- func (b BundleConfig) GetSchemaVersion() string
- func (b BundleConfig) GetUserDefinedImages() []sheaf.UserDefinedImage
- func (b BundleConfig) GetVersion() string
- func (b *BundleConfig) SetName(name string)
- func (b *BundleConfig) SetSchemaVersion(schemaVersion string)
- func (b *BundleConfig) SetUserDefinedImages(userDefinedImages []sheaf.UserDefinedImage)
- func (b *BundleConfig) SetVersion(version string)
- type BundleConfigCodec
- type BundleConfigWriter
- type BundleConfigWriterOption
- type BundleImager
- type BundleImagerOption
- type BundleOption
- type BundlePacker
- type BundlePackerOption
- type ImageRelocator
- type ImageRelocatorOption
- type ImageReplacer
- type ImageService
- type ImageServiceOption
- type Layout
- type LayoutFactory
- type LayoutOptionFunc
- type LayoutOptions
- type ManifestService
- type ManifestServiceOption
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BundleCreator ¶
func BundleCreator(bundlePath string, options ...Option) func(bc sheaf.BundleConfig) error
BundleCreator creates a function that can create bundle configs.
func LoadBundleConfig ¶
func LoadBundleConfig(path string) (sheaf.BundleConfig, error)
LoadBundleConfig loads a bundle config from a path on the filesystem.
Types ¶
type ArtifactsService ¶
type ArtifactsService struct {
// contains filtered or unexported fields
}
ArtifactsService is a service for interacting with artifacts in a fs.
func NewArtifactsService ¶
func NewArtifactsService(bundle sheaf.Bundle) *ArtifactsService
NewArtifactsService creates an instance of ArtifactsService.
func (*ArtifactsService) Image ¶
func (s *ArtifactsService) Image() sheaf.ImageService
Image is an image service for interacting with images in the artifacts.
func (*ArtifactsService) Index ¶
func (s *ArtifactsService) Index() ([]byte, error)
Index returns the contents of an artifact layout index.json as bytes.
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
Bundle is a fs that lives on a filesystem.
func NewBundle ¶
func NewBundle(bundleDir string, options ...BundleOption) (*Bundle, error)
NewBundle creates an instance of Bundle. `rootPath` points to root directory of the fs on the filesystem.
func (*Bundle) Artifacts ¶
func (b *Bundle) Artifacts() sheaf.ArtifactsService
Artifacts returns an artifacts service for the fs.
func (*Bundle) Config ¶
func (b *Bundle) Config() sheaf.BundleConfig
Config returns the configuration for the fs.
type BundleConfig ¶
type BundleConfig struct {
// contains filtered or unexported fields
}
BundleConfig is a bundle configuration.
func NewBundleConfig ¶
func NewBundleConfig(name, version string) *BundleConfig
NewBundleConfig creates a BundleConfig.
func (BundleConfig) GetName ¶
func (b BundleConfig) GetName() string
GetName returns the bundle config's name.
func (BundleConfig) GetSchemaVersion ¶
func (b BundleConfig) GetSchemaVersion() string
GetSchemaVersion returns the bundle config's schema version.
func (BundleConfig) GetUserDefinedImages ¶
func (b BundleConfig) GetUserDefinedImages() []sheaf.UserDefinedImage
GetUserDefinedImages returns the bundle config's user defined images.
func (BundleConfig) GetVersion ¶
func (b BundleConfig) GetVersion() string
GetVersion returns the bundle config's version.
func (*BundleConfig) SetName ¶
func (b *BundleConfig) SetName(name string)
SetName sets the bundle config's name.
func (*BundleConfig) SetSchemaVersion ¶
func (b *BundleConfig) SetSchemaVersion(schemaVersion string)
SetSchemaVersion sets the bundle config's schema version.
func (*BundleConfig) SetUserDefinedImages ¶
func (b *BundleConfig) SetUserDefinedImages(userDefinedImages []sheaf.UserDefinedImage)
SetUserDefinedImages sets the bundle config's user defined images.
func (*BundleConfig) SetVersion ¶
func (b *BundleConfig) SetVersion(version string)
SetVersion sets the bundle config's version.
type BundleConfigCodec ¶
type BundleConfigCodec struct { }
BundleConfigCodec is a codec for encoding/decoding bundle configs.
func NewBundleConfigCodec ¶
func NewBundleConfigCodec() *BundleConfigCodec
NewBundleConfigCodec creates an instance of BundleConfigCodec.
func (BundleConfigCodec) Decode ¶
func (b BundleConfigCodec) Decode(r io.Reader) (sheaf.BundleConfig, error)
Decode decodes b bundle config.
func (BundleConfigCodec) Encode ¶
func (b BundleConfigCodec) Encode(w io.Writer, bc sheaf.BundleConfig) error
Encode encodes a bundle config.
type BundleConfigWriter ¶
type BundleConfigWriter struct {
// contains filtered or unexported fields
}
BundleConfigWriter writes a bundle config to the filesystem.
func NewBundleConfigWriter ¶
func NewBundleConfigWriter(options ...BundleConfigWriterOption) *BundleConfigWriter
NewBundleConfigWriter creates an instance of BundleConfigWriter.
func (BundleConfigWriter) Write ¶
func (b BundleConfigWriter) Write(bundle sheaf.Bundle, config sheaf.BundleConfig) error
Write writes a bundle to the filesystem. It will use the path from the bundle argument.
type BundleConfigWriterOption ¶
type BundleConfigWriterOption func(bcw *BundleConfigWriter)
BundleConfigWriterOption is an option for configuring BundleConfigWriter.
type BundleImager ¶
type BundleImager struct {
// contains filtered or unexported fields
}
BundleImager creates an image from a bundle that lives on a filesystem.
func NewBundleImager ¶
func NewBundleImager(options ...BundleImagerOption) *BundleImager
NewBundleImager creates an instance of BundleImager.
func (BundleImager) CreateImage ¶
CreateImage create an image from a bundle.
type BundleImagerOption ¶
type BundleImagerOption func(bi *BundleImager)
BundleImagerOption is a functional option for configuring BundleImager.
func BundleImagerReporter ¶
func BundleImagerReporter(r reporter.Reporter) BundleImagerOption
BundleImagerReporter sets the reporter.
type BundleOption ¶
BundleOption is a functional option for configuring Bundle.
type BundlePacker ¶
type BundlePacker struct {
// contains filtered or unexported fields
}
BundlePacker packs bundles that live on a filesystem.
func NewBundlePacker ¶
func NewBundlePacker(options ...BundlePackerOption) *BundlePacker
NewBundlePacker creates an instance of BundlePacker.
type BundlePackerOption ¶
type BundlePackerOption func(bp *BundlePacker)
BundlePackerOption is a functional option for configuring BundlePacker.
type ImageRelocator ¶
type ImageRelocator struct {
// contains filtered or unexported fields
}
ImageRelocator relocates images to a registry.
func NewImageRelocator ¶
func NewImageRelocator(options ...ImageRelocatorOption) *ImageRelocator
NewImageRelocator creates an instance of ImageRelocator.
func (ImageRelocator) Relocate ¶
func (i ImageRelocator) Relocate(rootPath, prefix string, images []image.Name, iw sheaf.ImageWriter) error
Relocate relocates images to a registry given a prefix.
type ImageRelocatorOption ¶
type ImageRelocatorOption func(is ImageRelocator) ImageRelocator
ImageRelocatorOption is a functional option for configuring ImageRelocator.
func ImageRelocatorDryRun ¶
func ImageRelocatorDryRun(dryRun bool) ImageRelocatorOption
ImageRelocatorDryRun configures ImageRelocator to do a dry run.
func ImageRelocatorLayoutFactory ¶
func ImageRelocatorLayoutFactory(lf LayoutFactory) ImageRelocatorOption
ImageRelocatorLayoutFactory configuration the layout factory.
type ImageReplacer ¶
type ImageReplacer struct{}
ImageReplacer replaces images in manifests on a filesystem.
func NewImageReplacer ¶
func NewImageReplacer() *ImageReplacer
NewImageReplacer creates an instance of ImageReplacer.
func (ImageReplacer) Replace ¶
func (i ImageReplacer) Replace(m sheaf.BundleManifest, config sheaf.BundleConfig, prefix string) ([]byte, error)
Replace replaces container images found in a bundle manifest.
type ImageService ¶
type ImageService struct { ArtifactsService sheaf.ArtifactsService Decoder sheaf.Decoder }
ImageService uses an ArtifactsService to interact with images.
func NewImageService ¶
func NewImageService(artifactsService sheaf.ArtifactsService, options ...ImageServiceOption) *ImageService
NewImageService creates an instance of ImageService.
func (*ImageService) List ¶
func (s *ImageService) List() ([]sheaf.BundleImage, error)
List lists images from an OCI index.
type ImageServiceOption ¶
type ImageServiceOption func(is ImageService) ImageService
ImageServiceOption is a functional option for configuration ImageService.
func ImageServiceDecoder ¶
func ImageServiceDecoder(d sheaf.Decoder) ImageServiceOption
ImageServiceDecoder sets the decoder for ImageService.
type LayoutFactory ¶
LayoutFactory creates Layout given a root path.
func DefaultLayoutFactory ¶
func DefaultLayoutFactory(options ...LayoutOptionFunc) LayoutFactory
DefaultLayoutFactory generates a LayoutFactory.
type LayoutOptionFunc ¶
type LayoutOptionFunc func(options LayoutOptions) LayoutOptions
LayoutOptionFunc is a functional option for configuring DefaultLayoutFactory.
func DefaultLayoutFactoryInsecureSkipVerify ¶
func DefaultLayoutFactoryInsecureSkipVerify() LayoutOptionFunc
DefaultLayoutFactoryInsecureSkipVerify configures support for insecure registries.
type LayoutOptions ¶
type LayoutOptions struct {
// contains filtered or unexported fields
}
LayoutOptions are options for DefaultLayoutFactory.
type ManifestService ¶
type ManifestService struct {
// contains filtered or unexported fields
}
ManifestService is a service for interacting with manifests on a filesystem.
func NewManifestService ¶
func NewManifestService(manifestsDir string, options ...ManifestServiceOption) (*ManifestService, error)
NewManifestService creates an instance of ManifestService.
func (ManifestService) Add ¶
func (m ManifestService) Add(overwrite bool, manifestURIs ...string) error
Add adds zero or more manifests to the filesystem.
func (ManifestService) List ¶
func (m ManifestService) List() ([]sheaf.BundleManifest, error)
List lists manifests on the filesystem.
type ManifestServiceOption ¶
type ManifestServiceOption func(m ManifestService) ManifestService
ManifestServiceOption is a functional option for configuration ManifestService.
func ManifestServiceReporter ¶
func ManifestServiceReporter(r reporter.Reporter) ManifestServiceOption
ManifestServiceReporter sets the reporter.