Documentation ¶
Overview ¶
Package s3 provided support for AWS s3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/Welcome.html)
Code generated by go generate via internal/cmd/service; DO NOT EDIT.
Index ¶
- Constants
- func GetStorageClass(m info.ObjectMeta) (string, bool)
- func New(pairs ...*types.Pair) (storage.Servicer, storage.Storager, error)
- func NewServicer(pairs ...*types.Pair) (storage.Servicer, error)
- func NewStorager(pairs ...*types.Pair) (storage.Storager, error)
- func WithStorageClass(v string) *types.Pair
- type Service
- func (s *Service) Create(name string, pairs ...*types.Pair) (st storage.Storager, err error)
- func (s *Service) CreateWithContext(ctx context.Context, name string, pairs ...*types.Pair) (st storage.Storager, err error)
- func (s *Service) Delete(name string, pairs ...*types.Pair) (err error)
- func (s *Service) DeleteWithContext(ctx context.Context, name string, pairs ...*types.Pair) (err error)
- func (s *Service) Get(name string, pairs ...*types.Pair) (st storage.Storager, err error)
- func (s *Service) GetWithContext(ctx context.Context, name string, pairs ...*types.Pair) (st storage.Storager, err error)
- func (s *Service) List(pairs ...*types.Pair) (err error)
- func (s *Service) ListWithContext(ctx context.Context, pairs ...*types.Pair) (err error)
- func (s *Service) String() string
- type Storage
- func (s *Storage) AbortSegment(seg segment.Segment, pairs ...*types.Pair) (err error)
- func (s *Storage) AbortSegmentWithContext(ctx context.Context, seg segment.Segment, pairs ...*types.Pair) (err error)
- func (s *Storage) CompleteSegment(seg segment.Segment, pairs ...*types.Pair) (err error)
- func (s *Storage) CompleteSegmentWithContext(ctx context.Context, seg segment.Segment, pairs ...*types.Pair) (err error)
- func (s *Storage) Delete(path string, pairs ...*types.Pair) (err error)
- func (s *Storage) DeleteWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)
- func (s *Storage) InitIndexSegment(path string, pairs ...*types.Pair) (seg segment.Segment, err error)
- func (s *Storage) InitIndexSegmentWithContext(ctx context.Context, path string, pairs ...*types.Pair) (seg segment.Segment, err error)
- func (s *Storage) ListDir(path string, pairs ...*types.Pair) (err error)
- func (s *Storage) ListDirWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)
- func (s *Storage) ListPrefix(prefix string, pairs ...*types.Pair) (err error)
- func (s *Storage) ListPrefixSegments(path string, pairs ...*types.Pair) (err error)
- func (s *Storage) ListPrefixSegmentsWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)
- func (s *Storage) ListPrefixWithContext(ctx context.Context, prefix string, pairs ...*types.Pair) (err error)
- func (s *Storage) Metadata(pairs ...*types.Pair) (m info.StorageMeta, err error)
- func (s *Storage) MetadataWithContext(ctx context.Context, pairs ...*types.Pair) (m info.StorageMeta, err error)
- func (s *Storage) Read(path string, pairs ...*types.Pair) (r io.ReadCloser, err error)
- func (s *Storage) ReadWithContext(ctx context.Context, path string, pairs ...*types.Pair) (r io.ReadCloser, err error)
- func (s *Storage) Stat(path string, pairs ...*types.Pair) (o *types.Object, err error)
- func (s *Storage) StatWithContext(ctx context.Context, path string, pairs ...*types.Pair) (o *types.Object, err error)
- func (s *Storage) String() string
- func (s *Storage) Write(path string, r io.Reader, pairs ...*types.Pair) (err error)
- func (s *Storage) WriteIndexSegment(seg segment.Segment, r io.Reader, index int, size int64, pairs ...*types.Pair) (err error)
- func (s *Storage) WriteIndexSegmentWithContext(ctx context.Context, seg segment.Segment, r io.Reader, index int, size int64, ...) (err error)
- func (s *Storage) WriteWithContext(ctx context.Context, path string, r io.Reader, pairs ...*types.Pair) (err error)
Constants ¶
const ( StorageClassStandard = s3.ObjectStorageClassStandard StorageClassReducedRedundancy = s3.ObjectStorageClassReducedRedundancy StorageClassGlacier = s3.ObjectStorageClassGlacier StorageClassStandardIa = s3.ObjectStorageClassStandardIa StorageClassOnezoneIa = s3.ObjectStorageClassOnezoneIa StorageClassIntelligentTiering = s3.ObjectStorageClassIntelligentTiering StorageClassDeepArchive = s3.ObjectStorageClassDeepArchive )
All available storage classes are listed here.
const (
InfoObjectMetaStorageClass = "s3-storage-class"
)
Service available infos.
const (
// StorageClass will
PairStorageClass = "s3_storage_class"
)
Service available pairs.
const Type = "s3"
Type is the type for s3
Variables ¶
This section is empty.
Functions ¶
func GetStorageClass ¶ added in v1.1.0
func GetStorageClass(m info.ObjectMeta) (string, bool)
GetStorageClass will get storage-class value from metadata.
func NewServicer ¶ added in v1.0.0
NewServicer will create Servicer only.
func NewStorager ¶ added in v1.0.0
NewStorager will create Storager only.
func WithStorageClass ¶ added in v1.1.0
WithStorageClass will apply storage_class value to Options This pair is used to
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the s3 service config.
func (*Service) CreateWithContext ¶ added in v0.6.0
func (s *Service) CreateWithContext(ctx context.Context, name string, pairs ...*types.Pair) (st storage.Storager, err error)
CreateWithContext adds context support for Create.
func (*Service) DeleteWithContext ¶ added in v0.6.0
func (s *Service) DeleteWithContext(ctx context.Context, name string, pairs ...*types.Pair) (err error)
DeleteWithContext adds context support for Delete.
func (*Service) GetWithContext ¶ added in v0.6.0
func (s *Service) GetWithContext(ctx context.Context, name string, pairs ...*types.Pair) (st storage.Storager, err error)
GetWithContext adds context support for Get.
func (*Service) ListWithContext ¶ added in v0.6.0
ListWithContext adds context support for List.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the s3 object storage service.
func (*Storage) AbortSegment ¶ added in v0.9.0
AbortSegment implements Storager.AbortSegment
func (*Storage) AbortSegmentWithContext ¶ added in v0.9.0
func (s *Storage) AbortSegmentWithContext(ctx context.Context, seg segment.Segment, pairs ...*types.Pair) (err error)
AbortSegmentWithContext adds context support for AbortSegment.
func (*Storage) CompleteSegment ¶ added in v0.9.0
CompleteSegment implements Storager.CompleteSegment
func (*Storage) CompleteSegmentWithContext ¶ added in v0.9.0
func (s *Storage) CompleteSegmentWithContext(ctx context.Context, seg segment.Segment, pairs ...*types.Pair) (err error)
CompleteSegmentWithContext adds context support for CompleteSegment.
func (*Storage) DeleteWithContext ¶ added in v0.6.0
func (s *Storage) DeleteWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)
DeleteWithContext adds context support for Delete.
func (*Storage) InitIndexSegment ¶ added in v1.1.0
func (s *Storage) InitIndexSegment(path string, pairs ...*types.Pair) (seg segment.Segment, err error)
InitIndexSegment implements Storager.InitIndexSegment
func (*Storage) InitIndexSegmentWithContext ¶ added in v1.1.0
func (s *Storage) InitIndexSegmentWithContext(ctx context.Context, path string, pairs ...*types.Pair) (seg segment.Segment, err error)
InitIndexSegmentWithContext adds context support for InitIndexSegment.
func (*Storage) ListDirWithContext ¶ added in v1.0.0
func (s *Storage) ListDirWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)
ListDirWithContext adds context support for ListDir.
func (*Storage) ListPrefix ¶ added in v1.0.0
ListPrefix implements Storager.ListPrefix
func (*Storage) ListPrefixSegments ¶ added in v1.0.0
ListPrefixSegments implements Storager.ListPrefixSegments
func (*Storage) ListPrefixSegmentsWithContext ¶ added in v1.0.0
func (s *Storage) ListPrefixSegmentsWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)
ListPrefixSegmentsWithContext adds context support for ListPrefixSegments.
func (*Storage) ListPrefixWithContext ¶ added in v1.0.0
func (s *Storage) ListPrefixWithContext(ctx context.Context, prefix string, pairs ...*types.Pair) (err error)
ListPrefixWithContext adds context support for ListPrefix.
func (*Storage) MetadataWithContext ¶ added in v0.6.0
func (s *Storage) MetadataWithContext(ctx context.Context, pairs ...*types.Pair) (m info.StorageMeta, err error)
MetadataWithContext adds context support for Metadata.
func (*Storage) ReadWithContext ¶ added in v0.6.0
func (s *Storage) ReadWithContext(ctx context.Context, path string, pairs ...*types.Pair) (r io.ReadCloser, err error)
ReadWithContext adds context support for Read.
func (*Storage) StatWithContext ¶ added in v0.6.0
func (s *Storage) StatWithContext(ctx context.Context, path string, pairs ...*types.Pair) (o *types.Object, err error)
StatWithContext adds context support for Stat.
func (*Storage) WriteIndexSegment ¶ added in v1.1.0
func (s *Storage) WriteIndexSegment(seg segment.Segment, r io.Reader, index int, size int64, pairs ...*types.Pair) (err error)
WriteIndexSegment implements Storager.WriteIndexSegment