Documentation
¶
Overview ¶
Package fs is a S3-compatible storage server implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CompleteMultipartUploadRequest ¶ added in v0.0.4
type CompleteMultipartUploadRequest struct {
Bucket string
Key string
UploadID string
Parts []CompletedPart
}
CompleteMultipartUploadRequest represents a request to complete multipart upload.
type CompleteMultipartUploadResponse ¶ added in v0.0.4
type CompleteMultipartUploadResponse struct {
Location string
Bucket string
Key string
ETag string
}
CompleteMultipartUploadResponse represents the response for completing multipart upload.
type CompletedPart ¶ added in v0.0.4
CompletedPart represents a completed part for completing multipart upload.
type GetObjectResponse ¶
type GetObjectResponse struct {
Reader io.ReadCloser
Size int64
LastModified time.Time
ETag string
ContentType string
}
GetObjectResponse represents the response for GetObject operation.
type MultipartUpload ¶ added in v0.0.4
MultipartUpload represents an in-progress multipart upload.
type PutObjectRequest ¶
type Service ¶
type Service interface {
ListBuckets(ctx context.Context) ([]Bucket, error)
CreateBucket(ctx context.Context, bucket string) error
DeleteBucket(ctx context.Context, bucket string) error
BucketExists(ctx context.Context, bucket string) (bool, error)
ListObjects(ctx context.Context, bucket, prefix string) ([]Object, error)
PutObject(ctx context.Context, req *PutObjectRequest) error
GetObject(ctx context.Context, bucket, key string) (*GetObjectResponse, error)
DeleteObject(ctx context.Context, bucket, key string) error
CreateMultipartUpload(ctx context.Context, bucket, key string) (*MultipartUpload, error)
UploadPart(ctx context.Context, req *UploadPartRequest) (*Part, error)
CompleteMultipartUpload(ctx context.Context, req *CompleteMultipartUploadRequest) (*CompleteMultipartUploadResponse, error)
AbortMultipartUpload(ctx context.Context, bucket, key, uploadID string) error
}
Service defines the interface for S3-compatible storage operations.
type Storage ¶
type Storage interface {
ListBuckets(ctx context.Context) ([]Bucket, error)
CreateBucket(ctx context.Context, bucket string) error
DeleteBucket(ctx context.Context, bucket string) error
BucketExists(ctx context.Context, bucket string) (bool, error)
ListObjects(ctx context.Context, bucket, prefix string) ([]Object, error)
PutObject(ctx context.Context, req *PutObjectRequest) error
GetObject(ctx context.Context, bucket, key string) (*GetObjectResponse, error)
DeleteObject(ctx context.Context, bucket, key string) error
CreateMultipartUpload(ctx context.Context, bucket, key string) (*MultipartUpload, error)
UploadPart(ctx context.Context, req *UploadPartRequest) (*Part, error)
CompleteMultipartUpload(ctx context.Context, req *CompleteMultipartUploadRequest) (*CompleteMultipartUploadResponse, error)
AbortMultipartUpload(ctx context.Context, bucket, key, uploadID string) error
}
Storage defines the interface for S3-compatible storage operations.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
fs
command
|
|
|
internal
|
|
|
core/storage/storagefs
Package storagefs implements fs.Storage.
|
Package storagefs implements fs.Storage. |
|
core/storage/storagemem
Package storagemem implements fs.Storage using in-memory storage.
|
Package storagemem implements fs.Storage using in-memory storage. |
Click to show internal directories.
Click to hide internal directories.