package api import ( "context" "linkpay/internal/logic" "git.linkiio.cn/linkpay/protobuf" "github.com/gogf/gf/contrib/rpc/grpcx/v2" ) type Controller struct { protobuf.UnimplementedOrgServer } func Register(s *grpcx.GrpcServer) { protobuf.RegisterOrgServer(s.Server, &Controller{}) } func (*Controller) Event(ctx context.Context, req *protobuf.EventReq) (res *protobuf.EventRes, err error) { return logic.Event(ctx, req) } func (*Controller) Ping(ctx context.Context, req *protobuf.PingReq) (res *protobuf.PongRes, err error) { return logic.Ping(ctx, req) } func (*Controller) Pay(ctx context.Context, req *protobuf.PayReq) (res *protobuf.Orders, err error) { return logic.Pay(ctx, req) } func (*Controller) Refund(ctx context.Context, req *protobuf.RefundReq) (res *protobuf.Refunds, err error) { return logic.Refund(ctx, req) } func (*Controller) Revoke(ctx context.Context, req *protobuf.RefundReq) (res *protobuf.Refunds, err error) { return logic.Revoke(ctx, req) } func (*Controller) QueryOrder(ctx context.Context, req *protobuf.QueryReq) (res *protobuf.Orders, err error) { return logic.QueryOrder(ctx, req) } func (*Controller) QueryRefund(ctx context.Context, req *protobuf.QueryReq) (res *protobuf.Refunds, err error) { return logic.QueryRefund(ctx, req) }