Documentation ¶
Overview ¶
Package entity is a generated protocol buffer package.
It is generated from these files:
entity.proto
It has these top-level messages:
ProtoRecord ProtoTick
Index ¶
- Constants
- type InfoExItem
- type ProtoRecord
- func (*ProtoRecord) Descriptor() ([]byte, []int)
- func (m *ProtoRecord) GetAmount() float64
- func (m *ProtoRecord) GetClose() float64
- func (m *ProtoRecord) GetDate() int64
- func (m *ProtoRecord) GetHigh() float64
- func (m *ProtoRecord) GetLow() float64
- func (m *ProtoRecord) GetOpen() float64
- func (m *ProtoRecord) GetVolume() float64
- func (*ProtoRecord) ProtoMessage()
- func (m *ProtoRecord) Reset()
- func (m *ProtoRecord) String() string
- type ProtoTick
- func (*ProtoTick) Descriptor() ([]byte, []int)
- func (m *ProtoTick) GetAmount() float64
- func (m *ProtoTick) GetAskPrices() []float64
- func (m *ProtoTick) GetAskVolumes() []float64
- func (m *ProtoTick) GetBidPrices() []float64
- func (m *ProtoTick) GetBidVolumes() []float64
- func (m *ProtoTick) GetBuyVolume() float64
- func (m *ProtoTick) GetClose() float64
- func (m *ProtoTick) GetCode() string
- func (m *ProtoTick) GetHigh() float64
- func (m *ProtoTick) GetHighLimited() float64
- func (m *ProtoTick) GetLow() float64
- func (m *ProtoTick) GetLowLimited() float64
- func (m *ProtoTick) GetOpen() float64
- func (m *ProtoTick) GetPosition() float64
- func (m *ProtoTick) GetPreClose() float64
- func (m *ProtoTick) GetPrePosition() float64
- func (m *ProtoTick) GetPreSettle() float64
- func (m *ProtoTick) GetPrice() float64
- func (m *ProtoTick) GetSellVolume() float64
- func (m *ProtoTick) GetSettle() float64
- func (m *ProtoTick) GetSide() int32
- func (m *ProtoTick) GetTimestamp() int64
- func (m *ProtoTick) GetTotalAmount() float64
- func (m *ProtoTick) GetTotalVolume() float64
- func (m *ProtoTick) GetVolume() float64
- func (*ProtoTick) ProtoMessage()
- func (m *ProtoTick) Reset()
- func (m *ProtoTick) String() string
- type Record
- func (this *Record) Eq(that *Record) bool
- func (this *Record) GetAmount() float64
- func (this *Record) GetBuyVolume() float64
- func (this *Record) GetClose() float64
- func (this *Record) GetDate() string
- func (this *Record) GetHigh() float64
- func (this *Record) GetLow() float64
- func (this *Record) GetOpen() float64
- func (this *Record) GetSellVolume() float64
- func (this *Record) GetUTCDate() uint64
- func (this *Record) GetVolume() float64
- func (this *Record) SetDate(s string)
- func (this *Record) String() string
- func (this *Record) ToJsonBytes() ([]byte, error)
- func (this *Record) ToProtoBytes() ([]byte, error)
- type RecordEx
- type Security
- func (this *Security) CatCode() string
- func (this *Security) GetCategory() string
- func (this *Security) GetCode() string
- func (this *Security) GetExchange() string
- func (this *Security) IsDigitCurrency() bool
- func (this *Security) IsIndex() bool
- func (this *Security) IsSpot() bool
- func (this *Security) String() string
- type TickItem
Constants ¶
View Source
const ( TICK_SIDE_UNKNOWN = iota TICK_SIDE_BUY TICK_SIDE_SELL )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfoExItem ¶
type ProtoRecord ¶
type ProtoRecord struct { Date int64 `protobuf:"zigzag64,1,opt,name=date" json:"date,omitempty"` Open float64 `protobuf:"fixed64,2,opt,name=open" json:"open,omitempty"` Close float64 `protobuf:"fixed64,3,opt,name=close" json:"close,omitempty"` High float64 `protobuf:"fixed64,4,opt,name=high" json:"high,omitempty"` Low float64 `protobuf:"fixed64,5,opt,name=low" json:"low,omitempty"` Volume float64 `protobuf:"fixed64,6,opt,name=volume" json:"volume,omitempty"` Amount float64 `protobuf:"fixed64,7,opt,name=amount" json:"amount,omitempty"` }
func (*ProtoRecord) Descriptor ¶
func (*ProtoRecord) Descriptor() ([]byte, []int)
func (*ProtoRecord) GetAmount ¶
func (m *ProtoRecord) GetAmount() float64
func (*ProtoRecord) GetClose ¶
func (m *ProtoRecord) GetClose() float64
func (*ProtoRecord) GetDate ¶
func (m *ProtoRecord) GetDate() int64
func (*ProtoRecord) GetHigh ¶
func (m *ProtoRecord) GetHigh() float64
func (*ProtoRecord) GetLow ¶
func (m *ProtoRecord) GetLow() float64
func (*ProtoRecord) GetOpen ¶
func (m *ProtoRecord) GetOpen() float64
func (*ProtoRecord) GetVolume ¶
func (m *ProtoRecord) GetVolume() float64
func (*ProtoRecord) ProtoMessage ¶
func (*ProtoRecord) ProtoMessage()
func (*ProtoRecord) Reset ¶
func (m *ProtoRecord) Reset()
func (*ProtoRecord) String ¶
func (m *ProtoRecord) String() string
type ProtoTick ¶
type ProtoTick struct { Code string `protobuf:"bytes,1,opt,name=code" json:"code,omitempty"` Timestamp int64 `protobuf:"zigzag64,2,opt,name=timestamp" json:"timestamp,omitempty"` HighLimited float64 `protobuf:"fixed64,3,opt,name=highLimited" json:"highLimited,omitempty"` LowLimited float64 `protobuf:"fixed64,4,opt,name=lowLimited" json:"lowLimited,omitempty"` Price float64 `protobuf:"fixed64,5,opt,name=price" json:"price,omitempty"` Position float64 `protobuf:"fixed64,6,opt,name=position" json:"position,omitempty"` Settle float64 `protobuf:"fixed64,7,opt,name=settle" json:"settle,omitempty"` Open float64 `protobuf:"fixed64,8,opt,name=open" json:"open,omitempty"` Close float64 `protobuf:"fixed64,9,opt,name=close" json:"close,omitempty"` High float64 `protobuf:"fixed64,10,opt,name=high" json:"high,omitempty"` Low float64 `protobuf:"fixed64,11,opt,name=low" json:"low,omitempty"` Volume float64 `protobuf:"fixed64,12,opt,name=volume" json:"volume,omitempty"` TotalVolume float64 `protobuf:"fixed64,13,opt,name=totalVolume" json:"totalVolume,omitempty"` Amount float64 `protobuf:"fixed64,14,opt,name=amount" json:"amount,omitempty"` TotalAmount float64 `protobuf:"fixed64,15,opt,name=totalAmount" json:"totalAmount,omitempty"` PreSettle float64 `protobuf:"fixed64,16,opt,name=preSettle" json:"preSettle,omitempty"` PrePosition float64 `protobuf:"fixed64,17,opt,name=prePosition" json:"prePosition,omitempty"` PreClose float64 `protobuf:"fixed64,18,opt,name=preClose" json:"preClose,omitempty"` AskPrices []float64 `protobuf:"fixed64,19,rep,packed,name=askPrices" json:"askPrices,omitempty"` AskVolumes []float64 `protobuf:"fixed64,20,rep,packed,name=askVolumes" json:"askVolumes,omitempty"` BidPrices []float64 `protobuf:"fixed64,21,rep,packed,name=bidPrices" json:"bidPrices,omitempty"` BidVolumes []float64 `protobuf:"fixed64,22,rep,packed,name=bidVolumes" json:"bidVolumes,omitempty"` Side int32 `protobuf:"zigzag32,23,opt,name=side" json:"side,omitempty"` BuyVolume float64 `protobuf:"fixed64,24,opt,name=buyVolume" json:"buyVolume,omitempty"` SellVolume float64 `protobuf:"fixed64,25,opt,name=sellVolume" json:"sellVolume,omitempty"` }
func (*ProtoTick) Descriptor ¶
func (*ProtoTick) GetAskPrices ¶
func (*ProtoTick) GetAskVolumes ¶
func (*ProtoTick) GetBidPrices ¶
func (*ProtoTick) GetBidVolumes ¶
func (*ProtoTick) GetBuyVolume ¶
func (*ProtoTick) GetHighLimited ¶
func (*ProtoTick) GetLowLimited ¶
func (*ProtoTick) GetPosition ¶
func (*ProtoTick) GetPreClose ¶
func (*ProtoTick) GetPrePosition ¶
func (*ProtoTick) GetPreSettle ¶
func (*ProtoTick) GetSellVolume ¶
func (*ProtoTick) GetTimestamp ¶
func (*ProtoTick) GetTotalAmount ¶
func (*ProtoTick) GetTotalVolume ¶
func (*ProtoTick) ProtoMessage ¶
func (*ProtoTick) ProtoMessage()
type Record ¶
type Record struct { Date uint64 `bson:"_id"` // UTC毫秒数 Open float64 // 开盘价,精确到分 Close float64 High float64 Low float64 Volume float64 Amount float64 BuyVolume float64 SellVolume float64 }
After price adjusted, it maybe a negative value
func RecordFromProtoBytes ¶
func (*Record) GetBuyVolume ¶
func (*Record) GetSellVolume ¶
func (*Record) GetUTCDate ¶
func (*Record) ToJsonBytes ¶
func (*Record) ToProtoBytes ¶
type RecordEx ¶
func (*RecordEx) ToJsonBytes ¶
type Security ¶
type Security struct { Category string Code string Exchange string // contains filtered or unexported fields }
func ParseSecurity ¶
func ParseSecurityUnsafe ¶
func (*Security) GetCategory ¶
func (*Security) GetExchange ¶
func (*Security) IsDigitCurrency ¶
type TickItem ¶
type TickItem struct { Code string Timestamp uint64 HighLimited float64 LowLimited float64 Price float64 Position float64 Settle float64 Open float64 Close float64 High float64 Low float64 Volume float64 TotalVolume float64 Amount float64 TotalAmount float64 PreSettle float64 PrePosition float64 PreClose float64 AskPrices []float64 AskVolumes []float64 BidPrices []float64 BidVolumes []float64 Side int BuyVolume float64 SellVolume float64 }
func TickItemFromProtoBytes ¶
func (*TickItem) ToJsonBytes ¶
func (*TickItem) ToProtoBytes ¶
Click to show internal directories.
Click to hide internal directories.