resourceserver.go 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: resource.proto
  3. package server
  4. import (
  5. "context"
  6. "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/internal/logic"
  7. "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/internal/svc"
  8. "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/pb"
  9. )
  10. type ResourceServer struct {
  11. svcCtx *svc.ServiceContext
  12. pb.UnimplementedResourceServer
  13. }
  14. func NewResourceServer(svcCtx *svc.ServiceContext) *ResourceServer {
  15. return &ResourceServer{
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. func (s *ResourceServer) PowerHandle(ctx context.Context, in *pb.PowerReq) (*pb.Resp, error) {
  20. l := logic.NewPowerHandleLogic(ctx, s.svcCtx)
  21. return l.PowerHandle(in)
  22. }
  23. func (s *ResourceServer) CheckPower(ctx context.Context, in *pb.CheckPowerReq) (*pb.Resp, error) {
  24. l := logic.NewCheckPowerLogic(ctx, s.svcCtx)
  25. return l.CheckPower(in)
  26. }
  27. func (s *ResourceServer) Deduction(ctx context.Context, in *pb.DeductionReq) (*pb.Resp, error) {
  28. l := logic.NewDeductionLogic(ctx, s.svcCtx)
  29. return l.Deduction(in)
  30. }