Documentation ¶
Index ¶
- func PrepareImage(store StoreSetter, image *Image) ([]byte, *ocispec.Descriptor, error)
- func Pull(ctx context.Context, from target.Target, imageRef string, to target.Target) (*ocispec.Descriptor, error)
- func Push(ctx context.Context, registry target.Target, imageRef string, i *Image) (*ocispec.Descriptor, error)
- type DescriptorStore
- type Image
- type SealedContainer
- type StoreGetter
- type StoreSetter
- type TemplateArchive
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareImage ¶
func PrepareImage(store StoreSetter, image *Image) ([]byte, *ocispec.Descriptor, error)
PrepareImage is used to assemble the OCI image according to given specification.
Types ¶
type DescriptorStore ¶
func NewDescriptorStore ¶
func NewDescriptorStore() *DescriptorStore
type Image ¶
type Image struct { Config schema.Config Containers []*SealedContainer TemplateArchives []*TemplateArchive }
func ExtractImage ¶
func ExtractImage(store StoreGetter) (*Image, error)
ExtractImage extracts from the given OCI storage the crate image descriptor.
type SealedContainer ¶
type SealedContainer struct { Name string `json:"name"` Container *containerv1.Container `json:"container"` }
type StoreGetter ¶
type StoreGetter interface {
GetByName(name string) (ocispec.Descriptor, []byte, bool)
}
StoreGetter is the interface used to mock the image store.
type StoreSetter ¶
type StoreSetter interface {
Set(ocispec.Descriptor, []byte)
}
StoreSetter is the interface used to mock the image store.
type TemplateArchive ¶
Click to show internal directories.
Click to hide internal directories.