Versions in this module Expand all Collapse all v2 v2.3.0 Dec 5, 2023 Changes in this version + var ErrNoObjectFound = fmt.Errorf("no object found") + func FromBytes(data []byte) extsort.SortType + func IsCancelationError(err error) bool + func IsGoogleEndpoint(endpoint urlpkg.URL) bool + func Less(a, b extsort.SortType) bool + func ShouldProcessURL(url *url.URL, followSymlinks bool) bool + type Bucket struct + CreationDate time.Time + Name string + func (b Bucket) JSON() string + func (b Bucket) String() string + type CsvDecoder struct + func (cd *CsvDecoder) Decode() ([]byte, error) + type ErrGivenObjectNotFound struct + ObjectAbsPath string + func (e *ErrGivenObjectNotFound) Error() string + type EventStreamDecoder interface + Decode func() ([]byte, error) + func NewCsvDecoder(reader io.Reader) EventStreamDecoder + func NewJSONDecoder(reader io.Reader) EventStreamDecoder + type Filesystem struct + func NewLocalClient(opts Options) *Filesystem + func (f *Filesystem) Copy(ctx context.Context, src, dst *url.URL, _ Metadata) error + func (f *Filesystem) Create(path string) (*os.File, error) + func (f *Filesystem) CreateTemp(dir, pattern string) (*os.File, error) + func (f *Filesystem) Delete(ctx context.Context, url *url.URL) error + func (f *Filesystem) List(ctx context.Context, src *url.URL, followSymlinks bool) <-chan *Object + func (f *Filesystem) MkdirAll(path string) error + func (f *Filesystem) MultiDelete(ctx context.Context, urlch <-chan *url.URL) <-chan *Object + func (f *Filesystem) Open(path string) (*os.File, error) + func (f *Filesystem) Rename(file *os.File, newpath string) error + func (f *Filesystem) Stat(ctx context.Context, url *url.URL) (*Object, error) + type JSONDecoder struct + func (jd *JSONDecoder) Decode() ([]byte, error) + type Metadata struct + ACL string + CacheControl string + ContentDisposition string + ContentEncoding string + ContentType string + EncryptionKeyID string + EncryptionMethod string + Expires string + StorageClass string + UserDefined map[string]string + type MockStorage struct + func NewMockStorage(ctrl *gomock.Controller) *MockStorage + func (m *MockStorage) Copy(ctx context.Context, src, dst *url.URL, metadata Metadata) error + func (m *MockStorage) Delete(ctx context.Context, src *url.URL) error + func (m *MockStorage) EXPECT() *MockStorageMockRecorder + func (m *MockStorage) List(ctx context.Context, src *url.URL, followSymlinks bool) <-chan *Object + func (m *MockStorage) MultiDelete(ctx context.Context, urls <-chan *url.URL) <-chan *Object + func (m *MockStorage) Stat(ctx context.Context, src *url.URL) (*Object, error) + type MockStorageMockRecorder struct + func (mr *MockStorageMockRecorder) Copy(ctx, src, dst, metadata interface{}) *gomock.Call + func (mr *MockStorageMockRecorder) Delete(ctx, src interface{}) *gomock.Call + func (mr *MockStorageMockRecorder) List(ctx, src, followSymlinks interface{}) *gomock.Call + func (mr *MockStorageMockRecorder) MultiDelete(ctx, urls interface{}) *gomock.Call + func (mr *MockStorageMockRecorder) Stat(ctx, src interface{}) *gomock.Call + type Object struct + Err error + Etag string + ModTime *time.Time + Size int64 + StorageClass StorageClass + Type ObjectType + URL *url.URL + VersionID string + func (o *Object) JSON() string + func (o *Object) String() string + func (o Object) ToBytes() []byte + type ObjectType struct + func (o ObjectType) IsDir() bool + func (o ObjectType) IsRegular() bool + func (o ObjectType) IsSymlink() bool + func (o ObjectType) MarshalJSON() ([]byte, error) + func (o ObjectType) String() string + type Options struct + CredentialFile string + DryRun bool + Endpoint string + LogLevel log.LogLevel + MaxRetries int + NoSignRequest bool + NoSuchUploadRetryCount int + NoVerifySSL bool + Profile string + RequestPayer string + UseListObjectsV1 bool + func (o *Options) SetRegion(region string) + type S3 struct + func NewRemoteClient(ctx context.Context, url *url.URL, opts Options) (*S3, error) + func (s *S3) Copy(ctx context.Context, from, to *url.URL, metadata Metadata) error + func (s *S3) Delete(ctx context.Context, url *url.URL) error + func (s *S3) Get(ctx context.Context, from *url.URL, to io.WriterAt, concurrency int, ...) (int64, error) + func (s *S3) GetBucketVersioning(ctx context.Context, bucket string) (string, error) + func (s *S3) List(ctx context.Context, url *url.URL, _ bool) <-chan *Object + func (s *S3) ListBuckets(ctx context.Context, prefix string) ([]Bucket, error) + func (s *S3) MakeBucket(ctx context.Context, name string) error + func (s *S3) MultiDelete(ctx context.Context, urlch <-chan *url.URL) <-chan *Object + func (s *S3) Presign(ctx context.Context, from *url.URL, expire time.Duration) (string, error) + func (s *S3) Put(ctx context.Context, reader io.Reader, to *url.URL, metadata Metadata, ...) error + func (s *S3) Read(ctx context.Context, src *url.URL) (io.ReadCloser, error) + func (s *S3) RemoveBucket(ctx context.Context, name string) error + func (s *S3) RequestPayer() *string + func (s *S3) Select(ctx context.Context, url *url.URL, query *SelectQuery, ...) error + func (s *S3) SetBucketVersioning(ctx context.Context, versioningStatus, bucket string) error + func (s *S3) Stat(ctx context.Context, url *url.URL) (*Object, error) + type SelectQuery struct + CompressionType string + Expression string + ExpressionType string + FileHeaderInfo string + InputContentStructure string + InputFormat string + OutputFormat string + type SessionCache struct + func (sc *SessionCache) Clear() + type Storage interface + Copy func(ctx context.Context, src, dst *url.URL, metadata Metadata) error + Delete func(ctx context.Context, src *url.URL) error + List func(ctx context.Context, src *url.URL, followSymlinks bool) <-chan *Object + MultiDelete func(ctx context.Context, urls <-chan *url.URL) <-chan *Object + Stat func(ctx context.Context, src *url.URL) (*Object, error) + func NewClient(ctx context.Context, url *url.URL, opts Options) (Storage, error) + type StorageClass string + func (s StorageClass) IsGlacier() bool