Documentation
¶
Index ¶
- type Adapter
- func (a *Adapter) AbortUpload(ctx context.Context, uploadID string) error
- func (a *Adapter) CompleteUpload(ctx context.Context, uploadID string) error
- func (a *Adapter) CreateDir(ctx context.Context, dirPath string) error
- func (a *Adapter) Delete(ctx context.Context, filePath string) error
- func (a *Adapter) DeleteDir(ctx context.Context, dirPath string) error
- func (a *Adapter) Download(ctx context.Context, filePath string) (io.ReadCloser, error)
- func (a *Adapter) Exists(ctx context.Context, filePath string) (bool, error)
- func (a *Adapter) FileInfo(ctx context.Context, filePath string) (*filekit.File, error)
- func (a *Adapter) GeneratePresignedGetURL(ctx context.Context, filePath string, expiry time.Duration) (string, error)
- func (a *Adapter) GeneratePresignedPutURL(ctx context.Context, filePath string, expiry time.Duration, ...) (string, error)
- func (a *Adapter) InitiateUpload(ctx context.Context, filePath string) (string, error)
- func (a *Adapter) List(ctx context.Context, prefix string) ([]filekit.File, error)
- func (a *Adapter) Upload(ctx context.Context, filePath string, content io.Reader, ...) error
- func (a *Adapter) UploadFile(ctx context.Context, path string, localPath string, options ...filekit.Option) error
- func (a *Adapter) UploadPart(ctx context.Context, uploadID string, partNumber int, data []byte) error
- type AdapterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter provides an S3 implementation of filekit.FileSystem
func New ¶
func New(client *s3.Client, bucket string, options ...AdapterOption) *Adapter
New creates a new S3 filesystem adapter
func (*Adapter) AbortUpload ¶
AbortUpload implements filekit.ChunkedUploader
func (*Adapter) CompleteUpload ¶
CompleteUpload implements filekit.ChunkedUploader
func (*Adapter) GeneratePresignedGetURL ¶ added in v0.1.0
func (*Adapter) GeneratePresignedPutURL ¶ added in v0.1.0
func (*Adapter) InitiateUpload ¶
InitiateUpload implements filekit.ChunkedUploader
func (*Adapter) Upload ¶
func (a *Adapter) Upload(ctx context.Context, filePath string, content io.Reader, options ...filekit.Option) error
Upload implements filekit.FileSystem
type AdapterOption ¶
type AdapterOption func(*Adapter)
AdapterOption is a function that configures S3Adapter
func WithPrefix ¶
func WithPrefix(prefix string) AdapterOption
WithPrefix sets the prefix for S3 objects
Click to show internal directories.
Click to hide internal directories.