mirror of
https://github.com/nspcc-dev/neofs-sdk-go.git
synced 2026-03-01 04:29:18 +00:00
Add object.ExpirationEpoch() method #103
Labels
No labels
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U2
U2
U3
U4
blocked
bug
client
config
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
pool
question
security
task
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-sdk-go#103
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @carpawell on GitHub (May 27, 2022).
Now we use attrs and constants in CLI and some other places. I think version-independent setter and getter could be helpful.
Think also could be applied to the version-depended repo.
@cthulhu-rider commented on GitHub (Aug 30, 2023):
duplicated call may be resolved differently (panic or leave on the user conscience) and almost definitely unexpected
dedicated method also takes care about format and prevents calls like
@roman-khimov commented on GitHub (Aug 30, 2023):
My concerns are mostly around compatibility (there is old code doing
SetAttribute(s)) and API consistency (interaction between this andSetAttribute(s)). If it can be explained in some meaningful way to the user. But this would also mean that a similar API is expected of other system attributes.@smallhive?
@smallhive commented on GitHub (Aug 31, 2023):
I consider using separate methods for system/predefined attributes to be more good, than evil. It will help cover some situations, like
obj.SetAttribute(object.AttrExpirationEpoch, "1.5"), because we may define an expected type of value. Such moments are important for us rather than for the user. We want to have properly filled and named system attributes.How many system attributes do we have? Ten, maybe up to twenty, if I remember correctly. Adding new methods will improve object API. Old code is going to work as is, all of them are still available to set via
obj.SetAttributemethod.According to the documentation - we should update
SetAttributedocs and attract attention to the fact this method is more about user-defined attributes. The method also allows putting system attributes as well, but the preferable way is using separate methods and we should leave the method list