frostfs-api-go/storagegroup/grpc/types.go
Evgenii Stratonikov 732dd51b1b [#388] *: Remove nil check from setters
I knew one day `sed` would save me an hour of manual work:
```
sed -i -n -e '
s/) Set/) Set/
p
t setter
b end
:setter
    n
    s/nil/nil/
    t hasif
    p
    b end
    :hasif
        n
        :loop
        p
        n
        s/}/}/
        t end
        b loop
        :end
' $@
goimports -w $@
```

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-31 11:32:04 +03:00

25 lines
733 B
Go

package storagegroup
import (
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
)
// SetValidationDataSize sets the total size of the payloads of the storage group.
func (m *StorageGroup) SetValidationDataSize(v uint64) {
m.ValidationDataSize = v
}
// SetValidationHash sets total homomorphic hash of the storage group payloads.
func (m *StorageGroup) SetValidationHash(v *refs.Checksum) {
m.ValidationHash = v
}
// SetExpirationEpoch sets number of the last epoch of the storage group lifetime.
func (m *StorageGroup) SetExpirationEpoch(v uint64) {
m.ExpirationEpoch = v
}
// SetMembers sets list of the identifiers of the storage group members.
func (m *StorageGroup) SetMembers(v []*refs.ObjectID) {
m.Members = v
}