Versions in this module Expand all Collapse all v0 v0.0.3 Nov 14, 2021 Changes in this version + var DefaultBufferSize = 4096 + var NoBuffer = 0 + var NoDict = []byte + func CloseWriters(input *CloseWritersInput) error + func WrapWriter(w io.WriteCloser, alg string, dict []byte, bufferSize int) (io.WriteCloser, error) + func WriteAllAndClose(input *WriteAllAndCloseInput) error + func WriteFile(input *WriteFileInput) (io.WriteCloser, error) + type CloseWritersInput struct + Flush bool + Writers map[string]io.Writer + type FunctionWriteCloser struct + Closer func() error + Writer func(p []byte) (n int, err error) + func (w *FunctionWriteCloser) Close() error + func (w *FunctionWriteCloser) Write(p []byte) (n int, err error) + type ReadFromResourceInput struct + Alg string + BufferSize int + Dict []byte + Password string + PrivateKey []byte + S3Client *s3.S3 + SFTPClient *sftp.Client + SSHClient *ssh.Client + URI string + type ReadFromResourceOutput struct + Metadata *Metadata + Reader io.ReadCloser + type UploadS3ObjectInput struct + ACL string + Bucket string + Client *s3.S3 + Key string + Object io.Reader + type WriteAllAndCloseInput struct + ACL string + Alg string + Append bool + BufferSize int + Bytes []byte + Dict []byte + Parents bool + S3Client *s3.S3 + URI string type WriteBuffersInput + Dictionary []byte + type WriteFileInput struct + BufferSize int + Mode uint32 + Path string + type WriteToFileSystemInput struct + Alg string + BufferSize int + Dict []byte + Flag int + Mode uint32 + Parents bool + Path string + type WriteToResourceInput struct + ACL string + Alg string + Append bool + BufferSize int + Dict []byte + Mode uint32 + Parents bool + Password string + PrivateKey []byte + S3Client *s3.S3 + SFTPClient *sftp.Client + SSHClient *ssh.Client + URI string + type WriteToResourceOutput struct + Writer io.WriteCloser v0.0.2 Aug 24, 2019 Changes in this version + const AlgorithmBzip2 + const AlgorithmGzip + const AlgorithmNone + const AlgorithmSnappy + const AlgorithmZip + const SchemeFile + const SchemeFtp — darwin/amd64, linux/amd64, windows/amd64 + const SchemeHTTP + const SchemeHTTPS + const SchemeS3 + var Algorithms = []string + var ErrPathMissing = errors.New("path is missing") + var Schemes = []string + func CloseReaderAndWriter(inputReader ByteReadCloser, outputWriter ByteWriteCloser, brokenPipe bool) (error, error) + func ExpandOpenAndStat(path string) (*os.File, os.FileInfo, error) + func Mkdirs(p string) error + func OpenFile(path string) (*os.File, error) + func ReadAllAndClose(uri string, alg string, s3Client *s3.S3) ([]byte, error) + func ReadFromResource(uri string, alg string, bufferSize int, s3Client *s3.S3) (ByteReadCloser, *Metadata, error) + func ReadHTTPFile(uri string, alg string, bufferSize int) (ByteReadCloser, *Metadata, error) + func ReadS3Object(bucket string, key string, alg string, bufferSize int, s3Client *s3.S3) (ByteReadCloser, *Metadata, error) + func UploadS3Object(bucket string, key string, object io.Reader, s3_client *s3.S3) error + func WriteBuffers(input *WriteBuffersInput) error + func WriteBytes(alg string) (ByteWriteCloser, Buffer, error) + func WriteGzipBytes() (ByteWriteCloser, Buffer) + func WriteMemoryBytes() (ByteWriteCloser, Buffer) + type Buffer interface + Bytes func() []byte + Len func() int + String func() string + WriteRune func(r rune) (n int, err error) + WriteString func(s string) (n int, err error) + type Builder struct + func NewBuilder() *Builder + func (b *Builder) Algorithm(alg string) *Builder + func (b *Builder) BufferSize(bufferSize int) *Builder + func (b *Builder) Open() (ByteReadCloser, *Metadata, error) + func (b *Builder) S3Client(s3Client *s3.S3) *Builder + func (b *Builder) Uri(uri string) *Builder + type ByteReadCloser interface + ReadAll func() ([]byte, error) + ReadAllAndClose func() ([]byte, error) + ReadFirst func() (byte, error) + ReadRange func(start int, end int) ([]byte, error) + func ReadBytes(b []byte, alg string) (ByteReadCloser, error) + func ReadBzip2File(path string, buffer_size int) (ByteReadCloser, error) + func ReadFTPFile(uri string, alg string, bufferSize int) (ByteReadCloser, error) + func ReadFromFile(file *os.File, alg string, bufferSize int) (ByteReadCloser, error) + func ReadFromFilePath(path string, alg string, bufferSize int) (ByteReadCloser, error) + func ReadGzipBytes(b []byte) (ByteReadCloser, error) + func ReadGzipFile(path string, buffer_size int) (ByteReadCloser, error) + func ReadLocalFile(path string, bufferSize int) (ByteReadCloser, error) + func ReadMemoryBytes(b []byte) ByteReadCloser + func ReadSnappyBytes(b []byte) (ByteReadCloser, error) + func ReadSnappyFile(path string, buffer_size int) (ByteReadCloser, error) + func ReadStdin(alg string) (ByteReadCloser, error) + func ReadZipBytes(b []byte) (ByteReadCloser, error) + func ReadZipFile(path string) (ByteReadCloser, error) + type ByteReader interface + ReadBytes func(delim byte) ([]byte, error) + ReadString func(delim byte) (string, error) + func WrapReader(r io.Reader, closers []io.Closer, alg string, bufferSize int) (ByteReader, []io.Closer, error) + type ByteWriteCloser interface + CloseSafe func() error + FlushSafe func() error + Lock func() + Unlock func() + WriteError func(e error) (n int, err error) + WriteErrorSafe func(e error) (n int, err error) + WriteLine func(s string) (n int, err error) + WriteLineSafe func(s string) (n int, err error) + WriteString func(s string) (n int, err error) + func WriteGzipFile(path string, flag int) (ByteWriteCloser, error) + func WriteLocalFile(path string, flag int, parents bool) (ByteWriteCloser, error) + func WriteSnappyBytes() (ByteWriteCloser, *bytes.Buffer) + func WriteSnappyFile(path string, flag int) (ByteWriteCloser, error) + func WriteStderr(alg string) (ByteWriteCloser, error) + func WriteStdout(alg string) (ByteWriteCloser, error) + func WriteToFileSystem(uri string, alg string, flag int, parents bool) (ByteWriteCloser, error) + func WriteToResource(uri string, alg string, appendFlag bool, s3_client *s3.S3) (ByteWriteCloser, error) + type ByteWriter interface + type Cache struct + Complete *bool + Content *[]byte + Cursor int + Reader ByteReadCloser + func NewCache(r ByteReadCloser) *Cache + func NewCacheWithContent(r ByteReadCloser, c *[]byte, i int) *Cache + func (c *Cache) Close() error + func (c *Cache) Read(p []byte) (n int, err error) + func (c *Cache) ReadAll() ([]byte, error) + func (c *Cache) ReadAllAndClose() ([]byte, error) + func (c *Cache) ReadAt(i int) (byte, error) + func (c *Cache) ReadByte() (byte, error) + func (c *Cache) ReadBytes(delim byte) ([]byte, error) + func (c *Cache) ReadFirst() (byte, error) + func (c *Cache) ReadRange(start int, end int) ([]byte, error) + func (c *Cache) ReadString(delim byte) (string, error) + type Closer struct + Closers []io.Closer + func (c *Closer) Close() error + type ErrFunctionNotImplemented struct + Function string + Object string + func (e *ErrFunctionNotImplemented) Error() string + type ErrReaderNotImplemented struct + Algorithm string + func (e *ErrReaderNotImplemented) Error() string + type ErrUnknownAlgorithm struct + Algorithm string + func (e *ErrUnknownAlgorithm) Error() string + type ErrUnknownScheme struct + Scheme string + func (e *ErrUnknownScheme) Error() string + type ErrWriterNotImplemented struct + Algorithm string + func (e *ErrWriterNotImplemented) Error() string + type Flusher interface + Flush func() error + type Info interface + Mode func() os.FileMode + func Stat(uri string) (bool, Info, error) + type Metadata struct + ContentLength int64 + ContentType string + Header map[string][]string + LastModified *time.Time + func NewMetadataFromHeader(header map[string][]string) *Metadata + func NewMetadataFromS3(output *s3.GetObjectOutput) *Metadata + type Reader struct + Closer *Closer + Reader io.Reader + func (r *Reader) Close() error + func (r *Reader) Read(p []byte) (n int, err error) + func (r *Reader) ReadAll() ([]byte, error) + func (r *Reader) ReadAllAndClose() ([]byte, error) + func (r *Reader) ReadAt(p []byte, off int64) (n int, err error) + func (r *Reader) ReadByte() (byte, error) + func (r *Reader) ReadBytes(delim byte) ([]byte, error) + func (r *Reader) ReadFirst() (byte, error) + func (r *Reader) ReadRange(start int, end int) ([]byte, error) + func (r *Reader) ReadString(delim byte) (string, error) + type WriteBuffersInput struct + Algorithm string + Append bool + Buffers map[string]Buffer + Mkdirs bool + Overwrite bool + S3Client *s3.S3 + type Writer struct + Closer *Closer + Flushers []Flusher + Writer ByteWriter + func NewBufferedWriter(writer io.Writer) *Writer + func NewBufferedWriterWithClosers(writer io.Writer, closers ...io.Closer) *Writer + func NewWriter(writer ByteWriter) *Writer + func NewWriterWithClosers(writer ByteWriter, closers ...io.Closer) *Writer + func (w *Writer) Close() error + func (w *Writer) CloseSafe() error + func (w *Writer) Flush() error + func (w *Writer) FlushSafe() error + func (w *Writer) Write(p []byte) (n int, err error) + func (w *Writer) WriteByte(b byte) error + func (w *Writer) WriteError(e error) (n int, err error) + func (w *Writer) WriteErrorSafe(e error) (n int, err error) + func (w *Writer) WriteLine(s string) (n int, err error) + func (w *Writer) WriteLineSafe(s string) (n int, err error) + func (w *Writer) WriteString(s string) (n int, err error)