powercheckserver.go 927 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: powerCheck.proto
  3. package server
  4. import (
  5. "context"
  6. "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/internal/logic"
  7. "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/internal/svc"
  8. "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/pb"
  9. )
  10. type PowerCheckServer struct {
  11. svcCtx *svc.ServiceContext
  12. pb.UnimplementedPowerCheckServer
  13. }
  14. func NewPowerCheckServer(svcCtx *svc.ServiceContext) *PowerCheckServer {
  15. return &PowerCheckServer{
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. // 用户权限判断
  20. func (s *PowerCheckServer) Check(ctx context.Context, in *pb.CheckReq) (*pb.CheckResp, error) {
  21. l := logic.NewCheckLogic(ctx, s.svcCtx)
  22. return l.Check(in)
  23. }
  24. // 清除权限缓存
  25. func (s *PowerCheckServer) DelCheckRedis(ctx context.Context, in *pb.CheckReq) (*pb.PowerCheckResp, error) {
  26. l := logic.NewDelCheckRedisLogic(ctx, s.svcCtx)
  27. return l.DelCheckRedis(in)
  28. }