package s3
import "git.sr.ht/~pingoo/stdx/storage/s3"
Index ¶
- type Config
- type S3Storage
- func NewS3Storage(config Config) (*S3Storage, error)
- func (storage *S3Storage) BasePath() string
- func (storage *S3Storage) CopyObject(ctx context.Context, from string, to string) error
- func (storage *S3Storage) DeleteObject(ctx context.Context, key string) error
- func (storage *S3Storage) DeleteObjectsWithPrefix(ctx context.Context, prefix string) (err error)
- func (storage *S3Storage) GetObject(ctx context.Context, key string) (io.ReadCloser, error)
- func (storage *S3Storage) GetObjectSize(ctx context.Context, key string) (int64, error)
- func (storage *S3Storage) PutObject(ctx context.Context, key string, contentType string, size int64, object io.Reader) error
Types ¶
type Config ¶
type Config struct { AccessKeyID string SecretAccessKey string Endpoint string Region string BaseDirectory string Bucket string HttpClient *http.Client }
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
func NewS3Storage ¶
func (*S3Storage) BasePath ¶
func (*S3Storage) CopyObject ¶
func (*S3Storage) DeleteObject ¶
func (*S3Storage) DeleteObjectsWithPrefix ¶
func (*S3Storage) GetObject ¶
func (*S3Storage) GetObjectSize ¶
func (*S3Storage) PutObject ¶
func (storage *S3Storage) PutObject(ctx context.Context, key string, contentType string, size int64, object io.Reader) error
TODO?: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
Source Files ¶
s3.go
- Version
- v0.0.0-20240218134121-094174641f6e (latest)
- Published
- Feb 18, 2024
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 4 months ago –
Tools for package owners.