filecenterserver.go 880 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: fileCenter.proto
  3. package server
  4. import (
  5. "context"
  6. "bp.jydev.jianyu360.cn/BaseService/fileCenter/rpc/internal/logic"
  7. "bp.jydev.jianyu360.cn/BaseService/fileCenter/rpc/internal/svc"
  8. "bp.jydev.jianyu360.cn/BaseService/fileCenter/rpc/pb"
  9. )
  10. type FileCenterServer struct {
  11. svcCtx *svc.ServiceContext
  12. pb.UnimplementedFileCenterServer
  13. }
  14. func NewFileCenterServer(svcCtx *svc.ServiceContext) *FileCenterServer {
  15. return &FileCenterServer{
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. // 文件上传
  20. func (s *FileCenterServer) Upload(ctx context.Context, in *pb.UploadReq) (*pb.UploadResp, error) {
  21. l := logic.NewUploadLogic(ctx, s.svcCtx)
  22. return l.Upload(in)
  23. }
  24. // 文件删除
  25. func (s *FileCenterServer) Delete(ctx context.Context, in *pb.DeleteFileReq) (*pb.FileResp, error) {
  26. l := logic.NewDeleteLogic(ctx, s.svcCtx)
  27. return l.Delete(in)
  28. }