forked from TrueCloudLab/frostfs-s3-gw
parent
9f019c7470
commit
e46763e429
1 changed files with 11 additions and 11 deletions
|
@ -47,12 +47,12 @@ type (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
versioningEnabledKV = "versioning_enabled"
|
versioningEnabledKV = "VersioningEnabled"
|
||||||
lockConfigurationKV = "lock_configuration"
|
lockConfigurationKV = "LockConfiguration"
|
||||||
oidKV = "OID"
|
oidKV = "OID"
|
||||||
fileNameKV = "FileName"
|
fileNameKV = "FileName"
|
||||||
isUnversionedKV = "IsUnversioned"
|
isUnversionedKV = "IsUnversioned"
|
||||||
isTagKV = "isTag"
|
isTagKV = "IsTag"
|
||||||
uploadIDKV = "UploadId"
|
uploadIDKV = "UploadId"
|
||||||
partNumberKV = "Number"
|
partNumberKV = "Number"
|
||||||
sizeKV = "Size"
|
sizeKV = "Size"
|
||||||
|
@ -66,7 +66,7 @@ const (
|
||||||
isComplianceKV = "IsCompliance"
|
isComplianceKV = "IsCompliance"
|
||||||
|
|
||||||
// keys for delete marker nodes.
|
// keys for delete marker nodes.
|
||||||
isDeleteMarkerKV = "IdDeleteMarker"
|
isDeleteMarkerKV = "IsDeleteMarker"
|
||||||
ownerKV = "Owner"
|
ownerKV = "Owner"
|
||||||
createdKV = "Created"
|
createdKV = "Created"
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ const (
|
||||||
systemTree = "system"
|
systemTree = "system"
|
||||||
|
|
||||||
separator = "/"
|
separator = "/"
|
||||||
userDefinedtagPrefix = "User-Tag-"
|
userDefinedTagPrefix = "User-Tag-"
|
||||||
|
|
||||||
maxGetSubTreeDepth = 10 // current limit on storage node side
|
maxGetSubTreeDepth = 10 // current limit on storage node side
|
||||||
)
|
)
|
||||||
|
@ -390,8 +390,8 @@ func getObjectTagging(tagNode *TreeNode) map[string]string {
|
||||||
meta := make(map[string]string)
|
meta := make(map[string]string)
|
||||||
|
|
||||||
for key, val := range tagNode.Meta {
|
for key, val := range tagNode.Meta {
|
||||||
if strings.HasPrefix(key, userDefinedtagPrefix) {
|
if strings.HasPrefix(key, userDefinedTagPrefix) {
|
||||||
meta[strings.TrimPrefix(key, userDefinedtagPrefix)] = val
|
meta[strings.TrimPrefix(key, userDefinedTagPrefix)] = val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ func (c *TreeClient) PutObjectTagging(ctx context.Context, cnrID cid.ID, objVers
|
||||||
treeTagSet[isTagKV] = "true"
|
treeTagSet[isTagKV] = "true"
|
||||||
|
|
||||||
for key, val := range tagSet {
|
for key, val := range tagSet {
|
||||||
treeTagSet[userDefinedtagPrefix+key] = val
|
treeTagSet[userDefinedTagPrefix+key] = val
|
||||||
}
|
}
|
||||||
|
|
||||||
if tagNode == nil {
|
if tagNode == nil {
|
||||||
|
@ -445,8 +445,8 @@ func (c *TreeClient) GetBucketTagging(ctx context.Context, cnrID cid.ID) (map[st
|
||||||
tags := make(map[string]string)
|
tags := make(map[string]string)
|
||||||
|
|
||||||
for key, val := range node.Meta {
|
for key, val := range node.Meta {
|
||||||
if strings.HasPrefix(key, userDefinedtagPrefix) {
|
if strings.HasPrefix(key, userDefinedTagPrefix) {
|
||||||
tags[strings.TrimPrefix(key, userDefinedtagPrefix)] = val
|
tags[strings.TrimPrefix(key, userDefinedTagPrefix)] = val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ func (c *TreeClient) PutBucketTagging(ctx context.Context, cnrID cid.ID, tagSet
|
||||||
treeTagSet[fileNameKV] = bucketTaggingFilename
|
treeTagSet[fileNameKV] = bucketTaggingFilename
|
||||||
|
|
||||||
for key, val := range tagSet {
|
for key, val := range tagSet {
|
||||||
treeTagSet[userDefinedtagPrefix+key] = val
|
treeTagSet[userDefinedTagPrefix+key] = val
|
||||||
}
|
}
|
||||||
|
|
||||||
if isErrNotFound {
|
if isErrNotFound {
|
||||||
|
|
Loading…
Reference in a new issue