Documentation ¶
Index ¶
- func AddCloser(reader io.ReadCloser, closer io.Closer, msg ...string) io.ReadCloserdeprecated
- func AddReaderCloser(reader io.Reader, closer io.Closer, msg ...interface{}) io.ReadCloser
- func AddWriterCloser(writer io.Writer, closer io.Closer, msg ...interface{}) io.WriteCloser
- func DecodeBase64ToHex(b64encoded string) (string, error)
- func ListFiles(path string, fss ...vfs.FileSystem) ([]string, error)
- func ReadCloser(r io.Reader) io.ReadCloser
- func VerifyingReader(r io.ReadCloser, digest digest.Digest) io.ReadCloser
- func VerifyingReaderWithHash(r io.ReadCloser, hash crypto.Hash, digest string) io.ReadCloser
- func WriteCloser(w io.Writer) io.WriteCloser
- type CountingReader
- type CountingWriter
- type DigestReader
- type DigestWriter
- type HashReader
- type HashWriter
- type Hashes
- type NopCloser
- type NopWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCloser
deprecated
func AddCloser(reader io.ReadCloser, closer io.Closer, msg ...string) io.ReadCloser
Deprecated: use AddReaderCloser .
func AddReaderCloser ¶
func AddWriterCloser ¶
func DecodeBase64ToHex ¶
DecodeBase64ToHex decodes a base64 encoded string and returns the hex representation. Any prefix like 'sha512-' or 'SHA-256:' or 'Sha1-' is removed.
func ReadCloser ¶
func ReadCloser(r io.Reader) io.ReadCloser
func VerifyingReader ¶
func VerifyingReader(r io.ReadCloser, digest digest.Digest) io.ReadCloser
func VerifyingReaderWithHash ¶
func VerifyingReaderWithHash(r io.ReadCloser, hash crypto.Hash, digest string) io.ReadCloser
func WriteCloser ¶
func WriteCloser(w io.Writer) io.WriteCloser
Types ¶
type CountingReader ¶
type CountingReader struct {
// contains filtered or unexported fields
}
func NewCountingReader ¶
func NewCountingReader(r io.Reader) *CountingReader
func (*CountingReader) Size ¶
func (r *CountingReader) Size() int64
type CountingWriter ¶
type CountingWriter struct {
// contains filtered or unexported fields
}
func NewCountingWriter ¶
func NewCountingWriter(w io.Writer) *CountingWriter
func (*CountingWriter) Size ¶
func (w *CountingWriter) Size() int64
type DigestReader ¶
type DigestReader struct {
// contains filtered or unexported fields
}
func NewDefaultDigestReader ¶
func NewDefaultDigestReader(r io.Reader) *DigestReader
func NewDigestReaderWith ¶
func NewDigestReaderWith(algorithm digest.Algorithm, r io.Reader) *DigestReader
func NewDigestReaderWithHash ¶
func NewDigestReaderWithHash(hash crypto.Hash, r io.Reader) *DigestReader
func (*DigestReader) Digest ¶
func (r *DigestReader) Digest() digest.Digest
func (*DigestReader) Size ¶
func (r *DigestReader) Size() int64
type DigestWriter ¶
type DigestWriter struct {
// contains filtered or unexported fields
}
func NewDefaultDigestWriter ¶
func NewDefaultDigestWriter(w io.WriteCloser) *DigestWriter
func NewDigestWriterWith ¶
func NewDigestWriterWith(algorithm digest.Algorithm, w io.WriteCloser) *DigestWriter
func (*DigestWriter) Digest ¶
func (r *DigestWriter) Digest() digest.Digest
func (*DigestWriter) Size ¶
func (r *DigestWriter) Size() int64
type HashReader ¶
type HashReader struct {
// contains filtered or unexported fields
}
func NewHashReader ¶
func NewHashReader(delegate io.Reader, algorithms ...crypto.Hash) *HashReader
func (*HashReader) CalcHashes ¶
func (h *HashReader) CalcHashes() (int64, error)
CalcHashes returns the total number of bytes read and an error if any besides EOF.
func (*HashReader) Hashes ¶
func (h *HashReader) Hashes() Hashes
func (*HashReader) ReadAll ¶
func (h *HashReader) ReadAll() ([]byte, error)
type HashWriter ¶
type HashWriter struct {
// contains filtered or unexported fields
}
func NewHashWriter ¶
func NewHashWriter(w io.Writer, algorithms ...crypto.Hash) *HashWriter
func (*HashWriter) Hashes ¶
func (h *HashWriter) Hashes() Hashes
type Hashes ¶
func (Hashes) AsHttpHeader ¶
Click to show internal directories.
Click to hide internal directories.