Documentation ¶
Index ¶
- func Open(regionname, bucketname string) (backend.Backend, error)
- type S3Backend
- func (be *S3Backend) Close() error
- func (be *S3Backend) Create() (backend.Blob, error)
- func (be *S3Backend) Delete() error
- func (be *S3Backend) Get(t backend.Type, name string) (io.ReadCloser, error)
- func (be *S3Backend) GetReader(t backend.Type, name string, offset, length uint) (io.ReadCloser, error)
- func (be *S3Backend) List(t backend.Type, done <-chan struct{}) <-chan string
- func (be *S3Backend) Location() string
- func (be *S3Backend) Remove(t backend.Type, name string) error
- func (be *S3Backend) Test(t backend.Type, name string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type S3Backend ¶
type S3Backend struct {
// contains filtered or unexported fields
}
func OpenS3Bucket ¶
Open a backend using an S3 bucket object
func (*S3Backend) Create ¶
Create creates a new Blob. The data is available only after Finalize() has been called on the returned Blob.
func (*S3Backend) Get ¶
Get returns a reader that yields the content stored under the given name. The reader should be closed after draining it.
func (*S3Backend) GetReader ¶
func (be *S3Backend) GetReader(t backend.Type, name string, offset, length uint) (io.ReadCloser, error)
GetReader returns an io.ReadCloser for the Blob with the given name of type t at offset and length. If length is 0, the reader reads until EOF.
func (*S3Backend) List ¶
List returns a channel that yields all names of blobs of type t. A goroutine is started for this. If the channel done is closed, sending stops.
Click to show internal directories.
Click to hide internal directories.