Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackifyReadCloser ¶ added in v0.7.0
type CallbackifyReadCloser struct {
// contains filtered or unexported fields
}
CallbackifyReadCloser will execute callback func in Read.
func CallbackReadCloser ¶ added in v0.7.0
func CallbackReadCloser(r io.ReadCloser, fn func([]byte)) *CallbackifyReadCloser
CallbackReadCloser will create a new CallbackifyReadCloser.
func (*CallbackifyReadCloser) Close ¶ added in v0.7.0
func (r *CallbackifyReadCloser) Close() error
Close will close underlying Reader.
type CallbackifyReader ¶ added in v0.7.0
type CallbackifyReader struct {
// contains filtered or unexported fields
}
CallbackifyReader will execute callback func in Read.
func CallbackReader ¶ added in v0.7.0
func CallbackReader(r io.Reader, fn func([]byte)) *CallbackifyReader
CallbackReader will create a new CallbackifyReader.
type LimitedReadCloser ¶
type LimitedReadCloser struct {
// contains filtered or unexported fields
}
LimitedReadCloser hasCall from underlying r and provide Close as well.
func LimitReadCloser ¶
func LimitReadCloser(r io.ReadCloser, n int64) *LimitedReadCloser
LimitReadCloser will return a limited hasCall closer.
func (*LimitedReadCloser) Close ¶
func (l *LimitedReadCloser) Close() error
Close will close underlying reader.
type SectionedReadCloser ¶
type SectionedReadCloser struct {
// contains filtered or unexported fields
}
SectionedReadCloser hasCall from underlying r and provide Close as well.
func SectionReadCloser ¶
SectionReadCloser will return a sectioned hasCall closer.
func (*SectionedReadCloser) Close ¶
func (s *SectionedReadCloser) Close() error
Close will close underlying reader.
type SeekCloseableReader ¶ added in v0.7.0
type SeekCloseableReader struct {
// contains filtered or unexported fields
}
SeekCloseableReader represents a reader that can also delegate io.Seeker and io.Closer interfaces to the underlying object if they are available.
func ReadSeekCloser ¶ added in v0.5.0
func ReadSeekCloser(r io.Reader) *SeekCloseableReader
ReadSeekCloser wraps a io.Reader returning a SeekCloseableReader. Allows the SDK to accept an io.Reader that is not also an io.Seeker for unsigned streaming payload API operations.
A ReadSeekCloser wrapping an nonseekable io.Reader used in an API operation's input will prevent that operation being retried in the case of network errors, and cause operation requests to fail if the operation requires payload signing.
NOTES: Idea borrows from AWS Go SDK.
func SizedReadSeekCloser ¶ added in v1.2.0
func SizedReadSeekCloser(r io.Reader, size int64) *SeekCloseableReader
SizedReadSeekCloser will return a size featured SeekCloseableReader.
func (*SeekCloseableReader) Close ¶ added in v0.7.0
func (r *SeekCloseableReader) Close() error
Close closes the SeekCloseableReader.
If the SeekCloseableReader is not an io.Closer nothing will be done.
func (*SeekCloseableReader) Read ¶ added in v0.7.0
func (r *SeekCloseableReader) Read(p []byte) (int, error)
Read reads from the reader up to size of p. The number of bytes read, and error if it occurred will be returned.
If the reader is not an io.Reader zero bytes read, and nil error will be returned.
Performs the same functionality as io.Reader Read
func (*SeekCloseableReader) Seek ¶ added in v0.7.0
func (r *SeekCloseableReader) Seek(offset int64, whence int) (int64, error)
Seek sets the offset for the next Read to offset, interpreted according to whence: 0 means relative to the origin of the file, 1 means relative to the current offset, and 2 means relative to the end. Seek returns the new offset and an error, if any.
If the SeekCloseableReader is not an io.Seeker nothing will be done to underlying Reader. For example: seek to end and then seek current will still return 0.