order

package
v0.0.0-...-38fc69b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2017 License: Apache-2.0 Imports: 8 Imported by: 3

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

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) Descriptor() ([]byte, []int)

func (*Order) Equal

func (this *Order) Equal(that interface{}) bool

func (*Order) GetExchange

func (m *Order) GetExchange() exchange.Exchange

func (*Order) GetRate

func (m *Order) GetRate() *currency.Volume

func (*Order) GetType

func (m *Order) GetType() Type

func (*Order) GetVolume

func (m *Order) GetVolume() *currency.Volume

func (*Order) Marshal

func (m *Order) Marshal() (dAtA []byte, err error)

func (*Order) MarshalTo

func (m *Order) MarshalTo(dAtA []byte) (int, error)

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) Reset

func (m *Order) Reset()

func (*Order) Size

func (m *Order) Size() (n int)

func (*Order) String

func (m *Order) String() string

func (*Order) TotalPrice

func (order *Order) TotalPrice() *currency.Volume

TotalPrice - Total price of an order.

func (*Order) Unmarshal

func (m *Order) Unmarshal(dAtA []byte) error

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) Descriptor() ([]byte, []int)

func (*Trade) Equal

func (this *Trade) Equal(that interface{}) bool

func (*Trade) GetID

func (m *Trade) GetID() int64

func (*Trade) GetOrder

func (m *Trade) GetOrder() *Order

func (*Trade) GetTime

func (m *Trade) GetTime() *google_protobuf1.Timestamp

func (*Trade) Marshal

func (m *Trade) Marshal() (dAtA []byte, err error)

func (*Trade) MarshalTo

func (m *Trade) MarshalTo(dAtA []byte) (int, error)

func (*Trade) ProtoMessage

func (*Trade) ProtoMessage()

func (*Trade) Reset

func (m *Trade) Reset()

func (*Trade) Size

func (m *Trade) Size() (n int)

func (*Trade) String

func (m *Trade) String() string

func (*Trade) Unmarshal

func (m *Trade) Unmarshal(dAtA []byte) error

type Type

type Type int32

Type - Type of an order. An `ask` (sell) or a `bid` (buy).

const (
	Ask Type = 0
	Bid Type = 1
)

func TypeFromString

func TypeFromString(str string) (_ Type, err error)

TypeFromString - Converts from string to Type.

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

func (Type) String

func (x Type) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL