Documentation ¶
Index ¶
- func AssertReaderIsEmpty(t *testing.T, reader io.Reader)
- func Contains(s *[]string, e string) bool
- func CreateTar(w io.Writer, r *io.LimitedReader)
- func MakeDefaultInMemoryStorageFolder() *memory.Folder
- func MakeDefaultUploader(uploaderAPI s3manageriface.UploaderAPI) *s3.Uploader
- func NewLz4CompressingPipeWriter(input io.Reader) *internal.CompressingPipeWriter
- func NewMockS3Client(err, notFound bool) *mockS3Client
- func NewMockS3Uploader(multiErr, err bool, storage *memory.Storage) *mockS3Uploader
- func NewMockUploader(apiMultiErr, apiErr bool) *internal.Uploader
- func NewStoringMockUploader(storage *memory.Storage, deltaDataFolder internal.DataFolder) *internal.Uploader
- type BufferTarBall
- func (tarBall *BufferTarBall) AddSize(add int64)
- func (tarBall *BufferTarBall) AwaitUploads()
- func (tarBall *BufferTarBall) CloseTar() error
- func (tarBall *BufferTarBall) SetUp(crypter internal.Crypter, args ...string)
- func (tarBall *BufferTarBall) Size() int64
- func (tarBall *BufferTarBall) TarWriter() *tar.Writer
- type BufferTarBallMaker
- type BufferTarInterpreter
- type FileReaderMaker
- type FileTarBall
- func (tarBall *FileTarBall) AddSize(i int64)
- func (tarBall *FileTarBall) AwaitUploads()
- func (tarBall *FileTarBall) CloseTar() error
- func (tarBall *FileTarBall) SetUp(crypter internal.Crypter, names ...string)
- func (tarBall *FileTarBall) Size() int64
- func (tarBall *FileTarBall) TarWriter() *tar.Writer
- type FileTarBallMaker
- type MockCompressingWriter
- type MockCompressor
- type MockDataFolder
- type MockReadWriteCloser
- type NOPTarInterpreter
- type NopCloser
- type NopSeeker
- type ReadWriteNopCloser
- type StrideByteReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTar ¶
func CreateTar(w io.Writer, r *io.LimitedReader)
CreateTar creates a new tarball from the passed in reader and writes to a destination writer.
func MakeDefaultInMemoryStorageFolder ¶ added in v0.2.1
func MakeDefaultUploader ¶ added in v0.2.1
func MakeDefaultUploader(uploaderAPI s3manageriface.UploaderAPI) *s3.Uploader
func NewLz4CompressingPipeWriter ¶
func NewLz4CompressingPipeWriter(input io.Reader) *internal.CompressingPipeWriter
func NewMockS3Client ¶
func NewMockS3Client(err, notFound bool) *mockS3Client
func NewMockS3Uploader ¶
func NewMockUploader ¶
func NewStoringMockUploader ¶
Types ¶
type BufferTarBall ¶
type BufferTarBall struct {
// contains filtered or unexported fields
}
BufferTarBall represents a tarball that is written to buffer.
func (*BufferTarBall) AddSize ¶
func (tarBall *BufferTarBall) AddSize(add int64)
func (*BufferTarBall) AwaitUploads ¶
func (tarBall *BufferTarBall) AwaitUploads()
func (*BufferTarBall) CloseTar ¶
func (tarBall *BufferTarBall) CloseTar() error
func (*BufferTarBall) SetUp ¶
func (tarBall *BufferTarBall) SetUp(crypter internal.Crypter, args ...string)
func (*BufferTarBall) Size ¶
func (tarBall *BufferTarBall) Size() int64
func (*BufferTarBall) TarWriter ¶
func (tarBall *BufferTarBall) TarWriter() *tar.Writer
type BufferTarBallMaker ¶
type BufferTarInterpreter ¶
type BufferTarInterpreter struct {
Out []byte
}
BufferTarInterpreter extracts data to a byte slice. Used for testing purposes.
type FileReaderMaker ¶
type FileReaderMaker struct {
Key string
}
FileReaderMaker decompresses lzop tarballs from the passed in file.
func (*FileReaderMaker) Path ¶
func (f *FileReaderMaker) Path() string
func (*FileReaderMaker) Reader ¶
func (f *FileReaderMaker) Reader() (io.ReadCloser, error)
Reader creates a new reader from the passed in file.
type FileTarBall ¶
type FileTarBall struct {
// contains filtered or unexported fields
}
FileTarBall represents a tarball that is written to disk.
func (*FileTarBall) AddSize ¶
func (tarBall *FileTarBall) AddSize(i int64)
func (*FileTarBall) AwaitUploads ¶
func (tarBall *FileTarBall) AwaitUploads()
func (*FileTarBall) CloseTar ¶
func (tarBall *FileTarBall) CloseTar() error
CloseTar closes the tar writer and file, flushing any unwritten data to the file before closing.
func (*FileTarBall) SetUp ¶
func (tarBall *FileTarBall) SetUp(crypter internal.Crypter, names ...string)
SetUp creates a new LZ4 writer, tar writer and file for writing bundled compressed bytes to.
func (*FileTarBall) Size ¶
func (tarBall *FileTarBall) Size() int64
func (*FileTarBall) TarWriter ¶
func (tarBall *FileTarBall) TarWriter() *tar.Writer
type FileTarBallMaker ¶
type FileTarBallMaker struct { Out string // contains filtered or unexported fields }
FileTarBallMaker creates a new FileTarBall with the directory that files should be extracted to.
type MockCompressingWriter ¶
func (*MockCompressingWriter) Close ¶
func (writer *MockCompressingWriter) Close() error
type MockCompressor ¶
type MockCompressor struct{}
func (*MockCompressor) FileExtension ¶
func (compressor *MockCompressor) FileExtension() string
func (*MockCompressor) NewWriter ¶
func (compressor *MockCompressor) NewWriter(writer io.Writer) internal.ReaderFromWriteCloser
type MockDataFolder ¶
func NewMockDataFolder ¶
func NewMockDataFolder() *MockDataFolder
func (*MockDataFolder) CleanFolder ¶
func (folder *MockDataFolder) CleanFolder() error
func (*MockDataFolder) IsEmpty ¶
func (folder *MockDataFolder) IsEmpty() bool
func (*MockDataFolder) OpenReadonlyFile ¶
func (folder *MockDataFolder) OpenReadonlyFile(filename string) (io.ReadCloser, error)
func (*MockDataFolder) OpenWriteOnlyFile ¶
func (folder *MockDataFolder) OpenWriteOnlyFile(filename string) (io.WriteCloser, error)
type MockReadWriteCloser ¶
type MockReadWriteCloser struct{}
func (*MockReadWriteCloser) Close ¶
func (readWriterCloser *MockReadWriteCloser) Close() error
type ReadWriteNopCloser ¶
type ReadWriteNopCloser struct {
io.ReadWriter
}
func (*ReadWriteNopCloser) Close ¶
func (readWriteNopCloser *ReadWriteNopCloser) Close() error
type StrideByteReader ¶
type StrideByteReader struct {
// contains filtered or unexported fields
}
StrideByteReader allows for customizable "strides" of random bytes. Creates an infinite stream.
func NewStrideByteReader ¶
func NewStrideByteReader(s int) *StrideByteReader
NewStrideByteReader creates a new random byte stride generator with a seed of 0.