You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
232 lines
8.8 KiB
232 lines
8.8 KiB
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.4.0
|
|
// - protoc v5.27.1
|
|
// source: matchmaking/v1/virtually/spots.proto
|
|
|
|
package v1
|
|
|
|
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.62.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion8
|
|
|
|
const (
|
|
Spots_GetBotDigitalTrade_FullMethodName = "/matchmaking.v1.Spots/GetBotDigitalTrade"
|
|
Spots_SpotsPlaceOrder_FullMethodName = "/matchmaking.v1.Spots/SpotsPlaceOrder"
|
|
Spots_SpotsCancel_FullMethodName = "/matchmaking.v1.Spots/SpotsCancel"
|
|
Spots_SpotsOneClickRedemption_FullMethodName = "/matchmaking.v1.Spots/SpotsOneClickRedemption"
|
|
)
|
|
|
|
// SpotsClient is the client API for Spots 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 SpotsClient interface {
|
|
// GetBotDigitalTrade 现货列表查询
|
|
GetBotDigitalTrade(ctx context.Context, in *GetBotDigitalTradeRequest, opts ...grpc.CallOption) (*GetBotDigitalTradeReply, error)
|
|
// SpotsPlaceOrder 现货下单
|
|
SpotsPlaceOrder(ctx context.Context, in *SpotsOrderRequest, opts ...grpc.CallOption) (*SpotsOrderReply, error)
|
|
// SpotsCancel 现货撤单
|
|
SpotsCancel(ctx context.Context, in *CancelSpotsOrderRequest, opts ...grpc.CallOption) (*SpotsOrderReply, error)
|
|
// SpotsOneClickRedemption 现货一键兑换
|
|
SpotsOneClickRedemption(ctx context.Context, in *SpotsOrderRequest, opts ...grpc.CallOption) (*SpotsOrderReply, error)
|
|
}
|
|
|
|
type spotsClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewSpotsClient(cc grpc.ClientConnInterface) SpotsClient {
|
|
return &spotsClient{cc}
|
|
}
|
|
|
|
func (c *spotsClient) GetBotDigitalTrade(ctx context.Context, in *GetBotDigitalTradeRequest, opts ...grpc.CallOption) (*GetBotDigitalTradeReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetBotDigitalTradeReply)
|
|
err := c.cc.Invoke(ctx, Spots_GetBotDigitalTrade_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *spotsClient) SpotsPlaceOrder(ctx context.Context, in *SpotsOrderRequest, opts ...grpc.CallOption) (*SpotsOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SpotsOrderReply)
|
|
err := c.cc.Invoke(ctx, Spots_SpotsPlaceOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *spotsClient) SpotsCancel(ctx context.Context, in *CancelSpotsOrderRequest, opts ...grpc.CallOption) (*SpotsOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SpotsOrderReply)
|
|
err := c.cc.Invoke(ctx, Spots_SpotsCancel_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *spotsClient) SpotsOneClickRedemption(ctx context.Context, in *SpotsOrderRequest, opts ...grpc.CallOption) (*SpotsOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SpotsOrderReply)
|
|
err := c.cc.Invoke(ctx, Spots_SpotsOneClickRedemption_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// SpotsServer is the server API for Spots service.
|
|
// All implementations must embed UnimplementedSpotsServer
|
|
// for forward compatibility
|
|
type SpotsServer interface {
|
|
// GetBotDigitalTrade 现货列表查询
|
|
GetBotDigitalTrade(context.Context, *GetBotDigitalTradeRequest) (*GetBotDigitalTradeReply, error)
|
|
// SpotsPlaceOrder 现货下单
|
|
SpotsPlaceOrder(context.Context, *SpotsOrderRequest) (*SpotsOrderReply, error)
|
|
// SpotsCancel 现货撤单
|
|
SpotsCancel(context.Context, *CancelSpotsOrderRequest) (*SpotsOrderReply, error)
|
|
// SpotsOneClickRedemption 现货一键兑换
|
|
SpotsOneClickRedemption(context.Context, *SpotsOrderRequest) (*SpotsOrderReply, error)
|
|
mustEmbedUnimplementedSpotsServer()
|
|
}
|
|
|
|
// UnimplementedSpotsServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedSpotsServer struct {
|
|
}
|
|
|
|
func (UnimplementedSpotsServer) GetBotDigitalTrade(context.Context, *GetBotDigitalTradeRequest) (*GetBotDigitalTradeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBotDigitalTrade not implemented")
|
|
}
|
|
func (UnimplementedSpotsServer) SpotsPlaceOrder(context.Context, *SpotsOrderRequest) (*SpotsOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SpotsPlaceOrder not implemented")
|
|
}
|
|
func (UnimplementedSpotsServer) SpotsCancel(context.Context, *CancelSpotsOrderRequest) (*SpotsOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SpotsCancel not implemented")
|
|
}
|
|
func (UnimplementedSpotsServer) SpotsOneClickRedemption(context.Context, *SpotsOrderRequest) (*SpotsOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SpotsOneClickRedemption not implemented")
|
|
}
|
|
func (UnimplementedSpotsServer) mustEmbedUnimplementedSpotsServer() {}
|
|
|
|
// UnsafeSpotsServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to SpotsServer will
|
|
// result in compilation errors.
|
|
type UnsafeSpotsServer interface {
|
|
mustEmbedUnimplementedSpotsServer()
|
|
}
|
|
|
|
func RegisterSpotsServer(s grpc.ServiceRegistrar, srv SpotsServer) {
|
|
s.RegisterService(&Spots_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Spots_GetBotDigitalTrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetBotDigitalTradeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SpotsServer).GetBotDigitalTrade(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Spots_GetBotDigitalTrade_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SpotsServer).GetBotDigitalTrade(ctx, req.(*GetBotDigitalTradeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Spots_SpotsPlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SpotsOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SpotsServer).SpotsPlaceOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Spots_SpotsPlaceOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SpotsServer).SpotsPlaceOrder(ctx, req.(*SpotsOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Spots_SpotsCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelSpotsOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SpotsServer).SpotsCancel(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Spots_SpotsCancel_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SpotsServer).SpotsCancel(ctx, req.(*CancelSpotsOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Spots_SpotsOneClickRedemption_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SpotsOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SpotsServer).SpotsOneClickRedemption(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Spots_SpotsOneClickRedemption_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SpotsServer).SpotsOneClickRedemption(ctx, req.(*SpotsOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Spots_ServiceDesc is the grpc.ServiceDesc for Spots service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Spots_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "matchmaking.v1.Spots",
|
|
HandlerType: (*SpotsServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetBotDigitalTrade",
|
|
Handler: _Spots_GetBotDigitalTrade_Handler,
|
|
},
|
|
{
|
|
MethodName: "SpotsPlaceOrder",
|
|
Handler: _Spots_SpotsPlaceOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "SpotsCancel",
|
|
Handler: _Spots_SpotsCancel_Handler,
|
|
},
|
|
{
|
|
MethodName: "SpotsOneClickRedemption",
|
|
Handler: _Spots_SpotsOneClickRedemption_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "matchmaking/v1/virtually/spots.proto",
|
|
}
|
|
|