Documentation ¶
Overview ¶
Package signal is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSignalServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSignalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignalServiceClient) error
- func RegisterSignalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSignalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignalServiceServer) error
- func RegisterSignalServiceServer(s grpc.ServiceRegistrar, srv SignalServiceServer)
- type ChangeTradingSettingsRequest
- func (*ChangeTradingSettingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChangeTradingSettingsRequest) GetInterval() string
- func (x *ChangeTradingSettingsRequest) GetOffNotify() bool
- func (*ChangeTradingSettingsRequest) ProtoMessage()
- func (x *ChangeTradingSettingsRequest) ProtoReflect() protoreflect.Message
- func (x *ChangeTradingSettingsRequest) Reset()
- func (x *ChangeTradingSettingsRequest) String() string
- type ChangeTradingSettingsResponse
- func (*ChangeTradingSettingsResponse) Descriptor() ([]byte, []int)deprecated
- func (*ChangeTradingSettingsResponse) ProtoMessage()
- func (x *ChangeTradingSettingsResponse) ProtoReflect() protoreflect.Message
- func (x *ChangeTradingSettingsResponse) Reset()
- func (x *ChangeTradingSettingsResponse) String() string
- type PerformSignalRequestAnalysis
- func (*PerformSignalRequestAnalysis) Descriptor() ([]byte, []int)deprecated
- func (x *PerformSignalRequestAnalysis) GetSymbol() string
- func (x *PerformSignalRequestAnalysis) GetTimestamp() int64
- func (*PerformSignalRequestAnalysis) ProtoMessage()
- func (x *PerformSignalRequestAnalysis) ProtoReflect() protoreflect.Message
- func (x *PerformSignalRequestAnalysis) Reset()
- func (x *PerformSignalRequestAnalysis) String() string
- type PerformSignalResponseAnalysis
- func (*PerformSignalResponseAnalysis) Descriptor() ([]byte, []int)deprecated
- func (x *PerformSignalResponseAnalysis) GetMessage() string
- func (*PerformSignalResponseAnalysis) ProtoMessage()
- func (x *PerformSignalResponseAnalysis) ProtoReflect() protoreflect.Message
- func (x *PerformSignalResponseAnalysis) Reset()
- func (x *PerformSignalResponseAnalysis) String() string
- type SignalServiceClient
- type SignalServiceServer
- type UnimplementedSignalServiceServer
- type UnsafeSignalServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_v1_signal_service_proto protoreflect.FileDescriptor
var SignalService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.signal.SignalService", HandlerType: (*SignalServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PerformSignalAnalysis", Handler: _SignalService_PerformSignalAnalysis_Handler, }, { MethodName: "ChangeTradingSettings", Handler: _SignalService_ChangeTradingSettings_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/signal/service.proto", }
SignalService_ServiceDesc is the grpc.ServiceDesc for SignalService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSignalServiceHandler ¶
func RegisterSignalServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSignalServiceHandler registers the http handlers for service SignalService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSignalServiceHandlerClient ¶
func RegisterSignalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignalServiceClient) error
RegisterSignalServiceHandlerClient registers the http handlers for service SignalService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SignalServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SignalServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SignalServiceClient" to call the correct interceptors.
func RegisterSignalServiceHandlerFromEndpoint ¶
func RegisterSignalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSignalServiceHandlerFromEndpoint is same as RegisterSignalServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSignalServiceHandlerServer ¶
func RegisterSignalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignalServiceServer) error
RegisterSignalServiceHandlerServer registers the http handlers for service SignalService to "mux". UnaryRPC :call SignalServiceServer 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 RegisterSignalServiceHandlerFromEndpoint instead.
func RegisterSignalServiceServer ¶
func RegisterSignalServiceServer(s grpc.ServiceRegistrar, srv SignalServiceServer)
Types ¶
type ChangeTradingSettingsRequest ¶
type ChangeTradingSettingsRequest struct { Interval string `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` OffNotify bool `protobuf:"varint,2,opt,name=off_notify,json=offNotify,proto3" json:"off_notify,omitempty"` // contains filtered or unexported fields }
func (*ChangeTradingSettingsRequest) Descriptor
deprecated
func (*ChangeTradingSettingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChangeTradingSettingsRequest.ProtoReflect.Descriptor instead.
func (*ChangeTradingSettingsRequest) GetInterval ¶
func (x *ChangeTradingSettingsRequest) GetInterval() string
func (*ChangeTradingSettingsRequest) GetOffNotify ¶
func (x *ChangeTradingSettingsRequest) GetOffNotify() bool
func (*ChangeTradingSettingsRequest) ProtoMessage ¶
func (*ChangeTradingSettingsRequest) ProtoMessage()
func (*ChangeTradingSettingsRequest) ProtoReflect ¶
func (x *ChangeTradingSettingsRequest) ProtoReflect() protoreflect.Message
func (*ChangeTradingSettingsRequest) Reset ¶
func (x *ChangeTradingSettingsRequest) Reset()
func (*ChangeTradingSettingsRequest) String ¶
func (x *ChangeTradingSettingsRequest) String() string
type ChangeTradingSettingsResponse ¶
type ChangeTradingSettingsResponse struct {
// contains filtered or unexported fields
}
func (*ChangeTradingSettingsResponse) Descriptor
deprecated
func (*ChangeTradingSettingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChangeTradingSettingsResponse.ProtoReflect.Descriptor instead.
func (*ChangeTradingSettingsResponse) ProtoMessage ¶
func (*ChangeTradingSettingsResponse) ProtoMessage()
func (*ChangeTradingSettingsResponse) ProtoReflect ¶
func (x *ChangeTradingSettingsResponse) ProtoReflect() protoreflect.Message
func (*ChangeTradingSettingsResponse) Reset ¶
func (x *ChangeTradingSettingsResponse) Reset()
func (*ChangeTradingSettingsResponse) String ¶
func (x *ChangeTradingSettingsResponse) String() string
type PerformSignalRequestAnalysis ¶
type PerformSignalRequestAnalysis struct { Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*PerformSignalRequestAnalysis) Descriptor
deprecated
func (*PerformSignalRequestAnalysis) Descriptor() ([]byte, []int)
Deprecated: Use PerformSignalRequestAnalysis.ProtoReflect.Descriptor instead.
func (*PerformSignalRequestAnalysis) GetSymbol ¶
func (x *PerformSignalRequestAnalysis) GetSymbol() string
func (*PerformSignalRequestAnalysis) GetTimestamp ¶
func (x *PerformSignalRequestAnalysis) GetTimestamp() int64
func (*PerformSignalRequestAnalysis) ProtoMessage ¶
func (*PerformSignalRequestAnalysis) ProtoMessage()
func (*PerformSignalRequestAnalysis) ProtoReflect ¶
func (x *PerformSignalRequestAnalysis) ProtoReflect() protoreflect.Message
func (*PerformSignalRequestAnalysis) Reset ¶
func (x *PerformSignalRequestAnalysis) Reset()
func (*PerformSignalRequestAnalysis) String ¶
func (x *PerformSignalRequestAnalysis) String() string
type PerformSignalResponseAnalysis ¶
type PerformSignalResponseAnalysis struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*PerformSignalResponseAnalysis) Descriptor
deprecated
func (*PerformSignalResponseAnalysis) Descriptor() ([]byte, []int)
Deprecated: Use PerformSignalResponseAnalysis.ProtoReflect.Descriptor instead.
func (*PerformSignalResponseAnalysis) GetMessage ¶
func (x *PerformSignalResponseAnalysis) GetMessage() string
func (*PerformSignalResponseAnalysis) ProtoMessage ¶
func (*PerformSignalResponseAnalysis) ProtoMessage()
func (*PerformSignalResponseAnalysis) ProtoReflect ¶
func (x *PerformSignalResponseAnalysis) ProtoReflect() protoreflect.Message
func (*PerformSignalResponseAnalysis) Reset ¶
func (x *PerformSignalResponseAnalysis) Reset()
func (*PerformSignalResponseAnalysis) String ¶
func (x *PerformSignalResponseAnalysis) String() string
type SignalServiceClient ¶
type SignalServiceClient interface { PerformSignalAnalysis(ctx context.Context, in *PerformSignalRequestAnalysis, opts ...grpc.CallOption) (*PerformSignalResponseAnalysis, error) ChangeTradingSettings(ctx context.Context, in *ChangeTradingSettingsRequest, opts ...grpc.CallOption) (*ChangeTradingSettingsResponse, error) }
SignalServiceClient is the client API for SignalService 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 NewSignalServiceClient ¶
func NewSignalServiceClient(cc grpc.ClientConnInterface) SignalServiceClient
type SignalServiceServer ¶
type SignalServiceServer interface { PerformSignalAnalysis(context.Context, *PerformSignalRequestAnalysis) (*PerformSignalResponseAnalysis, error) ChangeTradingSettings(context.Context, *ChangeTradingSettingsRequest) (*ChangeTradingSettingsResponse, error) }
SignalServiceServer is the server API for SignalService service. All implementations should embed UnimplementedSignalServiceServer for forward compatibility
type UnimplementedSignalServiceServer ¶
type UnimplementedSignalServiceServer struct { }
UnimplementedSignalServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedSignalServiceServer) ChangeTradingSettings ¶
func (UnimplementedSignalServiceServer) ChangeTradingSettings(context.Context, *ChangeTradingSettingsRequest) (*ChangeTradingSettingsResponse, error)
func (UnimplementedSignalServiceServer) PerformSignalAnalysis ¶
func (UnimplementedSignalServiceServer) PerformSignalAnalysis(context.Context, *PerformSignalRequestAnalysis) (*PerformSignalResponseAnalysis, error)
type UnsafeSignalServiceServer ¶
type UnsafeSignalServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSignalServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SignalServiceServer will result in compilation errors.