Documentation ¶
Index ¶
- type BlobStore
- func (b *BlobStore) Download(ctx context.Context, remoteDir, remoteKey, localDir string, overwrite bool) error
- func (b *BlobStore) List(ctx context.Context, prefix string) ([]string, error)
- func (b *BlobStore) RemoteObjectMD5(ctx context.Context, key string) (string, error)
- func (b *BlobStore) Upload(ctx context.Context, key string, content io.Reader, overwrite bool) error
- func (b *BlobStore) UploadFromPath(ctx context.Context, key, localPath string, overwrite bool) error
- type CASStore
- func (s *CASStore) Download(ctx context.Context, remoteDir, remoteKey, localDir string, overwrite bool) error
- func (s *CASStore) List(ctx context.Context, prefix string) ([]string, error)
- func (s *CASStore) RemoteObjectMD5(ctx context.Context, key string) (string, error)
- func (s *CASStore) Upload(ctx context.Context, key string, content io.Reader, overwrite bool) error
- func (s *CASStore) UploadFromPath(ctx context.Context, key, localPath string, overwrite bool) error
- type Downloader
- type LocalBlobStore
- func (l *LocalBlobStore) Download(ctx context.Context, remoteDir, remoteKey, localDir string, overwrite bool) error
- func (l *LocalBlobStore) List(ctx context.Context, prefix string) ([]string, error)
- func (l *LocalBlobStore) RemoteObjectMD5(ctx context.Context, key string) (string, error)
- func (l *LocalBlobStore) Upload(ctx context.Context, key string, content io.Reader, overwrite bool) error
- func (l *LocalBlobStore) UploadFromPath(ctx context.Context, key, localPath string, overwrite bool) error
- type S3Client
- type Store
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobStore ¶
type BlobStore struct {
// contains filtered or unexported fields
}
func (*BlobStore) RemoteObjectMD5 ¶
type CASStore ¶
type CASStore struct {
// contains filtered or unexported fields
}
CASStore is a store that compares files by their content before syncing them. If the content is the same, the file is not copied locally to the new filename.
func (*CASStore) RemoteObjectMD5 ¶
type Downloader ¶
type Downloader interface {
Download(ctx context.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*manager.Downloader)) (n int64, err error)
}
type LocalBlobStore ¶
type LocalBlobStore struct {
// contains filtered or unexported fields
}
func NewLocalBlobStore ¶
func NewLocalBlobStore(rootDir string) *LocalBlobStore
func (*LocalBlobStore) RemoteObjectMD5 ¶
func (*LocalBlobStore) UploadFromPath ¶
type S3Client ¶
type S3Client interface { ListObjectsV2(ctx context.Context, params *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error) HeadObject(ctx context.Context, params *s3.HeadObjectInput, optFns ...func(*s3.Options)) (*s3.HeadObjectOutput, error) }
S3Client is an interface defining a subset of the S3 client methods used by BlobStore.
type Store ¶
type Store interface { Download(ctx context.Context, remoteDir, remoteKey, localDir string, overwrite bool) error List(ctx context.Context, prefix string) ([]string, error) RemoteObjectMD5(ctx context.Context, key string) (string, error) Upload(ctx context.Context, key string, content io.Reader, overwrite bool) error UploadFromPath(ctx context.Context, key, localPath string, overwrite bool) error }
Click to show internal directories.
Click to hide internal directories.