From f164bc9b4bca26586bda407dca37a71c194f25fd Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 30 Aug 2023 16:28:37 +0400 Subject: [PATCH] object: Export constant key to the expiration attribute The constant is going to be used to work with object expiration time instead of string literal or `github.com/nspcc-dev/neofs-api-go/v2` module import. Signed-off-by: Leonard Lyubich --- object/attribute.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/object/attribute.go b/object/attribute.go index b9976413..c871e074 100644 --- a/object/attribute.go +++ b/object/attribute.go @@ -4,6 +4,22 @@ import ( "github.com/nspcc-dev/neofs-api-go/v2/object" ) +// Various system attributes. +const ( + // AttributeExpirationEpoch is a key to an object attribute that determines + // after what epoch the object becomes expired. Objects that do not have this + // attribute never expire. + // + // Reaction of NeoFS system components to the objects' 'expired' property may + // vary. For example, in the basic scenario, expired objects are auto-deleted + // from the storage. Detailed behavior can be found in the NeoFS Specification. + // + // Note that the value determines exactly the last epoch of the object's + // relevance: for example, with the value N, the object is relevant in epoch N + // and expired in any epoch starting from N+1. + AttributeExpirationEpoch = object.SysAttributeExpEpoch +) + // Attribute represents v2-compatible object attribute. type Attribute object.Attribute