signal

package
v0.0.0-...-4058e4e Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Unlicense Imports: 16 Imported by: 0

Documentation

Overview

Package signal is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_api_v1_signal_service_proto protoreflect.FileDescriptor
View Source
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 (*ChangeTradingSettingsRequest) Reset

func (x *ChangeTradingSettingsRequest) Reset()

func (*ChangeTradingSettingsRequest) 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 (*ChangeTradingSettingsResponse) Reset

func (x *ChangeTradingSettingsResponse) Reset()

func (*ChangeTradingSettingsResponse) 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 (*PerformSignalRequestAnalysis) Reset

func (x *PerformSignalRequestAnalysis) Reset()

func (*PerformSignalRequestAnalysis) 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 (*PerformSignalResponseAnalysis) Reset

func (x *PerformSignalResponseAnalysis) Reset()

func (*PerformSignalResponseAnalysis) 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.

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.

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.

Jump to

Keyboard shortcuts

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