All checks were successful
* 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
137 lines
4.2 KiB
Go
Generated
137 lines
4.2 KiB
Go
Generated
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
|
|
|
|
package accounting
|
|
|
|
import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *BalanceRequest_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.NestedStructureSize(1, x.OwnerId)
|
|
return size
|
|
}
|
|
|
|
// StableMarshal marshals x in protobuf binary format with stable field order.
|
|
//
|
|
// If buffer length is less than x.StableSize(), new buffer is allocated.
|
|
//
|
|
// Returns any error encountered which did not allow writing the data completely.
|
|
// Otherwise, returns the buffer in which the data is written.
|
|
//
|
|
// Structures with the same field values have the same binary format.
|
|
func (x *BalanceRequest_Body) StableMarshal(buf []byte) []byte {
|
|
if x == nil {
|
|
return []byte{}
|
|
}
|
|
if buf == nil {
|
|
buf = make([]byte, x.StableSize())
|
|
}
|
|
var offset int
|
|
offset += proto.NestedStructureMarshal(1, buf[offset:], x.OwnerId)
|
|
return buf
|
|
}
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *BalanceRequest) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.NestedStructureSize(1, x.Body)
|
|
size += proto.NestedStructureSize(2, x.MetaHeader)
|
|
size += proto.NestedStructureSize(3, x.VerifyHeader)
|
|
return size
|
|
}
|
|
|
|
// StableMarshal marshals x in protobuf binary format with stable field order.
|
|
//
|
|
// If buffer length is less than x.StableSize(), new buffer is allocated.
|
|
//
|
|
// Returns any error encountered which did not allow writing the data completely.
|
|
// Otherwise, returns the buffer in which the data is written.
|
|
//
|
|
// Structures with the same field values have the same binary format.
|
|
func (x *BalanceRequest) StableMarshal(buf []byte) []byte {
|
|
if x == nil {
|
|
return []byte{}
|
|
}
|
|
if buf == nil {
|
|
buf = make([]byte, x.StableSize())
|
|
}
|
|
var offset int
|
|
offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body)
|
|
offset += proto.NestedStructureMarshal(2, buf[offset:], x.MetaHeader)
|
|
offset += proto.NestedStructureMarshal(3, buf[offset:], x.VerifyHeader)
|
|
return buf
|
|
}
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *BalanceResponse_Body) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.NestedStructureSize(1, x.Balance)
|
|
return size
|
|
}
|
|
|
|
// StableMarshal marshals x in protobuf binary format with stable field order.
|
|
//
|
|
// If buffer length is less than x.StableSize(), new buffer is allocated.
|
|
//
|
|
// Returns any error encountered which did not allow writing the data completely.
|
|
// Otherwise, returns the buffer in which the data is written.
|
|
//
|
|
// Structures with the same field values have the same binary format.
|
|
func (x *BalanceResponse_Body) StableMarshal(buf []byte) []byte {
|
|
if x == nil {
|
|
return []byte{}
|
|
}
|
|
if buf == nil {
|
|
buf = make([]byte, x.StableSize())
|
|
}
|
|
var offset int
|
|
offset += proto.NestedStructureMarshal(1, buf[offset:], x.Balance)
|
|
return buf
|
|
}
|
|
|
|
// StableSize returns the size of x in protobuf format.
|
|
//
|
|
// Structures with the same field values have the same binary size.
|
|
func (x *BalanceResponse) StableSize() (size int) {
|
|
if x == nil {
|
|
return 0
|
|
}
|
|
size += proto.NestedStructureSize(1, x.Body)
|
|
size += proto.NestedStructureSize(2, x.MetaHeader)
|
|
size += proto.NestedStructureSize(3, x.VerifyHeader)
|
|
return size
|
|
}
|
|
|
|
// StableMarshal marshals x in protobuf binary format with stable field order.
|
|
//
|
|
// If buffer length is less than x.StableSize(), new buffer is allocated.
|
|
//
|
|
// Returns any error encountered which did not allow writing the data completely.
|
|
// Otherwise, returns the buffer in which the data is written.
|
|
//
|
|
// Structures with the same field values have the same binary format.
|
|
func (x *BalanceResponse) StableMarshal(buf []byte) []byte {
|
|
if x == nil {
|
|
return []byte{}
|
|
}
|
|
if buf == nil {
|
|
buf = make([]byte, x.StableSize())
|
|
}
|
|
var offset int
|
|
offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body)
|
|
offset += proto.NestedStructureMarshal(2, buf[offset:], x.MetaHeader)
|
|
offset += proto.NestedStructureMarshal(3, buf[offset:], x.VerifyHeader)
|
|
return buf
|
|
}
|