Documentation
¶
Index ¶
- type ObjectStorage
- func (s *ObjectStorage) CompareAndSwap(ctx context.Context, objectPath string, newValue io.Reader, newLength int64, ...) (string, error)
- func (s *ObjectStorage) Get(ctx context.Context, objectPath string, etag string) (io.Reader, error)
- func (s *ObjectStorage) GetEtag(ctx context.Context, objectPath string) (string, error)
- func (s *ObjectStorage) GetObject(ctx context.Context, objectPath string) ([]byte, error)
- func (s *ObjectStorage) MakeBucket(ctx context.Context, bucketName string) error
- func (s *ObjectStorage) PutObject(ctx context.Context, objectPath string, value []byte) error
- type ObjectStorageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectStorage ¶
type ObjectStorage struct {
// contains filtered or unexported fields
}
func NewObjectStorage ¶
func NewObjectStorage(config *ObjectStorageConfig) *ObjectStorage
func (*ObjectStorage) CompareAndSwap ¶
func (s *ObjectStorage) CompareAndSwap(ctx context.Context, objectPath string, newValue io.Reader, newLength int64, oldEtag string) (string, error)
CompareAndSwap try to compare and swap in best effort fashion Known limitations: - S3 does not provide `if-match: etag` for PutObject
func (*ObjectStorage) MakeBucket ¶
func (s *ObjectStorage) MakeBucket(ctx context.Context, bucketName string) error
Click to show internal directories.
Click to hide internal directories.