github.com/TrueCloudLab/frostfs-api-go/v2@v2.0.0-20230228134343-196241c4e79a/storagegroup/types.go (about) 1 package storagegroup 2 3 import ( 4 "github.com/TrueCloudLab/frostfs-api-go/v2/refs" 5 ) 6 7 // StorageGroup is a unified structure of StorageGroup 8 // message from proto definition. 9 type StorageGroup struct { 10 size uint64 11 12 hash *refs.Checksum 13 14 exp uint64 15 16 members []refs.ObjectID 17 } 18 19 // GetValidationDataSize of unified storage group structure. 20 func (s *StorageGroup) GetValidationDataSize() uint64 { 21 if s != nil { 22 return s.size 23 } 24 25 return 0 26 } 27 28 // SetValidationDataSize into unified storage group structure. 29 func (s *StorageGroup) SetValidationDataSize(v uint64) { 30 s.size = v 31 } 32 33 // GetValidationHash of unified storage group structure. 34 func (s *StorageGroup) GetValidationHash() *refs.Checksum { 35 if s != nil { 36 return s.hash 37 } 38 39 return nil 40 } 41 42 // SetValidationHash into unified storage group structure. 43 func (s *StorageGroup) SetValidationHash(v *refs.Checksum) { 44 s.hash = v 45 } 46 47 // GetExpirationEpoch of unified storage group structure. 48 // 49 // Deprecated: Do not use. 50 func (s *StorageGroup) GetExpirationEpoch() uint64 { 51 if s != nil { 52 return s.exp 53 } 54 55 return 0 56 } 57 58 // SetExpirationEpoch into unified storage group structure. 59 // 60 // Deprecated: Do not use. 61 func (s *StorageGroup) SetExpirationEpoch(v uint64) { 62 s.exp = v 63 } 64 65 // GetMembers of unified storage group structure. Members are objects of 66 // storage group. 67 func (s *StorageGroup) GetMembers() []refs.ObjectID { 68 if s != nil { 69 return s.members 70 } 71 72 return nil 73 } 74 75 // SetMembers into unified storage group structure. Members are objects of 76 // storage group. 77 func (s *StorageGroup) SetMembers(v []refs.ObjectID) { 78 s.members = v 79 }