Commit c0c14ca1 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update order proto

parent c0867d6d
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc (unknown)
// source: orderbook/v1/orderbook.proto
package orderbookv1
import (
_ "github.com/exchain/go-exchain/exchain/protocol/gen/go/google/api"
v1 "github.com/exchain/go-exchain/exchain/protocol/gen/go/nebula/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PlaceLimitOrderRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Transaction *v1.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
}
func (x *PlaceLimitOrderRequest) Reset() {
*x = PlaceLimitOrderRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PlaceLimitOrderRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PlaceLimitOrderRequest) ProtoMessage() {}
func (x *PlaceLimitOrderRequest) ProtoReflect() protoreflect.Message {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PlaceLimitOrderRequest.ProtoReflect.Descriptor instead.
func (*PlaceLimitOrderRequest) Descriptor() ([]byte, []int) {
return file_orderbook_v1_orderbook_proto_rawDescGZIP(), []int{0}
}
func (x *PlaceLimitOrderRequest) GetTransaction() *v1.Transaction {
if x != nil {
return x.Transaction
}
return nil
}
type PlaceMarketOrderRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Transaction *v1.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
}
func (x *PlaceMarketOrderRequest) Reset() {
*x = PlaceMarketOrderRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PlaceMarketOrderRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PlaceMarketOrderRequest) ProtoMessage() {}
func (x *PlaceMarketOrderRequest) ProtoReflect() protoreflect.Message {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PlaceMarketOrderRequest.ProtoReflect.Descriptor instead.
func (*PlaceMarketOrderRequest) Descriptor() ([]byte, []int) {
return file_orderbook_v1_orderbook_proto_rawDescGZIP(), []int{1}
}
func (x *PlaceMarketOrderRequest) GetTransaction() *v1.Transaction {
if x != nil {
return x.Transaction
}
return nil
}
type CancelOrderRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Transaction *v1.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
}
func (x *CancelOrderRequest) Reset() {
*x = CancelOrderRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CancelOrderRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CancelOrderRequest) ProtoMessage() {}
func (x *CancelOrderRequest) ProtoReflect() protoreflect.Message {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CancelOrderRequest.ProtoReflect.Descriptor instead.
func (*CancelOrderRequest) Descriptor() ([]byte, []int) {
return file_orderbook_v1_orderbook_proto_rawDescGZIP(), []int{2}
}
func (x *CancelOrderRequest) GetTransaction() *v1.Transaction {
if x != nil {
return x.Transaction
}
return nil
}
type SignProxyRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Transaction *v1.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
}
func (x *SignProxyRequest) Reset() {
*x = SignProxyRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SignProxyRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SignProxyRequest) ProtoMessage() {}
func (x *SignProxyRequest) ProtoReflect() protoreflect.Message {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SignProxyRequest.ProtoReflect.Descriptor instead.
func (*SignProxyRequest) Descriptor() ([]byte, []int) {
return file_orderbook_v1_orderbook_proto_rawDescGZIP(), []int{3}
}
func (x *SignProxyRequest) GetTransaction() *v1.Transaction {
if x != nil {
return x.Transaction
}
return nil
}
type Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_orderbook_v1_orderbook_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
return file_orderbook_v1_orderbook_proto_rawDescGZIP(), []int{4}
}
func (x *Response) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
var File_orderbook_v1_orderbook_proto protoreflect.FileDescriptor
var file_orderbook_v1_orderbook_proto_rawDesc = []byte{
0x0a, 0x1c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14,
0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f,
0x6b, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x76, 0x31, 0x2f,
0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x5a, 0x0a, 0x16, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x72, 0x61,
0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e,
0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e,
0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b,
0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x17, 0x50,
0x6c, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x78,
0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e,
0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61,
0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x63,
0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40,
0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65,
0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x22, 0x54, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x78, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72,
0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73,
0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xc6, 0x04, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72,
0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x93, 0x01, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x69,
0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61,
0x69, 0x6e, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x76, 0x31, 0x2e,
0x50, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e,
0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01,
0x2a, 0x22, 0x27, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x6c,
0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x96, 0x01, 0x0a, 0x10, 0x50,
0x6c, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12,
0x2d, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62,
0x6f, 0x6f, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x72, 0x6b,
0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e,
0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f,
0x6f, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x65, 0x78, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b,
0x2f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x72,
0x64, 0x65, 0x72, 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72,
0x64, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6f, 0x72,
0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65,
0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e,
0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f,
0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61,
0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2f,
0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x80, 0x01, 0x0a,
0x09, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x26, 0x2e, 0x65, 0x78, 0x63,
0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x76,
0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6f, 0x72, 0x64,
0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f,
0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72,
0x62, 0x6f, 0x6f, 0x6b, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x42,
0xec, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x4f, 0x72,
0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4e,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61,
0x69, 0x6e, 0x2f, 0x67, 0x6f, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x78,
0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67,
0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2f,
0x76, 0x31, 0x3b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x76, 0x31, 0xa2, 0x02,
0x03, 0x45, 0x4f, 0x58, 0xaa, 0x02, 0x14, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4f,
0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x45, 0x78,
0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x5c,
0x56, 0x31, 0xe2, 0x02, 0x20, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a,
0x3a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_orderbook_v1_orderbook_proto_rawDescOnce sync.Once
file_orderbook_v1_orderbook_proto_rawDescData = file_orderbook_v1_orderbook_proto_rawDesc
)
func file_orderbook_v1_orderbook_proto_rawDescGZIP() []byte {
file_orderbook_v1_orderbook_proto_rawDescOnce.Do(func() {
file_orderbook_v1_orderbook_proto_rawDescData = protoimpl.X.CompressGZIP(file_orderbook_v1_orderbook_proto_rawDescData)
})
return file_orderbook_v1_orderbook_proto_rawDescData
}
var file_orderbook_v1_orderbook_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_orderbook_v1_orderbook_proto_goTypes = []interface{}{
(*PlaceLimitOrderRequest)(nil), // 0: exchain.orderbook.v1.PlaceLimitOrderRequest
(*PlaceMarketOrderRequest)(nil), // 1: exchain.orderbook.v1.PlaceMarketOrderRequest
(*CancelOrderRequest)(nil), // 2: exchain.orderbook.v1.CancelOrderRequest
(*SignProxyRequest)(nil), // 3: exchain.orderbook.v1.SignProxyRequest
(*Response)(nil), // 4: exchain.orderbook.v1.Response
(*v1.Transaction)(nil), // 5: exchain.nebula.v1.Transaction
}
var file_orderbook_v1_orderbook_proto_depIdxs = []int32{
5, // 0: exchain.orderbook.v1.PlaceLimitOrderRequest.transaction:type_name -> exchain.nebula.v1.Transaction
5, // 1: exchain.orderbook.v1.PlaceMarketOrderRequest.transaction:type_name -> exchain.nebula.v1.Transaction
5, // 2: exchain.orderbook.v1.CancelOrderRequest.transaction:type_name -> exchain.nebula.v1.Transaction
5, // 3: exchain.orderbook.v1.SignProxyRequest.transaction:type_name -> exchain.nebula.v1.Transaction
0, // 4: exchain.orderbook.v1.Orderbook.PlaceLimitOrder:input_type -> exchain.orderbook.v1.PlaceLimitOrderRequest
1, // 5: exchain.orderbook.v1.Orderbook.PlaceMarketOrder:input_type -> exchain.orderbook.v1.PlaceMarketOrderRequest
2, // 6: exchain.orderbook.v1.Orderbook.CancelOrder:input_type -> exchain.orderbook.v1.CancelOrderRequest
3, // 7: exchain.orderbook.v1.Orderbook.SignProxy:input_type -> exchain.orderbook.v1.SignProxyRequest
4, // 8: exchain.orderbook.v1.Orderbook.PlaceLimitOrder:output_type -> exchain.orderbook.v1.Response
4, // 9: exchain.orderbook.v1.Orderbook.PlaceMarketOrder:output_type -> exchain.orderbook.v1.Response
4, // 10: exchain.orderbook.v1.Orderbook.CancelOrder:output_type -> exchain.orderbook.v1.Response
4, // 11: exchain.orderbook.v1.Orderbook.SignProxy:output_type -> exchain.orderbook.v1.Response
8, // [8:12] is the sub-list for method output_type
4, // [4:8] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_orderbook_v1_orderbook_proto_init() }
func file_orderbook_v1_orderbook_proto_init() {
if File_orderbook_v1_orderbook_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_orderbook_v1_orderbook_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PlaceLimitOrderRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_orderbook_v1_orderbook_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PlaceMarketOrderRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_orderbook_v1_orderbook_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CancelOrderRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_orderbook_v1_orderbook_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SignProxyRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_orderbook_v1_orderbook_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_orderbook_v1_orderbook_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_orderbook_v1_orderbook_proto_goTypes,
DependencyIndexes: file_orderbook_v1_orderbook_proto_depIdxs,
MessageInfos: file_orderbook_v1_orderbook_proto_msgTypes,
}.Build()
File_orderbook_v1_orderbook_proto = out.File
file_orderbook_v1_orderbook_proto_rawDesc = nil
file_orderbook_v1_orderbook_proto_goTypes = nil
file_orderbook_v1_orderbook_proto_depIdxs = nil
}
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: orderbook/v1/orderbook.proto
/*
Package orderbookv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package orderbookv1
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
func request_Orderbook_PlaceLimitOrder_0(ctx context.Context, marshaler runtime.Marshaler, client OrderbookClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PlaceLimitOrderRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.PlaceLimitOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Orderbook_PlaceLimitOrder_0(ctx context.Context, marshaler runtime.Marshaler, server OrderbookServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PlaceLimitOrderRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.PlaceLimitOrder(ctx, &protoReq)
return msg, metadata, err
}
func request_Orderbook_PlaceMarketOrder_0(ctx context.Context, marshaler runtime.Marshaler, client OrderbookClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PlaceMarketOrderRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.PlaceMarketOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Orderbook_PlaceMarketOrder_0(ctx context.Context, marshaler runtime.Marshaler, server OrderbookServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PlaceMarketOrderRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.PlaceMarketOrder(ctx, &protoReq)
return msg, metadata, err
}
func request_Orderbook_CancelOrder_0(ctx context.Context, marshaler runtime.Marshaler, client OrderbookClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CancelOrderRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.CancelOrder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Orderbook_CancelOrder_0(ctx context.Context, marshaler runtime.Marshaler, server OrderbookServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CancelOrderRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.CancelOrder(ctx, &protoReq)
return msg, metadata, err
}
func request_Orderbook_SignProxy_0(ctx context.Context, marshaler runtime.Marshaler, client OrderbookClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignProxyRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.SignProxy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Orderbook_SignProxy_0(ctx context.Context, marshaler runtime.Marshaler, server OrderbookServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SignProxyRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.SignProxy(ctx, &protoReq)
return msg, metadata, err
}
// RegisterOrderbookHandlerServer registers the http handlers for service Orderbook to "mux".
// UnaryRPC :call OrderbookServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterOrderbookHandlerFromEndpoint instead.
func RegisterOrderbookHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrderbookServer) error {
mux.Handle("POST", pattern_Orderbook_PlaceLimitOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Orderbook_PlaceLimitOrder_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Orderbook_PlaceLimitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Orderbook_PlaceMarketOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Orderbook_PlaceMarketOrder_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Orderbook_PlaceMarketOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Orderbook_CancelOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Orderbook_CancelOrder_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Orderbook_CancelOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Orderbook_SignProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Orderbook_SignProxy_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Orderbook_SignProxy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterOrderbookHandlerFromEndpoint is same as RegisterOrderbookHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOrderbookHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterOrderbookHandler(ctx, mux, conn)
}
// RegisterOrderbookHandler registers the http handlers for service Orderbook to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterOrderbookHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterOrderbookHandlerClient(ctx, mux, NewOrderbookClient(conn))
}
// RegisterOrderbookHandlerClient registers the http handlers for service Orderbook
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OrderbookClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OrderbookClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "OrderbookClient" to call the correct interceptors.
func RegisterOrderbookHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrderbookClient) error {
mux.Handle("POST", pattern_Orderbook_PlaceLimitOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Orderbook_PlaceLimitOrder_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Orderbook_PlaceLimitOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Orderbook_PlaceMarketOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Orderbook_PlaceMarketOrder_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Orderbook_PlaceMarketOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Orderbook_CancelOrder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Orderbook_CancelOrder_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Orderbook_CancelOrder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Orderbook_SignProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Orderbook_SignProxy_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Orderbook_SignProxy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_Orderbook_PlaceLimitOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"exchain", "v1", "orderbook", "place_limit_order"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Orderbook_PlaceMarketOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"exchain", "v1", "orderbook", "place_market_order"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Orderbook_CancelOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"exchain", "v1", "orderbook", "cancel_order"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Orderbook_SignProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"exchain", "v1", "orderbook", "sign_proxy"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
forward_Orderbook_PlaceLimitOrder_0 = runtime.ForwardResponseMessage
forward_Orderbook_PlaceMarketOrder_0 = runtime.ForwardResponseMessage
forward_Orderbook_CancelOrder_0 = runtime.ForwardResponseMessage
forward_Orderbook_SignProxy_0 = runtime.ForwardResponseMessage
)
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc (unknown)
// source: orderbook/v1/orderbook.proto
package orderbookv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// OrderbookClient is the client API for Orderbook 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 OrderbookClient interface {
PlaceLimitOrder(ctx context.Context, in *PlaceLimitOrderRequest, opts ...grpc.CallOption) (*Response, error)
PlaceMarketOrder(ctx context.Context, in *PlaceMarketOrderRequest, opts ...grpc.CallOption) (*Response, error)
CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*Response, error)
SignProxy(ctx context.Context, in *SignProxyRequest, opts ...grpc.CallOption) (*Response, error)
}
type orderbookClient struct {
cc grpc.ClientConnInterface
}
func NewOrderbookClient(cc grpc.ClientConnInterface) OrderbookClient {
return &orderbookClient{cc}
}
func (c *orderbookClient) PlaceLimitOrder(ctx context.Context, in *PlaceLimitOrderRequest, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, "/exchain.orderbook.v1.Orderbook/PlaceLimitOrder", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *orderbookClient) PlaceMarketOrder(ctx context.Context, in *PlaceMarketOrderRequest, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, "/exchain.orderbook.v1.Orderbook/PlaceMarketOrder", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *orderbookClient) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, "/exchain.orderbook.v1.Orderbook/CancelOrder", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *orderbookClient) SignProxy(ctx context.Context, in *SignProxyRequest, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, "/exchain.orderbook.v1.Orderbook/SignProxy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OrderbookServer is the server API for Orderbook service.
// All implementations must embed UnimplementedOrderbookServer
// for forward compatibility
type OrderbookServer interface {
PlaceLimitOrder(context.Context, *PlaceLimitOrderRequest) (*Response, error)
PlaceMarketOrder(context.Context, *PlaceMarketOrderRequest) (*Response, error)
CancelOrder(context.Context, *CancelOrderRequest) (*Response, error)
SignProxy(context.Context, *SignProxyRequest) (*Response, error)
mustEmbedUnimplementedOrderbookServer()
}
// UnimplementedOrderbookServer must be embedded to have forward compatible implementations.
type UnimplementedOrderbookServer struct {
}
func (UnimplementedOrderbookServer) PlaceLimitOrder(context.Context, *PlaceLimitOrderRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method PlaceLimitOrder not implemented")
}
func (UnimplementedOrderbookServer) PlaceMarketOrder(context.Context, *PlaceMarketOrderRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method PlaceMarketOrder not implemented")
}
func (UnimplementedOrderbookServer) CancelOrder(context.Context, *CancelOrderRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method CancelOrder not implemented")
}
func (UnimplementedOrderbookServer) SignProxy(context.Context, *SignProxyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignProxy not implemented")
}
func (UnimplementedOrderbookServer) mustEmbedUnimplementedOrderbookServer() {}
// UnsafeOrderbookServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to OrderbookServer will
// result in compilation errors.
type UnsafeOrderbookServer interface {
mustEmbedUnimplementedOrderbookServer()
}
func RegisterOrderbookServer(s grpc.ServiceRegistrar, srv OrderbookServer) {
s.RegisterService(&Orderbook_ServiceDesc, srv)
}
func _Orderbook_PlaceLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PlaceLimitOrderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrderbookServer).PlaceLimitOrder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/exchain.orderbook.v1.Orderbook/PlaceLimitOrder",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrderbookServer).PlaceLimitOrder(ctx, req.(*PlaceLimitOrderRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Orderbook_PlaceMarketOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PlaceMarketOrderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrderbookServer).PlaceMarketOrder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/exchain.orderbook.v1.Orderbook/PlaceMarketOrder",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrderbookServer).PlaceMarketOrder(ctx, req.(*PlaceMarketOrderRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Orderbook_CancelOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CancelOrderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrderbookServer).CancelOrder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/exchain.orderbook.v1.Orderbook/CancelOrder",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrderbookServer).CancelOrder(ctx, req.(*CancelOrderRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Orderbook_SignProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SignProxyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrderbookServer).SignProxy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/exchain.orderbook.v1.Orderbook/SignProxy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrderbookServer).SignProxy(ctx, req.(*SignProxyRequest))
}
return interceptor(ctx, in, info, handler)
}
// Orderbook_ServiceDesc is the grpc.ServiceDesc for Orderbook service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Orderbook_ServiceDesc = grpc.ServiceDesc{
ServiceName: "exchain.orderbook.v1.Orderbook",
HandlerType: (*OrderbookServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PlaceLimitOrder",
Handler: _Orderbook_PlaceLimitOrder_Handler,
},
{
MethodName: "PlaceMarketOrder",
Handler: _Orderbook_PlaceMarketOrder_Handler,
},
{
MethodName: "CancelOrder",
Handler: _Orderbook_CancelOrder_Handler,
},
{
MethodName: "SignProxy",
Handler: _Orderbook_SignProxy_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "orderbook/v1/orderbook.proto",
}
......@@ -88,16 +88,19 @@ message LimitOrderTransaction {
OrderSide side = 2;
bytes price = 3;
bytes quantity = 4;
string order_id = 5;
}
message MarketOrderTransaction {
string pair = 1;
OrderSide side = 2;
bytes quantity = 3;
string order_id = 4;
}
message CancelOrderTransaction {
string order_id = 1;
string pair = 2;
}
message ProtocolTransaction {
......
syntax = "proto3";
package exchain.orderbook.v1;
option go_package = "github.com/exchain/go-exchain/exchain/protocol/orderbook/v1;orderbookv1";
import "nebula/v1/transaction.proto";
import "google/api/annotations.proto";
message PlaceLimitOrderRequest {
exchain.nebula.v1.Transaction transaction = 1;
}
message PlaceMarketOrderRequest {
exchain.nebula.v1.Transaction transaction = 1;
}
message CancelOrderRequest {
exchain.nebula.v1.Transaction transaction = 1;
}
message SignProxyRequest {
exchain.nebula.v1.Transaction transaction = 1;
}
message Response {
bytes data = 1;
}
service Orderbook {
rpc PlaceLimitOrder (PlaceLimitOrderRequest) returns (Response) {
option (google.api.http) = {
post: "/exchain/v1/orderbook/place_limit_order"
body: "*"
};
}
rpc PlaceMarketOrder (PlaceMarketOrderRequest) returns (Response) {
option (google.api.http) = {
post: "/exchain/v1/orderbook/place_market_order"
body: "*"
};
}
rpc CancelOrder (CancelOrderRequest) returns (Response) {
option (google.api.http) = {
post: "/exchain/v1/orderbook/cancel_order"
body: "*"
};
}
rpc SignProxy (SignProxyRequest) returns (Response) {
option (google.api.http) = {
post: "/exchain/v1/orderbook/sign_proxy"
body: "*"
};
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment