putblobdigest

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Digester

type Digester struct {
	// contains filtered or unexported fields
}

Digester computes a digest of the provided stream, if not known yet.

func DigestIfCanonicalUnknown

func DigestIfCanonicalUnknown(stream io.Reader, blobInfo types.BlobInfo) (Digester, io.Reader)

DigestIfCanonicalUnknown initiates computation of a digest.Canonical digest of stream, if a digest.Canonical digest is not supplied in the provided blobInfo; otherwise blobInfo.Digest will be used. The caller MUST use the returned stream instead of the original value.

func DigestIfUnknown

func DigestIfUnknown(stream io.Reader, blobInfo types.BlobInfo) (Digester, io.Reader)

DigestIfUnknown initiates computation of a digest.Canonical digest of stream, if no digest is supplied in the provided blobInfo; otherwise blobInfo.Digest will be used (accepting any algorithm). The caller MUST use the returned stream instead of the original value.

func (Digester) Digest

func (d Digester) Digest() digest.Digest

Digest() returns a digest value possibly computed by Digester. This must be called only after all of the stream returned by a Digester constructor has been successfully read.

Jump to

Keyboard shortcuts

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