mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-05 11:31:16 +00:00
1868 lines
43 KiB
Go
1868 lines
43 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: wire.proto
|
|
|
|
package orderbook
|
|
|
|
import (
|
|
encoding_binary "encoding/binary"
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type OrderAsk struct {
|
|
Quantity float64 `protobuf:"fixed64,1,opt,name=quantity,proto3" json:"quantity,omitempty"`
|
|
AskPrice float64 `protobuf:"fixed64,2,opt,name=ask_price,json=askPrice,proto3" json:"ask_price,omitempty"`
|
|
OwnerId uint64 `protobuf:"varint,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
|
|
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
}
|
|
|
|
func (m *OrderAsk) Reset() { *m = OrderAsk{} }
|
|
func (m *OrderAsk) String() string { return proto.CompactTextString(m) }
|
|
func (*OrderAsk) ProtoMessage() {}
|
|
func (*OrderAsk) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f2dcdddcdf68d8e0, []int{0}
|
|
}
|
|
func (m *OrderAsk) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *OrderAsk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_OrderAsk.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *OrderAsk) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_OrderAsk.Merge(m, src)
|
|
}
|
|
func (m *OrderAsk) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *OrderAsk) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_OrderAsk.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_OrderAsk proto.InternalMessageInfo
|
|
|
|
func (m *OrderAsk) GetQuantity() float64 {
|
|
if m != nil {
|
|
return m.Quantity
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *OrderAsk) GetAskPrice() float64 {
|
|
if m != nil {
|
|
return m.AskPrice
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *OrderAsk) GetOwnerId() uint64 {
|
|
if m != nil {
|
|
return m.OwnerId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *OrderAsk) GetSignature() []byte {
|
|
if m != nil {
|
|
return m.Signature
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type OrderBid struct {
|
|
MaxQuantity float64 `protobuf:"fixed64,1,opt,name=max_quantity,json=maxQuantity,proto3" json:"max_quantity,omitempty"`
|
|
MaxPrice float64 `protobuf:"fixed64,2,opt,name=max_price,json=maxPrice,proto3" json:"max_price,omitempty"`
|
|
OwnerId uint64 `protobuf:"varint,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
|
|
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
}
|
|
|
|
func (m *OrderBid) Reset() { *m = OrderBid{} }
|
|
func (m *OrderBid) String() string { return proto.CompactTextString(m) }
|
|
func (*OrderBid) ProtoMessage() {}
|
|
func (*OrderBid) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f2dcdddcdf68d8e0, []int{1}
|
|
}
|
|
func (m *OrderBid) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *OrderBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_OrderBid.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *OrderBid) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_OrderBid.Merge(m, src)
|
|
}
|
|
func (m *OrderBid) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *OrderBid) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_OrderBid.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_OrderBid proto.InternalMessageInfo
|
|
|
|
func (m *OrderBid) GetMaxQuantity() float64 {
|
|
if m != nil {
|
|
return m.MaxQuantity
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *OrderBid) GetMaxPrice() float64 {
|
|
if m != nil {
|
|
return m.MaxPrice
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *OrderBid) GetOwnerId() uint64 {
|
|
if m != nil {
|
|
return m.OwnerId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *OrderBid) GetSignature() []byte {
|
|
if m != nil {
|
|
return m.Signature
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Pair struct {
|
|
// the denomination that the buyer receives i.e. EUR
|
|
BuyersDenomination string `protobuf:"bytes,1,opt,name=buyers_denomination,json=buyersDenomination,proto3" json:"buyers_denomination,omitempty"`
|
|
// the denomination that the seller receives i.e. USD
|
|
SellersDenomination string `protobuf:"bytes,2,opt,name=sellers_denomination,json=sellersDenomination,proto3" json:"sellers_denomination,omitempty"`
|
|
}
|
|
|
|
func (m *Pair) Reset() { *m = Pair{} }
|
|
func (m *Pair) String() string { return proto.CompactTextString(m) }
|
|
func (*Pair) ProtoMessage() {}
|
|
func (*Pair) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f2dcdddcdf68d8e0, []int{2}
|
|
}
|
|
func (m *Pair) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Pair.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Pair) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Pair.Merge(m, src)
|
|
}
|
|
func (m *Pair) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Pair) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Pair.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Pair proto.InternalMessageInfo
|
|
|
|
func (m *Pair) GetBuyersDenomination() string {
|
|
if m != nil {
|
|
return m.BuyersDenomination
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Pair) GetSellersDenomination() string {
|
|
if m != nil {
|
|
return m.SellersDenomination
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Commodity struct {
|
|
Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
|
|
Quantity float64 `protobuf:"fixed64,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
|
|
}
|
|
|
|
func (m *Commodity) Reset() { *m = Commodity{} }
|
|
func (m *Commodity) String() string { return proto.CompactTextString(m) }
|
|
func (*Commodity) ProtoMessage() {}
|
|
func (*Commodity) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f2dcdddcdf68d8e0, []int{3}
|
|
}
|
|
func (m *Commodity) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Commodity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Commodity.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Commodity) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Commodity.Merge(m, src)
|
|
}
|
|
func (m *Commodity) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Commodity) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Commodity.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Commodity proto.InternalMessageInfo
|
|
|
|
func (m *Commodity) GetDenom() string {
|
|
if m != nil {
|
|
return m.Denom
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Commodity) GetQuantity() float64 {
|
|
if m != nil {
|
|
return m.Quantity
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// Accounts is the atomic piece of information that is persisted to disk.
|
|
type Account struct {
|
|
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
|
PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
|
// the set of commodities that the account has
|
|
Commodities []*Commodity `protobuf:"bytes,3,rep,name=commodities,proto3" json:"commodities,omitempty"`
|
|
}
|
|
|
|
func (m *Account) Reset() { *m = Account{} }
|
|
func (m *Account) String() string { return proto.CompactTextString(m) }
|
|
func (*Account) ProtoMessage() {}
|
|
func (*Account) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f2dcdddcdf68d8e0, []int{4}
|
|
}
|
|
func (m *Account) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Account.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Account) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Account.Merge(m, src)
|
|
}
|
|
func (m *Account) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Account) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Account.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Account proto.InternalMessageInfo
|
|
|
|
func (m *Account) GetIndex() uint64 {
|
|
if m != nil {
|
|
return m.Index
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Account) GetPublicKey() []byte {
|
|
if m != nil {
|
|
return m.PublicKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Account) GetCommodities() []*Commodity {
|
|
if m != nil {
|
|
return m.Commodities
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// TradeSet is the transaction that eventually is committed in a block
|
|
// It is derived from a group of MsgBid and MsgAsk's
|
|
type TradeSet struct {
|
|
Pair *Pair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"`
|
|
// the set of matched trades for that peer
|
|
MatchedOrders []*MatchedOrder `protobuf:"bytes,2,rep,name=matched_orders,json=matchedOrders,proto3" json:"matched_orders,omitempty"`
|
|
}
|
|
|
|
func (m *TradeSet) Reset() { *m = TradeSet{} }
|
|
func (m *TradeSet) String() string { return proto.CompactTextString(m) }
|
|
func (*TradeSet) ProtoMessage() {}
|
|
func (*TradeSet) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f2dcdddcdf68d8e0, []int{5}
|
|
}
|
|
func (m *TradeSet) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TradeSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TradeSet.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TradeSet) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TradeSet.Merge(m, src)
|
|
}
|
|
func (m *TradeSet) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TradeSet) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TradeSet.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TradeSet proto.InternalMessageInfo
|
|
|
|
func (m *TradeSet) GetPair() *Pair {
|
|
if m != nil {
|
|
return m.Pair
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TradeSet) GetMatchedOrders() []*MatchedOrder {
|
|
if m != nil {
|
|
return m.MatchedOrders
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type MatchedOrder struct {
|
|
OrderAsk *OrderAsk `protobuf:"bytes,1,opt,name=order_ask,json=orderAsk,proto3" json:"order_ask,omitempty"`
|
|
OrderBid *OrderBid `protobuf:"bytes,2,opt,name=order_bid,json=orderBid,proto3" json:"order_bid,omitempty"`
|
|
}
|
|
|
|
func (m *MatchedOrder) Reset() { *m = MatchedOrder{} }
|
|
func (m *MatchedOrder) String() string { return proto.CompactTextString(m) }
|
|
func (*MatchedOrder) ProtoMessage() {}
|
|
func (*MatchedOrder) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f2dcdddcdf68d8e0, []int{6}
|
|
}
|
|
func (m *MatchedOrder) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *MatchedOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_MatchedOrder.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *MatchedOrder) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_MatchedOrder.Merge(m, src)
|
|
}
|
|
func (m *MatchedOrder) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *MatchedOrder) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_MatchedOrder.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_MatchedOrder proto.InternalMessageInfo
|
|
|
|
func (m *MatchedOrder) GetOrderAsk() *OrderAsk {
|
|
if m != nil {
|
|
return m.OrderAsk
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *MatchedOrder) GetOrderBid() *OrderBid {
|
|
if m != nil {
|
|
return m.OrderBid
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*OrderAsk)(nil), "orderbook.OrderAsk")
|
|
proto.RegisterType((*OrderBid)(nil), "orderbook.OrderBid")
|
|
proto.RegisterType((*Pair)(nil), "orderbook.Pair")
|
|
proto.RegisterType((*Commodity)(nil), "orderbook.Commodity")
|
|
proto.RegisterType((*Account)(nil), "orderbook.Account")
|
|
proto.RegisterType((*TradeSet)(nil), "orderbook.TradeSet")
|
|
proto.RegisterType((*MatchedOrder)(nil), "orderbook.MatchedOrder")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("wire.proto", fileDescriptor_f2dcdddcdf68d8e0) }
|
|
|
|
var fileDescriptor_f2dcdddcdf68d8e0 = []byte{
|
|
// 488 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x4f, 0x8f, 0x12, 0x31,
|
|
0x18, 0xc6, 0x19, 0x40, 0x97, 0x79, 0x41, 0x4d, 0x0a, 0x89, 0xe3, 0xbf, 0x09, 0x8e, 0x17, 0x4e,
|
|
0xa0, 0x6b, 0xa2, 0x27, 0x4d, 0x16, 0xbd, 0x18, 0x63, 0xdc, 0xad, 0x9e, 0xbc, 0x4c, 0x3a, 0xd3,
|
|
0x66, 0xb7, 0x0e, 0x6d, 0xb1, 0xed, 0xb8, 0x90, 0x78, 0xf3, 0x0b, 0xf8, 0xb1, 0x3c, 0xee, 0xd1,
|
|
0xa3, 0x81, 0x2f, 0x62, 0xa6, 0x33, 0x8b, 0x45, 0xbd, 0x79, 0xe3, 0xe9, 0xf3, 0xfe, 0x78, 0x1e,
|
|
0xda, 0x17, 0x80, 0x73, 0xae, 0xd9, 0x74, 0xa9, 0x95, 0x55, 0x28, 0x54, 0x9a, 0x32, 0x9d, 0x29,
|
|
0x55, 0x24, 0x5f, 0xa0, 0xf7, 0xb6, 0x12, 0x47, 0xa6, 0x40, 0xb7, 0xa1, 0xf7, 0xa9, 0x24, 0xd2,
|
|
0x72, 0xbb, 0x8e, 0x82, 0x71, 0x30, 0x09, 0xf0, 0x4e, 0xa3, 0x3b, 0x10, 0x12, 0x53, 0xa4, 0x4b,
|
|
0xcd, 0x73, 0x16, 0xb5, 0x6b, 0x93, 0x98, 0xe2, 0xb8, 0xd2, 0xe8, 0x16, 0xf4, 0xd4, 0xb9, 0x64,
|
|
0x3a, 0xe5, 0x34, 0xea, 0x8c, 0x83, 0x49, 0x17, 0x1f, 0x38, 0xfd, 0x8a, 0xa2, 0xbb, 0x10, 0x1a,
|
|
0x7e, 0x2a, 0x89, 0x2d, 0x35, 0x8b, 0xba, 0xe3, 0x60, 0x32, 0xc0, 0xbf, 0x0f, 0x92, 0xaf, 0x41,
|
|
0x13, 0x3f, 0xe7, 0x14, 0xdd, 0x87, 0x81, 0x20, 0xab, 0xf4, 0x8f, 0x0a, 0x7d, 0x41, 0x56, 0x27,
|
|
0x5e, 0x8b, 0x6a, 0x64, 0xaf, 0x85, 0x20, 0xab, 0xff, 0x6c, 0xf1, 0x11, 0xba, 0xc7, 0x84, 0x6b,
|
|
0x34, 0x83, 0x61, 0x56, 0xae, 0x99, 0x36, 0x29, 0x65, 0x52, 0x09, 0x2e, 0x89, 0xe5, 0x4a, 0xba,
|
|
0x1e, 0x21, 0x46, 0xb5, 0xf5, 0xd2, 0x73, 0xd0, 0x23, 0x18, 0x19, 0xb6, 0x58, 0xfc, 0x45, 0xb4,
|
|
0x1d, 0x31, 0x6c, 0x3c, 0x1f, 0x49, 0x9e, 0x41, 0xf8, 0x42, 0x09, 0xa1, 0x68, 0xf5, 0x73, 0x46,
|
|
0x70, 0xc5, 0x71, 0x4d, 0x44, 0x2d, 0xf6, 0x9e, 0xa1, 0xbd, 0xff, 0x0c, 0xc9, 0x67, 0x38, 0x38,
|
|
0xca, 0x73, 0x55, 0x4a, 0x5b, 0xc1, 0x5c, 0x52, 0xb6, 0x72, 0x70, 0x17, 0xd7, 0x02, 0xdd, 0x03,
|
|
0x58, 0x96, 0xd9, 0x82, 0xe7, 0x69, 0xc1, 0x6a, 0x7c, 0x80, 0xc3, 0xfa, 0xe4, 0x35, 0x5b, 0xa3,
|
|
0x27, 0xd0, 0xcf, 0x9b, 0x78, 0xce, 0x4c, 0xd4, 0x19, 0x77, 0x26, 0xfd, 0xc3, 0xd1, 0x74, 0xb7,
|
|
0x0f, 0xd3, 0x5d, 0x39, 0xec, 0x0f, 0x26, 0x0a, 0x7a, 0xef, 0x35, 0xa1, 0xec, 0x1d, 0xb3, 0xe8,
|
|
0x01, 0x74, 0x97, 0x84, 0x6b, 0x97, 0xdb, 0x3f, 0xbc, 0xe1, 0xc1, 0xd5, 0x2d, 0x62, 0x67, 0xa2,
|
|
0xe7, 0x70, 0x5d, 0x10, 0x9b, 0x9f, 0x31, 0x9a, 0x3a, 0xdf, 0x44, 0x6d, 0x97, 0x75, 0xd3, 0x1b,
|
|
0x7f, 0x53, 0x0f, 0xb8, 0x05, 0xc0, 0xd7, 0x84, 0xa7, 0x4c, 0xa2, 0x61, 0xe0, 0xdb, 0xe8, 0x21,
|
|
0xd4, 0x4b, 0x9b, 0x12, 0x53, 0x34, 0xc9, 0x43, 0xef, 0xab, 0x2e, 0x77, 0x18, 0xf7, 0xd4, 0xe5,
|
|
0x36, 0xef, 0x88, 0x8c, 0x53, 0x77, 0x11, 0xff, 0x20, 0xe6, 0x9c, 0x36, 0xc4, 0x9c, 0xd3, 0xf9,
|
|
0xc9, 0xf7, 0x4d, 0x1c, 0x5c, 0x6c, 0xe2, 0xe0, 0xe7, 0x26, 0x0e, 0xbe, 0x6d, 0xe3, 0xd6, 0xc5,
|
|
0x36, 0x6e, 0xfd, 0xd8, 0xc6, 0xad, 0x0f, 0x4f, 0x4f, 0xb9, 0x3d, 0x2b, 0xb3, 0x69, 0xae, 0xc4,
|
|
0xcc, 0x32, 0x49, 0x99, 0x16, 0x5c, 0x5a, 0xff, 0x23, 0xc9, 0x72, 0x3e, 0x63, 0x2b, 0x22, 0x96,
|
|
0x0b, 0x36, 0xdb, 0xa5, 0x64, 0x57, 0xdd, 0x1f, 0xee, 0xf1, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff,
|
|
0x9c, 0x9c, 0xf5, 0x4a, 0x7e, 0x03, 0x00, 0x00,
|
|
}
|
|
|
|
func (m *OrderAsk) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *OrderAsk) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *OrderAsk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Signature) > 0 {
|
|
i -= len(m.Signature)
|
|
copy(dAtA[i:], m.Signature)
|
|
i = encodeVarintWire(dAtA, i, uint64(len(m.Signature)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.OwnerId != 0 {
|
|
i = encodeVarintWire(dAtA, i, uint64(m.OwnerId))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.AskPrice != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AskPrice))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if m.Quantity != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Quantity))))
|
|
i--
|
|
dAtA[i] = 0x9
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *OrderBid) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *OrderBid) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *OrderBid) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Signature) > 0 {
|
|
i -= len(m.Signature)
|
|
copy(dAtA[i:], m.Signature)
|
|
i = encodeVarintWire(dAtA, i, uint64(len(m.Signature)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.OwnerId != 0 {
|
|
i = encodeVarintWire(dAtA, i, uint64(m.OwnerId))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.MaxPrice != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MaxPrice))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if m.MaxQuantity != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MaxQuantity))))
|
|
i--
|
|
dAtA[i] = 0x9
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Pair) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Pair) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.SellersDenomination) > 0 {
|
|
i -= len(m.SellersDenomination)
|
|
copy(dAtA[i:], m.SellersDenomination)
|
|
i = encodeVarintWire(dAtA, i, uint64(len(m.SellersDenomination)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.BuyersDenomination) > 0 {
|
|
i -= len(m.BuyersDenomination)
|
|
copy(dAtA[i:], m.BuyersDenomination)
|
|
i = encodeVarintWire(dAtA, i, uint64(len(m.BuyersDenomination)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Commodity) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Commodity) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Commodity) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Quantity != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Quantity))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if len(m.Denom) > 0 {
|
|
i -= len(m.Denom)
|
|
copy(dAtA[i:], m.Denom)
|
|
i = encodeVarintWire(dAtA, i, uint64(len(m.Denom)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Account) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Account) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Commodities) > 0 {
|
|
for iNdEx := len(m.Commodities) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Commodities[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintWire(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if len(m.PublicKey) > 0 {
|
|
i -= len(m.PublicKey)
|
|
copy(dAtA[i:], m.PublicKey)
|
|
i = encodeVarintWire(dAtA, i, uint64(len(m.PublicKey)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Index != 0 {
|
|
i = encodeVarintWire(dAtA, i, uint64(m.Index))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TradeSet) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TradeSet) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TradeSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.MatchedOrders) > 0 {
|
|
for iNdEx := len(m.MatchedOrders) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.MatchedOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintWire(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if m.Pair != nil {
|
|
{
|
|
size, err := m.Pair.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintWire(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *MatchedOrder) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MatchedOrder) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *MatchedOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.OrderBid != nil {
|
|
{
|
|
size, err := m.OrderBid.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintWire(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.OrderAsk != nil {
|
|
{
|
|
size, err := m.OrderAsk.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintWire(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintWire(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovWire(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *OrderAsk) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Quantity != 0 {
|
|
n += 9
|
|
}
|
|
if m.AskPrice != 0 {
|
|
n += 9
|
|
}
|
|
if m.OwnerId != 0 {
|
|
n += 1 + sovWire(uint64(m.OwnerId))
|
|
}
|
|
l = len(m.Signature)
|
|
if l > 0 {
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *OrderBid) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.MaxQuantity != 0 {
|
|
n += 9
|
|
}
|
|
if m.MaxPrice != 0 {
|
|
n += 9
|
|
}
|
|
if m.OwnerId != 0 {
|
|
n += 1 + sovWire(uint64(m.OwnerId))
|
|
}
|
|
l = len(m.Signature)
|
|
if l > 0 {
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Pair) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.BuyersDenomination)
|
|
if l > 0 {
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
l = len(m.SellersDenomination)
|
|
if l > 0 {
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Commodity) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Denom)
|
|
if l > 0 {
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
if m.Quantity != 0 {
|
|
n += 9
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Account) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Index != 0 {
|
|
n += 1 + sovWire(uint64(m.Index))
|
|
}
|
|
l = len(m.PublicKey)
|
|
if l > 0 {
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
if len(m.Commodities) > 0 {
|
|
for _, e := range m.Commodities {
|
|
l = e.Size()
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TradeSet) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Pair != nil {
|
|
l = m.Pair.Size()
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
if len(m.MatchedOrders) > 0 {
|
|
for _, e := range m.MatchedOrders {
|
|
l = e.Size()
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *MatchedOrder) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.OrderAsk != nil {
|
|
l = m.OrderAsk.Size()
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
if m.OrderBid != nil {
|
|
l = m.OrderBid.Size()
|
|
n += 1 + l + sovWire(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovWire(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozWire(x uint64) (n int) {
|
|
return sovWire(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *OrderAsk) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: OrderAsk: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: OrderAsk: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Quantity = float64(math.Float64frombits(v))
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AskPrice", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.AskPrice = float64(math.Float64frombits(v))
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType)
|
|
}
|
|
m.OwnerId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.OwnerId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Signature == nil {
|
|
m.Signature = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipWire(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *OrderBid) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: OrderBid: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: OrderBid: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxQuantity", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.MaxQuantity = float64(math.Float64frombits(v))
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxPrice", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.MaxPrice = float64(math.Float64frombits(v))
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType)
|
|
}
|
|
m.OwnerId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.OwnerId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Signature == nil {
|
|
m.Signature = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipWire(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Pair) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Pair: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BuyersDenomination", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.BuyersDenomination = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SellersDenomination", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.SellersDenomination = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipWire(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Commodity) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Commodity: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Commodity: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Denom = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Quantity = float64(math.Float64frombits(v))
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipWire(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Account) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Account: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
|
}
|
|
m.Index = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Index |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.PublicKey == nil {
|
|
m.PublicKey = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Commodities", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Commodities = append(m.Commodities, &Commodity{})
|
|
if err := m.Commodities[len(m.Commodities)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipWire(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TradeSet) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: TradeSet: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TradeSet: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Pair == nil {
|
|
m.Pair = &Pair{}
|
|
}
|
|
if err := m.Pair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MatchedOrders", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.MatchedOrders = append(m.MatchedOrders, &MatchedOrder{})
|
|
if err := m.MatchedOrders[len(m.MatchedOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipWire(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *MatchedOrder) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: MatchedOrder: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MatchedOrder: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field OrderAsk", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.OrderAsk == nil {
|
|
m.OrderAsk = &OrderAsk{}
|
|
}
|
|
if err := m.OrderAsk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field OrderBid", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.OrderBid == nil {
|
|
m.OrderBid = &OrderBid{}
|
|
}
|
|
if err := m.OrderBid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipWire(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthWire
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipWire(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowWire
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthWire
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupWire
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthWire
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthWire = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowWire = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupWire = fmt.Errorf("proto: unexpected end of group")
|
|
)
|