Documentation ¶
Index ¶
- Variables
- type AzureStore
- func (a AzureStore) DeleteObject(ctx context.Context, base string) error
- func (a AzureStore) FileExists(ctx context.Context, base string) (bool, error)
- func (a AzureStore) ListFiles(ctx context.Context, prefix, ignoreSuffix string, max int) ([]string, error)
- func (a AzureStore) ObjectPath(name string) string
- func (a AzureStore) OpenObject(ctx context.Context, name string) (out io.ReadCloser, err error)
- func (c AzureStore) Overwrite() bool
- func (a AzureStore) PushLocalFile(ctx context.Context, localFile, toBaseName string) (err error)
- func (c AzureStore) SetOverwrite(in bool)
- func (a AzureStore) Walk(ctx context.Context, prefix, ignoreSuffix string, ...) error
- func (a AzureStore) WriteObject(ctx context.Context, base string, f io.Reader) (err error)
- type BufferedFileReadCloser
- type GSStore
- func (s *GSStore) DeleteObject(ctx context.Context, base string) error
- func (s *GSStore) FileExists(ctx context.Context, base string) (bool, error)
- func (s *GSStore) ListFiles(ctx context.Context, prefix, ignoreSuffix string, max int) ([]string, error)
- func (s *GSStore) ObjectPath(name string) string
- func (s *GSStore) OpenObject(ctx context.Context, name string) (out io.ReadCloser, err error)
- func (c GSStore) Overwrite() bool
- func (s *GSStore) PushLocalFile(ctx context.Context, localFile, toBaseName string) (err error)
- func (c GSStore) SetOverwrite(in bool)
- func (s *GSStore) Walk(ctx context.Context, prefix, _ string, f func(filename string) (err error)) error
- func (s *GSStore) WriteObject(ctx context.Context, base string, f io.Reader) (err error)
- type GZipReadCloser
- type LocalStore
- func (s *LocalStore) DeleteObject(ctx context.Context, base string) error
- func (s *LocalStore) FileExists(ctx context.Context, base string) (bool, error)
- func (s *LocalStore) ListFiles(ctx context.Context, prefix, ignoreSuffix string, max int) ([]string, error)
- func (s *LocalStore) ObjectPath(name string) string
- func (s *LocalStore) OpenObject(ctx context.Context, name string) (out io.ReadCloser, err error)
- func (c LocalStore) Overwrite() bool
- func (s *LocalStore) PushLocalFile(ctx context.Context, localFile, toBaseName string) (err error)
- func (c LocalStore) SetOverwrite(in bool)
- func (s *LocalStore) Walk(ctx context.Context, prefix, ignoreSuffix string, ...) error
- func (s *LocalStore) WriteObject(ctx context.Context, base string, reader io.Reader) (err error)
- type MockStore
- func (m *MockStore) DeleteObject(ctx context.Context, base string) error
- func (m *MockStore) FileExists(ctx context.Context, base string) (bool, error)
- func (s *MockStore) ListFiles(ctx context.Context, prefix, ignoreSuffix string, max int) ([]string, error)
- func (m *MockStore) ObjectPath(base string) string
- func (m *MockStore) OpenObject(ctx context.Context, name string) (out io.ReadCloser, err error)
- func (m *MockStore) Overwrite() bool
- func (m *MockStore) PushLocalFile(ctx context.Context, localFile string, toBaseName string) (err error)
- func (m *MockStore) SetFile(name string, content []byte)
- func (s *MockStore) SetOverwrite(in bool)
- func (m *MockStore) Walk(ctx context.Context, prefix, _ string, f func(filename string) error) error
- func (m *MockStore) WriteObject(ctx context.Context, base string, f io.Reader) (err error)
- type S3Store
- func (s *S3Store) DeleteObject(ctx context.Context, base string) error
- func (s *S3Store) FileExists(ctx context.Context, base string) (bool, error)
- func (s *S3Store) ListFiles(ctx context.Context, prefix, ignoreSuffix string, max int) ([]string, error)
- func (s *S3Store) ObjectPath(name string) string
- func (s *S3Store) OpenObject(ctx context.Context, name string) (out io.ReadCloser, err error)
- func (c S3Store) Overwrite() bool
- func (s *S3Store) PushLocalFile(ctx context.Context, localFile, toBaseName string) (err error)
- func (c S3Store) SetOverwrite(in bool)
- func (s *S3Store) Walk(ctx context.Context, prefix, _ string, f func(filename string) (err error)) error
- func (s *S3Store) WriteObject(ctx context.Context, base string, f io.Reader) (err error)
- type SimpleGStore
- func (s *SimpleGStore) Context() (ctx context.Context, cancel func())
- func (s *SimpleGStore) FileExists(base string) (bool, error)
- func (s *SimpleGStore) ListFiles(prefix string, max int) (out []string, err error)
- func (s *SimpleGStore) ObjectPath(name string) string
- func (s *SimpleGStore) OpenObject(name string) (out io.ReadCloser, err error)
- func (s *SimpleGStore) SetOperationTimeout(d time.Duration)
- func (s *SimpleGStore) WriteObject(base string, f io.Reader) (err error)
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var StopIteration = errors.New("stop iteration")
Functions ¶
This section is empty.
Types ¶
type AzureStore ¶
type AzureStore struct {
// contains filtered or unexported fields
}
func NewAzureStore ¶
func (AzureStore) DeleteObject ¶
func (a AzureStore) DeleteObject(ctx context.Context, base string) error
func (AzureStore) FileExists ¶
func (AzureStore) ObjectPath ¶
func (a AzureStore) ObjectPath(name string) string
func (AzureStore) OpenObject ¶
func (a AzureStore) OpenObject(ctx context.Context, name string) (out io.ReadCloser, err error)
func (AzureStore) PushLocalFile ¶
func (a AzureStore) PushLocalFile(ctx context.Context, localFile, toBaseName string) (err error)
func (AzureStore) SetOverwrite ¶
func (c AzureStore) SetOverwrite(in bool)
func (AzureStore) WriteObject ¶
type BufferedFileReadCloser ¶
type BufferedFileReadCloser struct {
// contains filtered or unexported fields
}
func NewBufferedFileReadCloser ¶
func NewBufferedFileReadCloser(file *os.File) *BufferedFileReadCloser
func (*BufferedFileReadCloser) Close ¶
func (readCloser *BufferedFileReadCloser) Close() error
type GSStore ¶
type GSStore struct {
// contains filtered or unexported fields
}
func NewGSStore ¶
func (*GSStore) DeleteObject ¶
func (*GSStore) FileExists ¶
func (*GSStore) ObjectPath ¶
func (*GSStore) OpenObject ¶
func (*GSStore) PushLocalFile ¶
func (GSStore) SetOverwrite ¶
func (c GSStore) SetOverwrite(in bool)
type GZipReadCloser ¶
func NewGZipReadCloser ¶
func NewGZipReadCloser(src io.ReadCloser) (*GZipReadCloser, error)
func (*GZipReadCloser) Close ¶
func (g *GZipReadCloser) Close() error
type LocalStore ¶
type LocalStore struct {
// contains filtered or unexported fields
}
func NewLocalStore ¶
func NewLocalStore(basePath, extension, compressionType string, overwrite bool) (*LocalStore, error)
func (*LocalStore) DeleteObject ¶
func (s *LocalStore) DeleteObject(ctx context.Context, base string) error
func (*LocalStore) FileExists ¶
func (*LocalStore) ObjectPath ¶
func (s *LocalStore) ObjectPath(name string) string
func (*LocalStore) OpenObject ¶
func (s *LocalStore) OpenObject(ctx context.Context, name string) (out io.ReadCloser, err error)
func (*LocalStore) PushLocalFile ¶
func (s *LocalStore) PushLocalFile(ctx context.Context, localFile, toBaseName string) (err error)
func (LocalStore) SetOverwrite ¶
func (c LocalStore) SetOverwrite(in bool)
func (*LocalStore) WriteObject ¶
type MockStore ¶
type MockStore struct {
// contains filtered or unexported fields
}
func NewMockStore ¶
func (*MockStore) DeleteObject ¶
func (*MockStore) FileExists ¶
func (*MockStore) ObjectPath ¶
func (*MockStore) OpenObject ¶
func (*MockStore) PushLocalFile ¶
func (*MockStore) SetFile ¶
SetFile sets the content of a file. Set the value "err" to trigger an error when reading this file.
func (*MockStore) SetOverwrite ¶
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
func NewS3Store ¶
func (*S3Store) DeleteObject ¶
func (*S3Store) FileExists ¶
func (*S3Store) ObjectPath ¶
func (*S3Store) OpenObject ¶
func (*S3Store) PushLocalFile ¶
func (S3Store) SetOverwrite ¶
func (c S3Store) SetOverwrite(in bool)
type SimpleGStore ¶
type SimpleGStore struct {
// contains filtered or unexported fields
}
func NewSimpleGStore ¶
func NewSimpleGStore(baseURL string) (*SimpleGStore, error)
func (*SimpleGStore) Context ¶
func (s *SimpleGStore) Context() (ctx context.Context, cancel func())
func (*SimpleGStore) FileExists ¶
func (s *SimpleGStore) FileExists(base string) (bool, error)
func (*SimpleGStore) ListFiles ¶
func (s *SimpleGStore) ListFiles(prefix string, max int) (out []string, err error)
func (*SimpleGStore) ObjectPath ¶
func (s *SimpleGStore) ObjectPath(name string) string
func (*SimpleGStore) OpenObject ¶
func (s *SimpleGStore) OpenObject(name string) (out io.ReadCloser, err error)
func (*SimpleGStore) SetOperationTimeout ¶
func (s *SimpleGStore) SetOperationTimeout(d time.Duration)
func (*SimpleGStore) WriteObject ¶
func (s *SimpleGStore) WriteObject(base string, f io.Reader) (err error)
type Store ¶
type Store interface { OpenObject(ctx context.Context, name string) (out io.ReadCloser, err error) FileExists(ctx context.Context, base string) (bool, error) ObjectPath(base string) string WriteObject(ctx context.Context, base string, f io.Reader) (err error) PushLocalFile(ctx context.Context, localFile, toBaseName string) (err error) Overwrite() bool SetOverwrite(enabled bool) Walk(ctx context.Context, prefix, ignoreSuffix string, f func(filename string) (err error)) error ListFiles(ctx context.Context, prefix, ignoreSuffix string, max int) ([]string, error) DeleteObject(ctx context.Context, base string) error }
func NewDBinStore ¶
func NewJSONLStore ¶
func NewSimpleStore ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.