fs: define the optional interface SetMetadata and implement it in wrapping backends

This also implements backend integration tests for the feature
This commit is contained in:
Nick Craig-Wood
2024-05-08 17:06:55 +01:00
parent e9e9feb21e
commit cc634213a5
8 changed files with 121 additions and 0 deletions

View File

@@ -242,6 +242,7 @@ type FullObject interface {
GetTierer
SetTierer
Metadataer
SetMetadataer
}
// ObjectOptionalInterfaces returns the names of supported and
@@ -273,6 +274,9 @@ func ObjectOptionalInterfaces(o Object) (supported, unsupported []string) {
_, ok = o.(Metadataer)
store(ok, "Metadata")
_, ok = o.(SetMetadataer)
store(ok, "SetMetadata")
return supported, unsupported
}