converter

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: CC0-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AdditionalErrorCode_name = map[int32]string{
		0:   "OK",
		100: "INVALID_CONVERTER_PAIR",
	}
	AdditionalErrorCode_value = map[string]int32{
		"OK":                     0,
		"INVALID_CONVERTER_PAIR": 100,
	}
)

Enum value maps for AdditionalErrorCode.

View Source
var Converter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "binance_converter.backend_api.converter.converter",
	HandlerType: (*ConverterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAvailableConverterPairs",
			Handler:    _Converter_GetAvailableConverterPairs_Handler,
		},
		{
			MethodName: "SetConvertPair",
			Handler:    _Converter_SetConvertPair_Handler,
		},
		{
			MethodName: "GetMyConvertPairs",
			Handler:    _Converter_GetMyConvertPairs_Handler,
		},
		{
			MethodName: "SetThresholdConvertPairs",
			Handler:    _Converter_SetThresholdConvertPairs_Handler,
		},
		{
			MethodName: "GetMyThresholdConvertPairs",
			Handler:    _Converter_GetMyThresholdConvertPairs_Handler,
		},
		{
			MethodName: "GetCurrentExchange",
			Handler:    _Converter_GetCurrentExchange_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/converter.proto",
}

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

View Source
var File_proto_converter_proto protoreflect.FileDescriptor

Functions

func RegisterConverterServer

func RegisterConverterServer(s grpc.ServiceRegistrar, srv ConverterServer)

Types

type AdditionalErrorCode added in v0.0.3

type AdditionalErrorCode int32
const (
	AdditionalErrorCode_OK                     AdditionalErrorCode = 0
	AdditionalErrorCode_INVALID_CONVERTER_PAIR AdditionalErrorCode = 100
)

func (AdditionalErrorCode) Descriptor added in v0.0.3

func (AdditionalErrorCode) Enum added in v0.0.3

func (AdditionalErrorCode) EnumDescriptor deprecated added in v0.0.3

func (AdditionalErrorCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use AdditionalErrorCode.Descriptor instead.

func (AdditionalErrorCode) Number added in v0.0.3

func (AdditionalErrorCode) String added in v0.0.3

func (x AdditionalErrorCode) String() string

func (AdditionalErrorCode) Type added in v0.0.3

type ConverterClient

type ConverterClient interface {
	GetAvailableConverterPairs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ConverterPairs, error)
	SetConvertPair(ctx context.Context, in *ConverterPair, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetMyConvertPairs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ConverterPairs, error)
	SetThresholdConvertPairs(ctx context.Context, in *ThresholdConvertPair, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetMyThresholdConvertPairs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ThresholdConvertPairs, error)
	GetCurrentExchange(ctx context.Context, in *ConverterPair, opts ...grpc.CallOption) (*Exchange, error)
}

ConverterClient is the client API for Converter 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 NewConverterClient

func NewConverterClient(cc grpc.ClientConnInterface) ConverterClient

type ConverterPair

type ConverterPair struct {
	ConverterPair []*currencies.FullCurrency `protobuf:"bytes,1,rep,name=converterPair,proto3" json:"converterPair,omitempty"`
	// contains filtered or unexported fields
}

func (*ConverterPair) Descriptor deprecated

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

Deprecated: Use ConverterPair.ProtoReflect.Descriptor instead.

func (*ConverterPair) GetConverterPair

func (x *ConverterPair) GetConverterPair() []*currencies.FullCurrency

func (*ConverterPair) ProtoMessage

func (*ConverterPair) ProtoMessage()

func (*ConverterPair) ProtoReflect

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

func (*ConverterPair) Reset

func (x *ConverterPair) Reset()

func (*ConverterPair) String

func (x *ConverterPair) String() string

type ConverterPairs

type ConverterPairs struct {
	ConverterPairs []*ConverterPair `protobuf:"bytes,1,rep,name=converterPairs,proto3" json:"converterPairs,omitempty"`
	// contains filtered or unexported fields
}

func (*ConverterPairs) Descriptor deprecated

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

Deprecated: Use ConverterPairs.ProtoReflect.Descriptor instead.

func (*ConverterPairs) GetConverterPairs

func (x *ConverterPairs) GetConverterPairs() []*ConverterPair

func (*ConverterPairs) ProtoMessage

func (*ConverterPairs) ProtoMessage()

func (*ConverterPairs) ProtoReflect

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

func (*ConverterPairs) Reset

func (x *ConverterPairs) Reset()

func (*ConverterPairs) String

func (x *ConverterPairs) String() string

type ConverterServer

type ConverterServer interface {
	GetAvailableConverterPairs(context.Context, *emptypb.Empty) (*ConverterPairs, error)
	SetConvertPair(context.Context, *ConverterPair) (*emptypb.Empty, error)
	GetMyConvertPairs(context.Context, *emptypb.Empty) (*ConverterPairs, error)
	SetThresholdConvertPairs(context.Context, *ThresholdConvertPair) (*emptypb.Empty, error)
	GetMyThresholdConvertPairs(context.Context, *emptypb.Empty) (*ThresholdConvertPairs, error)
	GetCurrentExchange(context.Context, *ConverterPair) (*Exchange, error)
	// contains filtered or unexported methods
}

ConverterServer is the server API for Converter service. All implementations must embed UnimplementedConverterServer for forward compatibility

type Exchange

type Exchange struct {
	Exchange float32 `protobuf:"fixed32,1,opt,name=exchange,proto3" json:"exchange,omitempty"`
	// contains filtered or unexported fields
}

func (*Exchange) Descriptor deprecated

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

Deprecated: Use Exchange.ProtoReflect.Descriptor instead.

func (*Exchange) GetExchange

func (x *Exchange) GetExchange() float32

func (*Exchange) ProtoMessage

func (*Exchange) ProtoMessage()

func (*Exchange) ProtoReflect

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

func (*Exchange) Reset

func (x *Exchange) Reset()

func (*Exchange) String

func (x *Exchange) String() string

type ThresholdConvertPair

type ThresholdConvertPair struct {
	ConverterPair *ConverterPair `protobuf:"bytes,1,opt,name=converterPair,proto3" json:"converterPair,omitempty"`
	Exchange      *Exchange      `protobuf:"bytes,2,opt,name=exchange,proto3" json:"exchange,omitempty"`
	// contains filtered or unexported fields
}

func (*ThresholdConvertPair) Descriptor deprecated

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

Deprecated: Use ThresholdConvertPair.ProtoReflect.Descriptor instead.

func (*ThresholdConvertPair) GetConverterPair

func (x *ThresholdConvertPair) GetConverterPair() *ConverterPair

func (*ThresholdConvertPair) GetExchange

func (x *ThresholdConvertPair) GetExchange() *Exchange

func (*ThresholdConvertPair) ProtoMessage

func (*ThresholdConvertPair) ProtoMessage()

func (*ThresholdConvertPair) ProtoReflect

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

func (*ThresholdConvertPair) Reset

func (x *ThresholdConvertPair) Reset()

func (*ThresholdConvertPair) String

func (x *ThresholdConvertPair) String() string

type ThresholdConvertPairs

type ThresholdConvertPairs struct {
	ConverterPairs []*ThresholdConvertPair `protobuf:"bytes,1,rep,name=converterPairs,proto3" json:"converterPairs,omitempty"`
	// contains filtered or unexported fields
}

func (*ThresholdConvertPairs) Descriptor deprecated

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

Deprecated: Use ThresholdConvertPairs.ProtoReflect.Descriptor instead.

func (*ThresholdConvertPairs) GetConverterPairs

func (x *ThresholdConvertPairs) GetConverterPairs() []*ThresholdConvertPair

func (*ThresholdConvertPairs) ProtoMessage

func (*ThresholdConvertPairs) ProtoMessage()

func (*ThresholdConvertPairs) ProtoReflect

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

func (*ThresholdConvertPairs) Reset

func (x *ThresholdConvertPairs) Reset()

func (*ThresholdConvertPairs) String

func (x *ThresholdConvertPairs) String() string

type UnimplementedConverterServer

type UnimplementedConverterServer struct {
}

UnimplementedConverterServer must be embedded to have forward compatible implementations.

func (UnimplementedConverterServer) GetAvailableConverterPairs

func (UnimplementedConverterServer) GetAvailableConverterPairs(context.Context, *emptypb.Empty) (*ConverterPairs, error)

func (UnimplementedConverterServer) GetCurrentExchange

func (UnimplementedConverterServer) GetMyConvertPairs

func (UnimplementedConverterServer) GetMyThresholdConvertPairs

func (UnimplementedConverterServer) SetConvertPair

func (UnimplementedConverterServer) SetThresholdConvertPairs

type UnsafeConverterServer

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

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

Jump to

Keyboard shortcuts

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