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 19, 2025
1 parent 19ab99f commit 8cd5c2c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 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
}
32 changes: 0 additions & 32 deletions api/layer/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -1128,35 +1128,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 8cd5c2c

Please sign in to comment.