frostfs-api-go/tombstone/types.go
Leonard Lyubich 25da5d2e13 Add v2 version to go module name
Replace all elements from `v2` to root directory.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-17 15:29:33 +03:00

63 lines
1.1 KiB
Go

package tombstone
import (
"github.com/nspcc-dev/neofs-api-go/v2/refs"
)
// Tombstone is a unified structure of Tombstone
// message from proto definition.
type Tombstone struct {
exp uint64
splitID []byte
members []*refs.ObjectID
}
// GetExpirationEpoch returns number of tombstone expiration epoch.
func (s *Tombstone) GetExpirationEpoch() uint64 {
if s != nil {
return s.exp
}
return 0
}
// SetExpirationEpoch sets number of tombstone expiration epoch.
func (s *Tombstone) SetExpirationEpoch(v uint64) {
if s != nil {
s.exp = v
}
}
// GetSplitID returns identifier of split object hierarchy.
func (s *Tombstone) GetSplitID() []byte {
if s != nil {
return s.splitID
}
return nil
}
// SetSplitID sets identifier of split object hierarchy.
func (s *Tombstone) SetSplitID(v []byte) {
if s != nil {
s.splitID = v
}
}
// GetMembers returns list of objects to be deleted.
func (s *Tombstone) GetMembers() []*refs.ObjectID {
if s != nil {
return s.members
}
return nil
}
// SetMembers sets list of objects to be deleted.
func (s *Tombstone) SetMembers(v []*refs.ObjectID) {
if s != nil {
s.members = v
}
}