Documentation
¶
Index ¶
- Constants
- func GetBoxData(ctx context.Context) (*accessbox.Box, error)
- func NameFromString(name string) (string, string)
- type BucketACL
- type BucketSettings
- type CachesConfig
- type Client
- type CopyObjectParams
- type CreateBucketParams
- type DeleteBucketParams
- type GetObjectParams
- type HeadObjectParams
- type ListObjectVersionsInfo
- type ListObjectVersionsParams
- type ListObjectsInfo
- type ListObjectsInfoV1
- type ListObjectsInfoV2
- type ListObjectsParamsCommon
- type ListObjectsParamsV1
- type ListObjectsParamsV2
- type NeoFS
- type ObjectVersionInfo
- type Params
- type PutBucketACLParams
- type PutObjectParams
- type PutTaggingParams
- type PutVersioningParams
- type RangeParams
- type VersionedObject
Constants ¶
const PathSeparator = string(os.PathSeparator)
PathSeparator is a path components separator string.
Variables ¶
This section is empty.
Functions ¶
func GetBoxData ¶ added in v0.17.0
GetBoxData extracts accessbox.Box from context.
func NameFromString ¶
NameFromString splits name into base file name and directory path.
Types ¶
type BucketACL ¶ added in v0.17.0
type BucketACL struct { Info *data.BucketInfo EACL *eacl.Table }
BucketACL extends BucketInfo by eacl.Table.
type BucketSettings ¶ added in v0.17.0
type BucketSettings struct {
VersioningEnabled bool
}
BucketSettings stores settings such as versioning.
type CachesConfig ¶ added in v0.17.0
type CachesConfig struct { Objects *cache.Config ObjectsList *cache.Config Names *cache.Config Buckets *cache.Config System *cache.Config }
CachesConfig contains params for caches.
func DefaultCachesConfigs ¶ added in v0.17.0
func DefaultCachesConfigs() *CachesConfig
DefaultCachesConfigs returns filled configs.
type Client ¶
type Client interface { NeoFS PutBucketVersioning(ctx context.Context, p *PutVersioningParams) (*data.ObjectInfo, error) GetBucketVersioning(ctx context.Context, name string) (*BucketSettings, error) ListBuckets(ctx context.Context) ([]*data.BucketInfo, error) GetBucketInfo(ctx context.Context, name string) (*data.BucketInfo, error) GetBucketACL(ctx context.Context, name string) (*BucketACL, error) PutBucketACL(ctx context.Context, p *PutBucketACLParams) error CreateBucket(ctx context.Context, p *CreateBucketParams) (*cid.ID, error) DeleteBucket(ctx context.Context, p *DeleteBucketParams) error GetObject(ctx context.Context, p *GetObjectParams) error GetObjectInfo(ctx context.Context, p *HeadObjectParams) (*data.ObjectInfo, error) GetObjectTagging(ctx context.Context, p *data.ObjectInfo) (map[string]string, error) GetBucketTagging(ctx context.Context, bucket string) (map[string]string, error) PutObject(ctx context.Context, p *PutObjectParams) (*data.ObjectInfo, error) PutObjectTagging(ctx context.Context, p *PutTaggingParams) error PutBucketTagging(ctx context.Context, bucket string, tagSet map[string]string) error CopyObject(ctx context.Context, p *CopyObjectParams) (*data.ObjectInfo, error) ListObjectsV1(ctx context.Context, p *ListObjectsParamsV1) (*ListObjectsInfoV1, error) ListObjectsV2(ctx context.Context, p *ListObjectsParamsV2) (*ListObjectsInfoV2, error) ListObjectVersions(ctx context.Context, p *ListObjectVersionsParams) (*ListObjectVersionsInfo, error) DeleteObjects(ctx context.Context, bucket string, objects []*VersionedObject) ([]*VersionedObject, error) DeleteObjectTagging(ctx context.Context, p *data.ObjectInfo) error DeleteBucketTagging(ctx context.Context, bucket string) error }
Client provides S3 API client interface.
type CopyObjectParams ¶
type CopyObjectParams struct { SrcObject *data.ObjectInfo DstBucket string DstObject string SrcSize int64 Header map[string]string }
CopyObjectParams stores object copy request parameters.
type CreateBucketParams ¶ added in v0.16.0
type CreateBucketParams struct { Name string ACL uint32 Policy *netmap.PlacementPolicy EACL *eacl.Table BoxData *accessbox.Box }
CreateBucketParams stores bucket create request parameters.
type DeleteBucketParams ¶ added in v0.16.0
type DeleteBucketParams struct {
Name string
}
DeleteBucketParams stores delete bucket request parameters.
type GetObjectParams ¶
type GetObjectParams struct { Range *RangeParams ObjectInfo *data.ObjectInfo Offset int64 Length int64 Writer io.Writer VersionID string }
GetObjectParams stores object get request parameters.
type HeadObjectParams ¶ added in v0.17.0
HeadObjectParams stores object head request parameters.
type ListObjectVersionsInfo ¶ added in v0.16.0
type ListObjectVersionsInfo struct { CommonPrefixes []string IsTruncated bool KeyMarker string NextKeyMarker string NextVersionIDMarker string Version []*ObjectVersionInfo DeleteMarker []*ObjectVersionInfo VersionIDMarker string }
ListObjectVersionsInfo stores info and list of objects' versions.
type ListObjectVersionsParams ¶ added in v0.16.0
type ListObjectVersionsParams struct { Bucket string Delimiter string KeyMarker string MaxKeys int Prefix string VersionIDMarker string Encode string }
ListObjectVersionsParams stores list objects versions parameters.
type ListObjectsInfo ¶
type ListObjectsInfo struct { Prefixes []string Objects []*data.ObjectInfo IsTruncated bool }
ListObjectsInfo contains common fields of data for ListObjectsV1 and ListObjectsV2.
type ListObjectsInfoV1 ¶ added in v0.17.0
type ListObjectsInfoV1 struct { ListObjectsInfo NextMarker string }
ListObjectsInfoV1 holds data which ListObjectsV1 returns.
type ListObjectsInfoV2 ¶ added in v0.17.0
type ListObjectsInfoV2 struct { ListObjectsInfo NextContinuationToken string }
ListObjectsInfoV2 holds data which ListObjectsV2 returns.
type ListObjectsParamsCommon ¶ added in v0.17.0
type ListObjectsParamsCommon struct { Bucket string Delimiter string Encode string MaxKeys int Prefix string }
ListObjectsParamsCommon contains common parameters for ListObjectsV1 and ListObjectsV2.
type ListObjectsParamsV1 ¶ added in v0.17.0
type ListObjectsParamsV1 struct { ListObjectsParamsCommon Marker string }
ListObjectsParamsV1 contains params for ListObjectsV1.
type ListObjectsParamsV2 ¶ added in v0.17.0
type ListObjectsParamsV2 struct { ListObjectsParamsCommon ContinuationToken string StartAfter string FetchOwner bool }
ListObjectsParamsV2 contains params for ListObjectsV2.
type ObjectVersionInfo ¶ added in v0.16.0
type ObjectVersionInfo struct { Object *data.ObjectInfo IsLatest bool }
ObjectVersionInfo stores info about objects versions.
type Params ¶
type Params struct { Pool pool.Pool Logger *zap.Logger Timeout time.Duration Key *ecdsa.PrivateKey }
Params stores basic API parameters.
type PutBucketACLParams ¶ added in v0.17.0
PutBucketACLParams stores put bucket acl request parameters.
type PutObjectParams ¶
type PutObjectParams struct { Bucket string Object string Size int64 Reader io.Reader Header map[string]string }
PutObjectParams stores object put request parameters.
type PutTaggingParams ¶ added in v0.17.0
type PutTaggingParams struct { ObjectInfo *data.ObjectInfo TagSet map[string]string }
PutTaggingParams stores tag set params.
type PutVersioningParams ¶ added in v0.17.0
type PutVersioningParams struct { Bucket string Settings *BucketSettings }
PutVersioningParams stores object copy request parameters.
type RangeParams ¶ added in v0.16.0
RangeParams stores range header request parameters.
type VersionedObject ¶ added in v0.17.0
VersionedObject stores info about objects to delete.
func (*VersionedObject) String ¶ added in v0.17.0
func (t *VersionedObject) String() string