Documentation ¶
Index ¶
- type FakeWriterAt
- type Service
- func (s Service) Delete(ctx context.Context, bucket, key string) error
- func (s Service) Download(ctx context.Context, bucket, key string, file io.Writer) error
- func (s Service) Exists(ctx context.Context, bucketName, key string) (bool, error)
- func (s Service) List(ctx context.Context, bucketName, prefix string) ([]string, error)
- func (s Service) MakeBucket(ctx context.Context, bucketName, location string) error
- func (s Service) Upload(ctx context.Context, bucket, key string, file io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeWriterAt ¶
type FakeWriterAt struct {
// contains filtered or unexported fields
}
FakeWriterAt represents a struct that provides the method WriteAt so it will satisfy interface io.WriterAt. It will ignore offset and therefore works like just io.Writer. AWS SDK is Using io.WriterAt because of concurrent download, so it can write at offset position (e.g. in middle of file). By disabling concurrent download we can safely ignore the offset argument because it will be downloaded sequentially.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides abstraction to cloud object storage.
func (Service) MakeBucket ¶
MakeBucket creates a new bucket in s2.
Click to show internal directories.
Click to hide internal directories.