Documentation
¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterOrderManagementServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOrderManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterOrderManagementServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOrderManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterOrderManagementServiceServer(s grpc.ServiceRegistrar, srv OrderManagementServiceServer)
- type ModifyPendingOrderRequest
- func (*ModifyPendingOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyPendingOrderRequest) GetContext() *data.StrategyContext
- func (x *ModifyPendingOrderRequest) GetOrder() *data.Order
- func (*ModifyPendingOrderRequest) ProtoMessage()
- func (x *ModifyPendingOrderRequest) ProtoReflect() protoreflect.Message
- func (x *ModifyPendingOrderRequest) Reset()
- func (x *ModifyPendingOrderRequest) String() string
- type ModifyPendingOrderResponse
- func (*ModifyPendingOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyPendingOrderResponse) GetOrder() *data.TradeRequest
- func (x *ModifyPendingOrderResponse) GetShouldModify() bool
- func (*ModifyPendingOrderResponse) ProtoMessage()
- func (x *ModifyPendingOrderResponse) ProtoReflect() protoreflect.Message
- func (x *ModifyPendingOrderResponse) Reset()
- func (x *ModifyPendingOrderResponse) String() string
- type OrderManagementServiceClient
- type OrderManagementServiceServer
- type UnimplementedOrderManagementServiceServer
- type UnsafeOrderManagementServiceServer
Constants ¶
const ( OrderManagementService_GetName_FullMethodName = "/protos.edge.orders.v1.OrderManagementService/GetName" OrderManagementService_ModifyPendingOrder_FullMethodName = "/protos.edge.orders.v1.OrderManagementService/ModifyPendingOrder" )
Variables ¶
var File_protos_edge_orders_v1_service_proto protoreflect.FileDescriptor
var OrderManagementService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protos.edge.orders.v1.OrderManagementService", HandlerType: (*OrderManagementServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetName", Handler: _OrderManagementService_GetName_Handler, }, { MethodName: "ModifyPendingOrder", Handler: _OrderManagementService_ModifyPendingOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/edge/orders/v1/service.proto", }
OrderManagementService_ServiceDesc is the grpc.ServiceDesc for OrderManagementService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOrderManagementServiceHandler ¶
func RegisterOrderManagementServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOrderManagementServiceHandler registers the http handlers for service OrderManagementService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOrderManagementServiceHandlerClient ¶
func RegisterOrderManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrderManagementServiceClient) error
RegisterOrderManagementServiceHandlerClient registers the http handlers for service OrderManagementService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OrderManagementServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OrderManagementServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OrderManagementServiceClient" to call the correct interceptors.
func RegisterOrderManagementServiceHandlerFromEndpoint ¶
func RegisterOrderManagementServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOrderManagementServiceHandlerFromEndpoint is same as RegisterOrderManagementServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOrderManagementServiceHandlerServer ¶
func RegisterOrderManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrderManagementServiceServer) error
RegisterOrderManagementServiceHandlerServer registers the http handlers for service OrderManagementService to "mux". UnaryRPC :call OrderManagementServiceServer 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 RegisterOrderManagementServiceHandlerFromEndpoint instead.
func RegisterOrderManagementServiceServer ¶
func RegisterOrderManagementServiceServer(s grpc.ServiceRegistrar, srv OrderManagementServiceServer)
Types ¶
type ModifyPendingOrderRequest ¶
type ModifyPendingOrderRequest struct { Context *data.StrategyContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` // The strategy context that contains information associated with the currently-running strategy Order *data.Order `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"` // The pending order // contains filtered or unexported fields }
ModifyPendingOrderRequest contains the information that may be used to modify an existing, pending order. No modifications made by the endpoint will be reflected in the data.
func (*ModifyPendingOrderRequest) Descriptor
deprecated
func (*ModifyPendingOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use ModifyPendingOrderRequest.ProtoReflect.Descriptor instead.
func (*ModifyPendingOrderRequest) GetContext ¶
func (x *ModifyPendingOrderRequest) GetContext() *data.StrategyContext
func (*ModifyPendingOrderRequest) GetOrder ¶
func (x *ModifyPendingOrderRequest) GetOrder() *data.Order
func (*ModifyPendingOrderRequest) ProtoMessage ¶
func (*ModifyPendingOrderRequest) ProtoMessage()
func (*ModifyPendingOrderRequest) ProtoReflect ¶
func (x *ModifyPendingOrderRequest) ProtoReflect() protoreflect.Message
func (*ModifyPendingOrderRequest) Reset ¶
func (x *ModifyPendingOrderRequest) Reset()
func (*ModifyPendingOrderRequest) String ¶
func (x *ModifyPendingOrderRequest) String() string
type ModifyPendingOrderResponse ¶
type ModifyPendingOrderResponse struct { ShouldModify bool `protobuf:"varint,1,opt,name=should_modify,json=shouldModify,proto3" json:"should_modify,omitempty"` // Whether or not the order should be modified or cancelled Order *data.TradeRequest `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"` // The trade request that represents the pending order that should be modified or cancelled. // contains filtered or unexported fields }
ModifyPendingOrderResponse describes the information that will be returned from the service. This will contain the trade request that will be submitted to the trade system on behalf of the strategy.
func (*ModifyPendingOrderResponse) Descriptor
deprecated
func (*ModifyPendingOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use ModifyPendingOrderResponse.ProtoReflect.Descriptor instead.
func (*ModifyPendingOrderResponse) GetOrder ¶
func (x *ModifyPendingOrderResponse) GetOrder() *data.TradeRequest
func (*ModifyPendingOrderResponse) GetShouldModify ¶
func (x *ModifyPendingOrderResponse) GetShouldModify() bool
func (*ModifyPendingOrderResponse) ProtoMessage ¶
func (*ModifyPendingOrderResponse) ProtoMessage()
func (*ModifyPendingOrderResponse) ProtoReflect ¶
func (x *ModifyPendingOrderResponse) ProtoReflect() protoreflect.Message
func (*ModifyPendingOrderResponse) Reset ¶
func (x *ModifyPendingOrderResponse) Reset()
func (*ModifyPendingOrderResponse) String ¶
func (x *ModifyPendingOrderResponse) String() string
type OrderManagementServiceClient ¶
type OrderManagementServiceClient interface { // GetName retrieves an identifier associated with the service, allowing the strategy runner to // uniquely identify it when multiple order services are being referenced. It will return a // name result showing the address, ID and human-readable name of the order service that processed // the original request. GetName(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*data.NameResult, error) // ModifyOrder takes an existing, pending order and may modify or cancel it based on updated market // conditions. This endpoint will be responsible for updating the price, stop-loss, take-profit, limits, // lot size, expiration or any other fields on the order before it is filled in full. This is done by // taking the order from the ModifyPendingOrderRequest object, making the necessary modifications, and // setting the associated TradeRequest on the ModifyPendingOrderResponse object. ModifyPendingOrder(ctx context.Context, in *ModifyPendingOrderRequest, opts ...grpc.CallOption) (*ModifyPendingOrderResponse, error) }
OrderManagementServiceClient is the client API for OrderManagementService 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.
func NewOrderManagementServiceClient ¶
func NewOrderManagementServiceClient(cc grpc.ClientConnInterface) OrderManagementServiceClient
type OrderManagementServiceServer ¶
type OrderManagementServiceServer interface { // GetName retrieves an identifier associated with the service, allowing the strategy runner to // uniquely identify it when multiple order services are being referenced. It will return a // name result showing the address, ID and human-readable name of the order service that processed // the original request. GetName(context.Context, *empty.Empty) (*data.NameResult, error) // ModifyOrder takes an existing, pending order and may modify or cancel it based on updated market // conditions. This endpoint will be responsible for updating the price, stop-loss, take-profit, limits, // lot size, expiration or any other fields on the order before it is filled in full. This is done by // taking the order from the ModifyPendingOrderRequest object, making the necessary modifications, and // setting the associated TradeRequest on the ModifyPendingOrderResponse object. ModifyPendingOrder(context.Context, *ModifyPendingOrderRequest) (*ModifyPendingOrderResponse, error) // contains filtered or unexported methods }
OrderManagementServiceServer is the server API for OrderManagementService service. All implementations must embed UnimplementedOrderManagementServiceServer for forward compatibility
type UnimplementedOrderManagementServiceServer ¶
type UnimplementedOrderManagementServiceServer struct { }
UnimplementedOrderManagementServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOrderManagementServiceServer) GetName ¶
func (UnimplementedOrderManagementServiceServer) GetName(context.Context, *empty.Empty) (*data.NameResult, error)
func (UnimplementedOrderManagementServiceServer) ModifyPendingOrder ¶
func (UnimplementedOrderManagementServiceServer) ModifyPendingOrder(context.Context, *ModifyPendingOrderRequest) (*ModifyPendingOrderResponse, error)
type UnsafeOrderManagementServiceServer ¶
type UnsafeOrderManagementServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOrderManagementServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrderManagementServiceServer will result in compilation errors.