pb

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MatchService_GetDepth_FullMethodName  = "/match.MatchService/GetDepth"
	MatchService_GetTick_FullMethodName   = "/match.MatchService/GetTick"
	MatchService_GetTicker_FullMethodName = "/match.MatchService/GetTicker"
)

Variables

View Source
var File_app_match_rpc_pb_match_proto protoreflect.FileDescriptor
View Source
var MatchService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "match.MatchService",
	HandlerType: (*MatchServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDepth",
			Handler:    _MatchService_GetDepth_Handler,
		},
		{
			MethodName: "GetTick",
			Handler:    _MatchService_GetTick_Handler,
		},
		{
			MethodName: "GetTicker",
			Handler:    _MatchService_GetTicker_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "app/match/rpc/pb/match.proto",
}

MatchService_ServiceDesc is the grpc.ServiceDesc for MatchService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMatchServiceServer

func RegisterMatchServiceServer(s grpc.ServiceRegistrar, srv MatchServiceServer)

Types

type GetDepthReq

type GetDepthReq struct {

	// 交易对
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// 档位
	Level int32 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDepthReq) Descriptor deprecated

func (*GetDepthReq) Descriptor() ([]byte, []int)

Deprecated: Use GetDepthReq.ProtoReflect.Descriptor instead.

func (*GetDepthReq) GetLevel

func (x *GetDepthReq) GetLevel() int32

func (*GetDepthReq) GetSymbol

func (x *GetDepthReq) GetSymbol() string

func (*GetDepthReq) ProtoMessage

func (*GetDepthReq) ProtoMessage()

func (*GetDepthReq) ProtoReflect

func (x *GetDepthReq) ProtoReflect() protoreflect.Message

func (*GetDepthReq) Reset

func (x *GetDepthReq) Reset()

func (*GetDepthReq) String

func (x *GetDepthReq) String() string

type GetDepthResp

type GetDepthResp struct {

	// 订单簿版本
	Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// 卖盘
	Asks []*GetDepthResp_Position `protobuf:"bytes,2,rep,name=asks,proto3" json:"asks,omitempty"`
	// 买盘
	Bids []*GetDepthResp_Position `protobuf:"bytes,3,rep,name=bids,proto3" json:"bids,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDepthResp) Descriptor deprecated

func (*GetDepthResp) Descriptor() ([]byte, []int)

Deprecated: Use GetDepthResp.ProtoReflect.Descriptor instead.

func (*GetDepthResp) GetAsks

func (x *GetDepthResp) GetAsks() []*GetDepthResp_Position

func (*GetDepthResp) GetBids

func (x *GetDepthResp) GetBids() []*GetDepthResp_Position

func (*GetDepthResp) GetVersion

func (x *GetDepthResp) GetVersion() int64

func (*GetDepthResp) ProtoMessage

func (*GetDepthResp) ProtoMessage()

func (*GetDepthResp) ProtoReflect

func (x *GetDepthResp) ProtoReflect() protoreflect.Message

func (*GetDepthResp) Reset

func (x *GetDepthResp) Reset()

func (*GetDepthResp) String

func (x *GetDepthResp) String() string

type GetDepthResp_Position

type GetDepthResp_Position struct {

	// 数量
	Qty string `protobuf:"bytes,1,opt,name=qty,proto3" json:"qty,omitempty"`
	// 价格
	Price string `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"`
	// 金额
	Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDepthResp_Position) Descriptor deprecated

func (*GetDepthResp_Position) Descriptor() ([]byte, []int)

Deprecated: Use GetDepthResp_Position.ProtoReflect.Descriptor instead.

func (*GetDepthResp_Position) GetAmount

func (x *GetDepthResp_Position) GetAmount() string

func (*GetDepthResp_Position) GetPrice

func (x *GetDepthResp_Position) GetPrice() string

func (*GetDepthResp_Position) GetQty

func (x *GetDepthResp_Position) GetQty() string

func (*GetDepthResp_Position) ProtoMessage

func (*GetDepthResp_Position) ProtoMessage()

func (*GetDepthResp_Position) ProtoReflect

func (x *GetDepthResp_Position) ProtoReflect() protoreflect.Message

func (*GetDepthResp_Position) Reset

func (x *GetDepthResp_Position) Reset()

func (*GetDepthResp_Position) String

func (x *GetDepthResp_Position) String() string

type GetTickReq

type GetTickReq struct {

	// 交易对
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// 多少条
	Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTickReq) Descriptor deprecated

func (*GetTickReq) Descriptor() ([]byte, []int)

Deprecated: Use GetTickReq.ProtoReflect.Descriptor instead.

func (*GetTickReq) GetLimit

func (x *GetTickReq) GetLimit() int32

func (*GetTickReq) GetSymbol

func (x *GetTickReq) GetSymbol() string

func (*GetTickReq) ProtoMessage

func (*GetTickReq) ProtoMessage()

func (*GetTickReq) ProtoReflect

func (x *GetTickReq) ProtoReflect() protoreflect.Message

func (*GetTickReq) Reset

func (x *GetTickReq) Reset()

func (*GetTickReq) String

func (x *GetTickReq) String() string

type GetTickResp

type GetTickResp struct {
	TickList []*GetTickResp_Tick `protobuf:"bytes,1,rep,name=tick_list,json=tickList,proto3" json:"tick_list,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTickResp) Descriptor deprecated

func (*GetTickResp) Descriptor() ([]byte, []int)

Deprecated: Use GetTickResp.ProtoReflect.Descriptor instead.

func (*GetTickResp) GetTickList

func (x *GetTickResp) GetTickList() []*GetTickResp_Tick

func (*GetTickResp) ProtoMessage

func (*GetTickResp) ProtoMessage()

func (*GetTickResp) ProtoReflect

func (x *GetTickResp) ProtoReflect() protoreflect.Message

func (*GetTickResp) Reset

func (x *GetTickResp) Reset()

func (*GetTickResp) String

func (x *GetTickResp) String() string

type GetTickResp_Tick

type GetTickResp_Tick struct {

	// 价格
	Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"`
	// 数量
	Qty string `protobuf:"bytes,2,opt,name=qty,proto3" json:"qty,omitempty"`
	// 金额
	Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// 时间
	Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// 交易对
	Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// taker是否是买单
	TakerIsBuyer bool `protobuf:"varint,6,opt,name=taker_is_buyer,json=takerIsBuyer,proto3" json:"taker_is_buyer,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTickResp_Tick) Descriptor deprecated

func (*GetTickResp_Tick) Descriptor() ([]byte, []int)

Deprecated: Use GetTickResp_Tick.ProtoReflect.Descriptor instead.

func (*GetTickResp_Tick) GetAmount

func (x *GetTickResp_Tick) GetAmount() string

func (*GetTickResp_Tick) GetPrice

func (x *GetTickResp_Tick) GetPrice() string

func (*GetTickResp_Tick) GetQty

func (x *GetTickResp_Tick) GetQty() string

func (*GetTickResp_Tick) GetSymbol

func (x *GetTickResp_Tick) GetSymbol() string

func (*GetTickResp_Tick) GetTakerIsBuyer

func (x *GetTickResp_Tick) GetTakerIsBuyer() bool

func (*GetTickResp_Tick) GetTimestamp

func (x *GetTickResp_Tick) GetTimestamp() int64

func (*GetTickResp_Tick) ProtoMessage

func (*GetTickResp_Tick) ProtoMessage()

func (*GetTickResp_Tick) ProtoReflect

func (x *GetTickResp_Tick) ProtoReflect() protoreflect.Message

func (*GetTickResp_Tick) Reset

func (x *GetTickResp_Tick) Reset()

func (*GetTickResp_Tick) String

func (x *GetTickResp_Tick) String() string

type GetTickerReq

type GetTickerReq struct {

	// 交易对
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTickerReq) Descriptor deprecated

func (*GetTickerReq) Descriptor() ([]byte, []int)

Deprecated: Use GetTickerReq.ProtoReflect.Descriptor instead.

func (*GetTickerReq) GetSymbol

func (x *GetTickerReq) GetSymbol() string

func (*GetTickerReq) ProtoMessage

func (*GetTickerReq) ProtoMessage()

func (*GetTickerReq) ProtoReflect

func (x *GetTickerReq) ProtoReflect() protoreflect.Message

func (*GetTickerReq) Reset

func (x *GetTickerReq) Reset()

func (*GetTickerReq) String

func (x *GetTickerReq) String() string

type GetTickerResp

type GetTickerResp struct {
	TickerList []*GetTickerResp_Ticker `protobuf:"bytes,1,rep,name=ticker_list,json=tickerList,proto3" json:"ticker_list,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTickerResp) Descriptor deprecated

func (*GetTickerResp) Descriptor() ([]byte, []int)

Deprecated: Use GetTickerResp.ProtoReflect.Descriptor instead.

func (*GetTickerResp) GetTickerList

func (x *GetTickerResp) GetTickerList() []*GetTickerResp_Ticker

func (*GetTickerResp) ProtoMessage

func (*GetTickerResp) ProtoMessage()

func (*GetTickerResp) ProtoReflect

func (x *GetTickerResp) ProtoReflect() protoreflect.Message

func (*GetTickerResp) Reset

func (x *GetTickerResp) Reset()

func (*GetTickerResp) String

func (x *GetTickerResp) String() string

type GetTickerResp_Ticker

type GetTickerResp_Ticker struct {

	// 最新价
	LatestPrice string `protobuf:"bytes,1,opt,name=latest_price,json=latestPrice,proto3" json:"latest_price,omitempty"`
	// 高
	High string `protobuf:"bytes,2,opt,name=high,proto3" json:"high,omitempty"`
	// 低
	Low string `protobuf:"bytes,3,opt,name=low,proto3" json:"low,omitempty"`
	// 成交额 计价币数量
	Volume string `protobuf:"bytes,5,opt,name=volume,proto3" json:"volume,omitempty"`
	// 成交量 基础币数量
	Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"`
	// 涨跌幅
	PriceRange string `protobuf:"bytes,7,opt,name=price_range,json=priceRange,proto3" json:"price_range,omitempty"`
	// 24小时前的价格
	Last24Price string `protobuf:"bytes,8,opt,name=last24_price,json=last24Price,proto3" json:"last24_price,omitempty"`
	// 交易对
	Symbol string `protobuf:"bytes,9,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTickerResp_Ticker) Descriptor deprecated

func (*GetTickerResp_Ticker) Descriptor() ([]byte, []int)

Deprecated: Use GetTickerResp_Ticker.ProtoReflect.Descriptor instead.

func (*GetTickerResp_Ticker) GetAmount

func (x *GetTickerResp_Ticker) GetAmount() string

func (*GetTickerResp_Ticker) GetHigh

func (x *GetTickerResp_Ticker) GetHigh() string

func (*GetTickerResp_Ticker) GetLast24Price

func (x *GetTickerResp_Ticker) GetLast24Price() string

func (*GetTickerResp_Ticker) GetLatestPrice

func (x *GetTickerResp_Ticker) GetLatestPrice() string

func (*GetTickerResp_Ticker) GetLow

func (x *GetTickerResp_Ticker) GetLow() string

func (*GetTickerResp_Ticker) GetPriceRange

func (x *GetTickerResp_Ticker) GetPriceRange() string

func (*GetTickerResp_Ticker) GetSymbol

func (x *GetTickerResp_Ticker) GetSymbol() string

func (*GetTickerResp_Ticker) GetVolume

func (x *GetTickerResp_Ticker) GetVolume() string

func (*GetTickerResp_Ticker) ProtoMessage

func (*GetTickerResp_Ticker) ProtoMessage()

func (*GetTickerResp_Ticker) ProtoReflect

func (x *GetTickerResp_Ticker) ProtoReflect() protoreflect.Message

func (*GetTickerResp_Ticker) Reset

func (x *GetTickerResp_Ticker) Reset()

func (*GetTickerResp_Ticker) String

func (x *GetTickerResp_Ticker) String() string

type MatchServiceClient

type MatchServiceClient interface {
	// 获取深度
	GetDepth(ctx context.Context, in *GetDepthReq, opts ...grpc.CallOption) (*GetDepthResp, error)
	// 获取tick实时成交
	GetTick(ctx context.Context, in *GetTickReq, opts ...grpc.CallOption) (*GetTickResp, error)
	// 获取ticker
	GetTicker(ctx context.Context, in *GetTickerReq, opts ...grpc.CallOption) (*GetTickerResp, error)
}

MatchServiceClient is the client API for MatchService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type MatchServiceServer

type MatchServiceServer interface {
	// 获取深度
	GetDepth(context.Context, *GetDepthReq) (*GetDepthResp, error)
	// 获取tick实时成交
	GetTick(context.Context, *GetTickReq) (*GetTickResp, error)
	// 获取ticker
	GetTicker(context.Context, *GetTickerReq) (*GetTickerResp, error)
	// contains filtered or unexported methods
}

MatchServiceServer is the server API for MatchService service. All implementations must embed UnimplementedMatchServiceServer for forward compatibility

type UnimplementedMatchServiceServer

type UnimplementedMatchServiceServer struct {
}

UnimplementedMatchServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMatchServiceServer) GetDepth

func (UnimplementedMatchServiceServer) GetTick

func (UnimplementedMatchServiceServer) GetTicker

type UnsafeMatchServiceServer

type UnsafeMatchServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeMatchServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MatchServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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