forked from TrueCloudLab/frostfs-api-go
* Add plugin option for protogen in Makefile * Fix the generator for the plugin in util/protogen * Erase convertable types, move helpful methods to gRPC protobufs * Erase helpers for convertations * Generate StableMarshlal/StableSize for protobufs by the protoc plugin Signed-off-by: Airat Arifullin a.arifullin@yadro.com
21 lines
510 B
Go
21 lines
510 B
Go
package storagegrouptest
|
|
|
|
import (
|
|
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
|
|
storagegroup "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/storagegroup/grpc"
|
|
)
|
|
|
|
func GenerateStorageGroup(empty bool) *storagegroup.StorageGroup {
|
|
m := new(storagegroup.StorageGroup)
|
|
|
|
if !empty {
|
|
m.SetValidationDataSize(44)
|
|
//nolint:staticcheck
|
|
m.SetExpirationEpoch(55)
|
|
m.SetMembers(refstest.GenerateObjectIDs(false))
|
|
}
|
|
|
|
m.SetValidationHash(refstest.GenerateChecksum(empty))
|
|
|
|
return m
|
|
}
|