frostfs-api-go/status/types.go
Airat Arifullin bc16a32c24 [] types: Generate StableMarshaler/StableSize methods for protobufs
* 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
2023-07-10 12:08:48 +03:00

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))
}