bufmanifest

package
v0.0.0-...-a078c60 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 9 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

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 NewDigestFromProtoDigest

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

NewDigestFromProtoDigest maps a modulev1alpha1.Digest to a Digest.

func NewManifestFromProto

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 NewReadBucketFromManifestBlobs

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

NewReadBucketFromManifestBlobs 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 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