bufmanifest

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsProtoBlob

func AsProtoBlob(ctx context.Context, b manifest.Blob) (_ *modulev1alpha1.Blob, retErr error)

AsProtoBlob returns the passed blob as a proto module blob.

func NewBlobFromProto

func NewBlobFromProto(b *modulev1alpha1.Blob) (manifest.Blob, error)

NewBlobFromProto returns a Blob from a proto module blob. It makes sure the digest and content matches.

func NewBlobSetFromProto added in v1.15.0

func NewBlobSetFromProto(ctx context.Context, blobs []*modulev1alpha1.Blob) (*manifest.BlobSet, error)

NewBlobSetFromProto returns a BlobSet from a slice of proto module blobs. It makes sure the digest and content matches for each blob.

func NewBucketFromManifestBlobs

func NewBucketFromManifestBlobs(
	ctx context.Context,
	manifestBlob *modulev1alpha1.Blob,
	blobs []*modulev1alpha1.Blob,
) (storage.ReadBucket, error)

NewBucketFromManifestBlobs builds a storage bucket from a manifest blob and a set of other blobs, provided in protobuf form. It makes sure that all blobs (including manifest) content match with their digest, and additionally checks that the blob set matches completely with the manifest paths (no missing nor extra blobs). This bucket is suitable for building or exporting.

func NewDigestFromProtoDigest

func NewDigestFromProtoDigest(digest *modulev1alpha1.Digest) (*manifest.Digest, error)

NewDigestFromProtoDigest maps a modulev1alpha1.Digest to a Digest.

func NewManifestFromProto added in v1.15.0

func NewManifestFromProto(ctx context.Context, b *modulev1alpha1.Blob) (_ *manifest.Manifest, retErr error)

NewManifestFromProto returns a Manifest from a proto module blob. It makes sure the digest and content matches.

func ToProtoManifestAndBlobs

func ToProtoManifestAndBlobs(ctx context.Context, manifest *manifest.Manifest, blobs *manifest.BlobSet) (*modulev1alpha1.Blob, []*modulev1alpha1.Blob, error)

ToProtoManifestAndBlobs converts a Manifest and BlobSet to the protobuf types.

Types

This section is empty.

Jump to

Keyboard shortcuts

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