Documentation
¶
Overview ¶
Package order is a generated protocol buffer package.
It is generated from these files:
github.com/crypto-bank/proto/order/order.proto
It has these top-level messages:
Order Trade
Index ¶
- Variables
- type Order
- func (*Order) Descriptor() ([]byte, []int)
- func (this *Order) Equal(that interface{}) bool
- func (m *Order) GetExchange() exchange.Exchange
- func (m *Order) GetRate() *currency.Volume
- func (m *Order) GetType() Type
- func (m *Order) GetVolume() *currency.Volume
- func (m *Order) Marshal() (dAtA []byte, err error)
- func (m *Order) MarshalTo(dAtA []byte) (int, error)
- func (*Order) ProtoMessage()
- func (m *Order) Reset()
- func (m *Order) Size() (n int)
- func (m *Order) String() string
- func (order *Order) TotalPrice() *currency.Volume
- func (m *Order) Unmarshal(dAtA []byte) error
- type Trade
- func (*Trade) Descriptor() ([]byte, []int)
- func (this *Trade) Equal(that interface{}) bool
- func (m *Trade) GetID() int64
- func (m *Trade) GetOrder() *Order
- func (m *Trade) GetTime() *google_protobuf1.Timestamp
- func (m *Trade) Marshal() (dAtA []byte, err error)
- func (m *Trade) MarshalTo(dAtA []byte) (int, error)
- func (*Trade) ProtoMessage()
- func (m *Trade) Reset()
- func (m *Trade) Size() (n int)
- func (m *Trade) String() string
- func (m *Trade) Unmarshal(dAtA []byte) error
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthOrder = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowOrder = fmt.Errorf("proto: integer overflow") )
View Source
var Type_name = map[int32]string{
0: "ASK",
1: "BID",
}
View Source
var Type_value = map[string]int32{
"ASK": 0,
"BID": 1,
}
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct { // Type - Type of an order. Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=order.Type" json:"type,omitempty"` // Volume - Volume of currency ordered. Volume *currency.Volume `protobuf:"bytes,2,opt,name=volume" json:"volume,omitempty"` // Rate - Currency price rate. Rate *currency.Volume `protobuf:"bytes,3,opt,name=rate" json:"rate,omitempty"` // Exchange - Identifier of an exchange. Exchange exchange.Exchange `protobuf:"varint,4,opt,name=exchange,proto3,enum=exchange.Exchange" json:"exchange,omitempty"` }
Order - Cryptocurrency order.
func (*Order) Descriptor ¶
func (*Order) GetExchange ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) TotalPrice ¶
TotalPrice - Total price of an order.
type Trade ¶
type Trade struct { // ID - ID of a trade. // This ID is unique in scope of exchange only. ID int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Order - Order traded. Order *Order `protobuf:"bytes,2,opt,name=order" json:"order,omitempty"` // Time - Time of an order. Time *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=time" json:"time,omitempty"` }
Trade - New trade.
func (*Trade) Descriptor ¶
func (*Trade) GetTime ¶
func (m *Trade) GetTime() *google_protobuf1.Timestamp
func (*Trade) ProtoMessage ¶
func (*Trade) ProtoMessage()
type Type ¶
type Type int32
Type - Type of an order. An `ask` (sell) or a `bid` (buy).
func TypeFromString ¶
TypeFromString - Converts from string to Type.
func (Type) EnumDescriptor ¶
Click to show internal directories.
Click to hide internal directories.