Skip to content

Commit

Permalink
layer: Remove unused
Browse files Browse the repository at this point in the history
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
  • Loading branch information
smallhive committed Feb 21, 2025
1 parent c05b659 commit 17d951f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 54 deletions.
20 changes: 0 additions & 20 deletions api/layer/layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -866,23 +866,3 @@ func (n *layer) putDeleteMarker(ctx context.Context, bktInfo *data.BucketInfo, o

return extendedObjectInfo.ObjectInfo.ID, nil
}

func isDeleteMarkerObject(head object.Object) bool {
for _, attr := range head.Attributes() {
if attr.Key() == attrS3DeleteMarker {
return true
}
}

return false
}

func getS3VersioningState(head object.Object) string {
for _, attr := range head.Attributes() {
if attr.Key() == attrS3VersioningState {
return attr.Value()
}
}

return data.VersioningUnversioned
}
34 changes: 0 additions & 34 deletions api/layer/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ type (
)

const (
continuationToken = "<continuation-token>"

attrS3VersioningState = "S3-versioning-state"
attrS3DeleteMarker = "S3-delete-marker"
)
Expand Down Expand Up @@ -1164,35 +1162,3 @@ func tryDirectoryName(filePath string, prefix, delimiter string) string {

return ""
}

func convert(head object.Object) data.NodeVersion {
nv := data.NodeVersion{
BaseNodeVersion: data.BaseNodeVersion{
OID: head.GetID(),
},
}

for _, attr := range head.Attributes() {
switch attr.Key() {
case object.AttributeFilePath:
nv.BaseNodeVersion.FilePath = attr.Value()
case attrS3DeleteMarker:
nv.DeleteMarker = &data.DeleteMarkerInfo{
Created: time.Time{},
Owner: *head.OwnerID(),
}
}
}

return nv
}

func filePathFromAttributes(head object.Object) string {
for _, attr := range head.Attributes() {
if attr.Key() == object.AttributeFilePath {
return attr.Value()
}
}

return ""
}

0 comments on commit 17d951f

Please sign in to comment.