Documentation
¶
Overview ¶
Package fs is a S3-compatible storage server implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBucketNotFound = errors.New("bucket not found") ErrObjectNotFound = errors.New("object not found") )
Functions ¶
This section is empty.
Types ¶
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 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
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
}
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
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
}
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. |
Click to show internal directories.
Click to hide internal directories.