* 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
17 lines
382 B
Go
17 lines
382 B
Go
package status
|
|
|
|
import (
|
|
status "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/grpc"
|
|
)
|
|
|
|
// Code represents NeoFS API V2-compatible status code.
|
|
type Code uint32
|
|
|
|
// EqualNumber checks if the numerical Code equals num.
|
|
func (x Code) EqualNumber(num uint32) bool {
|
|
return uint32(x) == num
|
|
}
|
|
|
|
func SetSerializedCode(s *status.Status, code Code) {
|
|
s.SetCode(uint32(code))
|
|
}
|