Documentation ¶
Overview ¶
Package s3fs inclues a file system for reading from AWS S3
Index ¶
- func Check(source string, destination string) error
- func Dir(p string) string
- func Split(p string) []string
- type Downloader
- type ReadSeeker
- type S3DirectoryEntry
- type S3File
- type S3FileInfo
- type S3FileSystem
- func (s3fs *S3FileSystem) Chtimes(ctx context.Context, name string, atime time.Time, mtime time.Time) error
- func (s3fs *S3FileSystem) Copy(ctx context.Context, input *fs.CopyInput) error
- func (s3fs *S3FileSystem) CopyObject(ctx context.Context, source string, destination string) error
- func (s3fs *S3FileSystem) DeleteObject(ctx context.Context, name string) error
- func (s3fs *S3FileSystem) DeleteObjects(ctx context.Context, names []string) error
- func (s3fs *S3FileSystem) Dir(name string) string
- func (s3fs *S3FileSystem) GetBucketRegion(bucket string) string
- func (s3fs *S3FileSystem) HeadObject(ctx context.Context, name string) (*S3FileInfo, error)
- func (s3fs *S3FileSystem) IsNotExist(err error) bool
- func (s3fs *S3FileSystem) Join(name ...string) string
- func (s3fs *S3FileSystem) MagicNumber(ctx context.Context, name string) ([]byte, error)
- func (s3fs *S3FileSystem) MagicNumbers(ctx context.Context, names []string, threads int) ([][]byte, error)
- func (s3fs *S3FileSystem) MkdirAll(ctx context.Context, name string, mode os.FileMode) error
- func (s3fs *S3FileSystem) MultipartCopyObject(ctx context.Context, source string, destination string, size int64) error
- func (s3fs *S3FileSystem) MustRelative(ctx context.Context, base string, target string) string
- func (s3fs *S3FileSystem) Open(ctx context.Context, name string) (fs.Object, error)
- func (s3fs *S3FileSystem) OpenObject(ctx context.Context, name string, flag int, perm os.FileMode) (fs.Object, error)
- func (s3fs *S3FileSystem) ReadDir(ctx context.Context, name string, recursive bool) ([]fs.DirectoryEntryInterface, error)
- func (s3fs *S3FileSystem) ReadFile(ctx context.Context, name string, data []byte) (int, error)
- func (s3fs *S3FileSystem) Relative(ctx context.Context, base string, target string) (string, error)
- func (s3fs *S3FileSystem) RemoveDirectories(ctx context.Context, names []string, recursive bool) error
- func (s3fs *S3FileSystem) RemoveDirectory(ctx context.Context, name string, recursive bool) error
- func (s3fs *S3FileSystem) RemoveFile(ctx context.Context, name string) error
- func (s3fs *S3FileSystem) RemoveFiles(ctx context.Context, names []string) error
- func (s3fs *S3FileSystem) Root() string
- func (s3fs *S3FileSystem) Size(ctx context.Context, name string) (int64, error)
- func (s3fs *S3FileSystem) Stat(ctx context.Context, name string) (fs.FileInfo, error)
- func (s3fs *S3FileSystem) Sync(ctx context.Context, input *fs.SyncInput) (int, error)
- func (s3fs *S3FileSystem) SyncDirectory(ctx context.Context, input *fs.SyncDirectoryInput) (int, error)
- type Uploader
- type UploaderInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReadSeeker ¶
type ReadSeeker struct {
// contains filtered or unexported fields
}
func NewReadSeeker ¶
type S3DirectoryEntry ¶
type S3DirectoryEntry struct {
// contains filtered or unexported fields
}
func (*S3DirectoryEntry) IsDir ¶
func (de *S3DirectoryEntry) IsDir() bool
func (*S3DirectoryEntry) MarshalJSON ¶
func (de *S3DirectoryEntry) MarshalJSON() ([]byte, error)
func (*S3DirectoryEntry) ModTime ¶
func (de *S3DirectoryEntry) ModTime() time.Time
func (*S3DirectoryEntry) Name ¶
func (de *S3DirectoryEntry) Name() string
func (*S3DirectoryEntry) Size ¶
func (de *S3DirectoryEntry) Size() int64
func (*S3DirectoryEntry) String ¶
func (de *S3DirectoryEntry) String() string
type S3File ¶
type S3File struct {
// contains filtered or unexported fields
}
func NewS3File ¶
func NewS3File(name string, readSeeker io.ReadSeeker, downloader Downloader, writeCloser io.WriteCloser) *S3File
type S3FileInfo ¶
type S3FileInfo struct {
// contains filtered or unexported fields
}
func NewS3FileInfo ¶
func (*S3FileInfo) IsDir ¶
func (fi *S3FileInfo) IsDir() bool
func (*S3FileInfo) ModTime ¶
func (fi *S3FileInfo) ModTime() time.Time
func (*S3FileInfo) Name ¶
func (fi *S3FileInfo) Name() string
func (*S3FileInfo) Size ¶
func (fi *S3FileInfo) Size() int64
func (*S3FileInfo) String ¶
func (fi *S3FileInfo) String() string
type S3FileSystem ¶
type S3FileSystem struct {
// contains filtered or unexported fields
}
func NewS3FileSystem ¶
func (*S3FileSystem) CopyObject ¶
CopyObject uses the CopyObject API to copy an object.
func (*S3FileSystem) DeleteObject ¶
func (s3fs *S3FileSystem) DeleteObject(ctx context.Context, name string) error
DeleteObject uses the DeleteObject API to delete an object.
func (*S3FileSystem) DeleteObjects ¶
func (s3fs *S3FileSystem) DeleteObjects(ctx context.Context, names []string) error
DeleteObjects uses the DeleteObjects API to delete multiple objects.
func (*S3FileSystem) Dir ¶
func (s3fs *S3FileSystem) Dir(name string) string
func (*S3FileSystem) GetBucketRegion ¶
func (s3fs *S3FileSystem) GetBucketRegion(bucket string) string
GetBucketRegion returns the region for the bucket. If the bucket is not known, then returns the default region
func (*S3FileSystem) HeadObject ¶
func (s3fs *S3FileSystem) HeadObject(ctx context.Context, name string) (*S3FileInfo, error)
func (*S3FileSystem) IsNotExist ¶
func (s3fs *S3FileSystem) IsNotExist(err error) bool
func (*S3FileSystem) Join ¶
func (s3fs *S3FileSystem) Join(name ...string) string
func (*S3FileSystem) MagicNumber ¶
func (*S3FileSystem) MagicNumbers ¶
func (*S3FileSystem) MultipartCopyObject ¶
func (s3fs *S3FileSystem) MultipartCopyObject(ctx context.Context, source string, destination string, size int64) error
MultipartCopyObject copies an object using a multipart upload, which is required for objects greater than or equal to 5 GB.
func (*S3FileSystem) MustRelative ¶
func (*S3FileSystem) OpenObject ¶
func (*S3FileSystem) ReadDir ¶
func (s3fs *S3FileSystem) ReadDir(ctx context.Context, name string, recursive bool) ([]fs.DirectoryEntryInterface, error)
func (*S3FileSystem) RemoveDirectories ¶
func (*S3FileSystem) RemoveDirectory ¶
func (*S3FileSystem) RemoveFile ¶
func (s3fs *S3FileSystem) RemoveFile(ctx context.Context, name string) error
func (*S3FileSystem) RemoveFiles ¶
func (s3fs *S3FileSystem) RemoveFiles(ctx context.Context, names []string) error
func (*S3FileSystem) Root ¶
func (s3fs *S3FileSystem) Root() string
func (*S3FileSystem) SyncDirectory ¶
func (s3fs *S3FileSystem) SyncDirectory(ctx context.Context, input *fs.SyncDirectoryInput) (int, error)
type Uploader ¶
type Uploader struct {
// contains filtered or unexported fields
}
func NewUploader ¶
func NewUploader(ctx context.Context, input *UploaderInput) *Uploader
type UploaderInput ¶
Click to show internal directories.
Click to hide internal directories.