Closed cthulhu-rider closed 1 month ago
I'm always frustrated when user needs to do following to set the object expiration:
attrs := obj.Attributes() var expAttrFound bool expAttrValue := strconv.FormatUint(exp, 10) for i := range attrs { if attrs[i].Key() == object.AttributeExpirationEpoch { attrs[i].SetValue(expAttrValue) expAttrFound = true break } } if !expAttrFound { index := len(attrs) attrs = append(attrs, object.Attribute{}) attrs[index].SetKey(object.AttributeExpirationEpoch) attrs[index].SetValue(expAttrValue) } obj.SetAttributes(attrs...)
he should care about: expiration is an attribute, it should be unique and formatted correctly
add Container.SetCreationTime + Container.CreatedAt analogs
keep tryhard
https://github.com/nspcc-dev/neofs-node/pull/2943
We also have https://github.com/nspcc-dev/neofs-sdk-go/issues/253 with some messages there.
oh these issue names...
Is your feature request related to a problem? Please describe.
I'm always frustrated when user needs to do following to set the object expiration:
he should care about: expiration is an attribute, it should be unique and formatted correctly
Describe the solution you'd like
add Container.SetCreationTime + Container.CreatedAt analogs
Describe alternatives you've considered
keep tryhard
Additional context
https://github.com/nspcc-dev/neofs-node/pull/2943