Documentation ¶
Index ¶
- func BytesLayer(data []byte, opts ...DescriptorOpt) image.Layer
- func FileLayer(path string, opts ...DescriptorOpt) (image.Layer, error)
- func JSONValueLayer(v interface{}, opts ...DescriptorOpt) (image.Layer, error)
- func ReadLayerContent(ctx context.Context, layer image.Layer) ([]byte, error)
- type Builder
- type DescriptorOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesLayer ¶
func BytesLayer(data []byte, opts ...DescriptorOpt) image.Layer
BytesLayer creates a new image.Layer from the given data. The descriptor digest will be overwritten with the digest obtained from the bytes. The descriptor size will be overwritten with the length of the data.
func JSONValueLayer ¶
func JSONValueLayer(v interface{}, opts ...DescriptorOpt) (image.Layer, error)
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBytesConfigBuilder ¶
func NewBytesConfigBuilder(data []byte, opts ...DescriptorOpt) *Builder
func NewJSONConfigBuilder ¶
func NewJSONConfigBuilder(v interface{}, opts ...DescriptorOpt) *Builder
func (*Builder) BytesLayer ¶
func (b *Builder) BytesLayer(data []byte, opts ...DescriptorOpt) *Builder
type DescriptorOpt ¶
type DescriptorOpt func(desc *ocispec.Descriptor)
func WithAnnotations ¶
func WithAnnotations(annotations map[string]string) DescriptorOpt
func WithMediaType ¶
func WithMediaType(mediaType string) DescriptorOpt
func WithPlatform ¶
func WithPlatform(platform ocispec.Platform) DescriptorOpt
Click to show internal directories.
Click to hide internal directories.