Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader interface { // Read reads the given bytes and returns the number of bytes read. Read([]byte) (int, error) // SHA256Hash returns the SHA256 hash of what's read. SHA256Hash() hash.Hash // N is a record of the total number of bytes read so far. N() int64 }
Reader describes a reader with a record of the number of bytes and a sha256 hash of what's read.
type ReaderWithContext ¶
type ReaderWithContext struct {
// contains filtered or unexported fields
}
ReaderWithContext provides an implementation of Reader.
func (*ReaderWithContext) N ¶
func (r *ReaderWithContext) N() int64
N returns the total number of bytes read.
func (*ReaderWithContext) Read ¶
func (r *ReaderWithContext) Read(p []byte) (int, error)
Read reads the given bytes
func (*ReaderWithContext) SHA256Hash ¶
func (r *ReaderWithContext) SHA256Hash() hash.Hash
SHA256Hash returns the SHA256 hash of the bytes read.
Click to show internal directories.
Click to hide internal directories.