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.
 
 

33 lines
830 B

package trading
import (
"context"
"sig-pub/api/pb"
)
type TradingGrpcServer struct {
pb.UnimplementedTradingServiceServer
tradingService *TradingService
}
func NewTradingGrpcServer(tradingService *TradingService) *TradingGrpcServer {
return &TradingGrpcServer{
tradingService: tradingService,
}
}
func (svr *TradingGrpcServer) Init() (err error) {
return
}
func (svr *TradingGrpcServer) IndicatorSeries(ctx context.Context, req *pb.ReqIndicatorSeries) (rsp *pb.RspIndicatorSeries, err error) {
rsp = &pb.RspIndicatorSeries{}
err = svr.tradingService.IndicatorSeries(req, rsp)
return
}
func (svr *TradingGrpcServer) StrategySeries(ctx context.Context, req *pb.ReqStrategySeries) (rsp *pb.RspStrategySeries, err error) {
rsp = &pb.RspStrategySeries{}
err = svr.tradingService.StrategySeries(req, rsp)
return
}