Documentation
¶
Index ¶
- Variables
- func WithStartAfterHint(startAfterHint string) func(*walkOptions)
- type FileInfo
- type FileInfoExpansion
- type FileWriter
- type Multipart
- func (m *Multipart) AllParts(ctx context.Context) (*Parts, error)
- func (m *Multipart) Cancel(ctx context.Context) error
- func (m *Multipart) Commit(ctx context.Context) error
- func (m *Multipart) Key() string
- func (m *Multipart) OrderParts(ctx context.Context) (*Parts, error)
- func (m *Multipart) Resume(ctx context.Context) error
- func (m *Multipart) SetParts(parts []*s3.Part)
- func (m *Multipart) SignUploadPart(partNumber int64, expires time.Duration) (string, error)
- func (m *Multipart) UploadID() string
- func (m *Multipart) UploadPart(ctx context.Context, partNumber int64, body io.ReadSeeker) error
- type Option
- func WithAccelerate(enable bool) Option
- func WithAccessKey(key string) Option
- func WithBucket(bucket string) Option
- func WithChunkSize(size int) Option
- func WithDriverName(name string) Option
- func WithDualStack(enable bool) Option
- func WithEncryption(enable bool) Option
- func WithForcePathStyle(enable bool) Option
- func WithHTTPClient(client *http.Client) Option
- func WithKMSKeyID(id string) Option
- func WithLogLevel(level aws.LogLevelType) Option
- func WithObjectACL(acl string) Option
- func WithRegion(region string) Option
- func WithRegionEndpoint(endpoint string) Option
- func WithRootDirectory(dir string) Option
- func WithSecretKey(key string) Option
- func WithSecure(enable bool) Option
- func WithSessionToken(token string) Option
- func WithStorageClass(class string) Option
- func WithURL(uri string) Option
- func WithUserAgent(ua string) Option
- type Parts
- type SSS
- func (s *SSS) ChunkSize() int
- func (s *SSS) Copy(ctx context.Context, sourcePath, destPath string) error
- func (s *SSS) Delete(ctx context.Context, path string) error
- func (s *SSS) DeleteAll(ctx context.Context, path string) error
- func (s *SSS) GetContent(ctx context.Context, path string) ([]byte, error)
- func (s *SSS) GetContentAndInfo(ctx context.Context, path string) ([]byte, FileInfo, error)
- func (s *SSS) GetMultipart(ctx context.Context, path string) (*Multipart, error)
- func (s *SSS) GetMultipartByUploadID(ctx context.Context, path, uploadID string) (*Multipart, error)
- func (s *SSS) GetMultipartWithUploadID(path, uploadID string) *Multipart
- func (s *SSS) List(ctx context.Context, opath string, fun func(fileInfo FileInfo) bool) error
- func (s *SSS) ListMultipart(ctx context.Context, path string, fun func(mp *Multipart) bool) error
- func (s *SSS) NewMultipart(ctx context.Context, path string) (*Multipart, error)
- func (s *SSS) PutContent(ctx context.Context, path string, contents []byte, opts ...WriterOptions) error
- func (s *SSS) Reader(ctx context.Context, path string) (io.ReadCloser, error)
- func (s *SSS) ReaderAndInfo(ctx context.Context, path string) (io.ReadCloser, FileInfo, error)
- func (s *SSS) ReaderWithOffset(ctx context.Context, path string, offset int64) (io.ReadCloser, error)
- func (s *SSS) ReaderWithOffsetAndInfo(ctx context.Context, path string, offset int64) (io.ReadCloser, FileInfo, error)
- func (s *SSS) ReaderWithOffsetAndLimit(ctx context.Context, path string, offset, limit int64) (io.ReadCloser, error)
- func (s *SSS) ReaderWithOffsetAndLimitAndInfo(ctx context.Context, path string, offset, limit int64) (io.ReadCloser, FileInfo, error)
- func (s *SSS) S3() *s3.S3
- func (s *SSS) SignCopy(ctx context.Context, sourcePath, destPath string, expires time.Duration) (string, error)
- func (s *SSS) SignDelete(path string, expires time.Duration) (string, error)
- func (s *SSS) SignGet(path string, expires time.Duration) (string, error)
- func (s *SSS) SignHead(path string, expires time.Duration) (string, error)
- func (s *SSS) SignList(path string, expires time.Duration) (string, error)
- func (s *SSS) SignPut(path string, expires time.Duration) (string, error)
- func (s *SSS) Stat(ctx context.Context, path string) (FileInfo, error)
- func (s *SSS) StatHead(ctx context.Context, path string) (FileInfo, error)
- func (s *SSS) StatHeadList(ctx context.Context, path string) (FileInfo, error)
- func (s *SSS) Walk(ctx context.Context, from string, f WalkFn, options ...func(*walkOptions)) error
- func (s *SSS) Writer(ctx context.Context, path string, opts ...WriterOptions) (FileWriter, error)
- func (s *SSS) WriterWithAppend(ctx context.Context, path string, opts ...WriterOptions) (FileWriter, error)
- func (s *SSS) WriterWithAppendByUploadID(ctx context.Context, path, uploadID string, opts ...WriterOptions) (FileWriter, error)
- type WalkFn
- type WriterOptions
Constants ¶
This section is empty.
Variables ¶
var ErrFilledBuffer = errors.New("we have enough entries")
ErrFilledBuffer is used as a return value from onFileFunc to indicate that the requested number of entries has been reached and the walk can stop.
var ErrSkipDir = errors.New("skip this directory")
ErrSkipDir is used as a return value from onFileFunc to indicate that the directory named in the call is to be skipped. It is not returned as an error by any function.
Functions ¶
func WithStartAfterHint ¶
func WithStartAfterHint(startAfterHint string) func(*walkOptions)
Types ¶
type FileInfo ¶
type FileInfo interface { // Path provides the full path of the target of this file info. Path() string fs.FileInfo }
FileInfo returns information about a given path.
type FileInfoExpansion ¶ added in v0.2.1
type FileWriter ¶
type Multipart ¶
type Multipart struct {
// contains filtered or unexported fields
}
func (*Multipart) SignUploadPart ¶
func (*Multipart) UploadPart ¶
type Option ¶
type Option func(*sssOption) error
func WithAccelerate ¶
func WithAccessKey ¶
func WithBucket ¶
func WithChunkSize ¶
func WithDriverName ¶
func WithDualStack ¶
func WithEncryption ¶
func WithForcePathStyle ¶
func WithHTTPClient ¶
func WithKMSKeyID ¶
func WithLogLevel ¶
func WithLogLevel(level aws.LogLevelType) Option
func WithObjectACL ¶
func WithRegion ¶
func WithRegionEndpoint ¶
func WithRootDirectory ¶
func WithSecretKey ¶
func WithSecure ¶
func WithSessionToken ¶
func WithStorageClass ¶
func WithUserAgent ¶
type Parts ¶
type Parts struct {
// contains filtered or unexported fields
}
func (*Parts) LastModified ¶
type SSS ¶
type SSS struct { Name string // contains filtered or unexported fields }
func (*SSS) DeleteAll ¶
DeleteAll recursively deletes all objects stored at "path" and its subpaths. We must be careful since S3 does not guarantee read after delete consistency
func (*SSS) GetContentAndInfo ¶ added in v0.2.1
func (*SSS) GetMultipart ¶
func (*SSS) GetMultipartByUploadID ¶
func (*SSS) GetMultipartWithUploadID ¶
func (*SSS) ListMultipart ¶
func (*SSS) NewMultipart ¶
func (*SSS) PutContent ¶
func (*SSS) ReaderAndInfo ¶ added in v0.2.1
func (*SSS) ReaderWithOffset ¶
func (*SSS) ReaderWithOffsetAndInfo ¶ added in v0.2.1
func (*SSS) ReaderWithOffsetAndLimit ¶
func (*SSS) ReaderWithOffsetAndLimitAndInfo ¶ added in v0.2.1
func (*SSS) SignDelete ¶
func (*SSS) Stat ¶
Stat retrieves the FileInfo for the given path, including the current size in bytes and the creation time.
func (*SSS) StatHeadList ¶
func (*SSS) Walk ¶
Walk traverses a filesystem defined within driver, starting from the given path, calling f on each file
func (*SSS) Writer ¶
func (s *SSS) Writer(ctx context.Context, path string, opts ...WriterOptions) (FileWriter, error)
func (*SSS) WriterWithAppend ¶
func (s *SSS) WriterWithAppend(ctx context.Context, path string, opts ...WriterOptions) (FileWriter, error)
func (*SSS) WriterWithAppendByUploadID ¶
func (s *SSS) WriterWithAppendByUploadID(ctx context.Context, path, uploadID string, opts ...WriterOptions) (FileWriter, error)
type WriterOptions ¶
type WriterOptions func(*writerOption)
func WithContentType ¶ added in v0.2.1
func WithContentType(contentType string) WriterOptions
WithContentType sets the content type for the object being written
func WithSHA256 ¶
func WithSHA256(sha256 string) WriterOptions