37 lines
953 B
Go
37 lines
953 B
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: file.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"sundynix-micro-go/app/file/rpc/file"
|
|
"sundynix-micro-go/app/file/rpc/internal/logic"
|
|
"sundynix-micro-go/app/file/rpc/internal/svc"
|
|
)
|
|
|
|
type FileServiceServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
file.UnimplementedFileServiceServer
|
|
}
|
|
|
|
func NewFileServiceServer(svcCtx *svc.ServiceContext) *FileServiceServer {
|
|
return &FileServiceServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
// 根据ID获取文件信息
|
|
func (s *FileServiceServer) GetFileById(ctx context.Context, in *file.GetFileByIdReq) (*file.GetFileByIdResp, error) {
|
|
l := logic.NewGetFileByIdLogic(ctx, s.svcCtx)
|
|
return l.GetFileById(in)
|
|
}
|
|
|
|
// 根据ID列表批量获取文件信息
|
|
func (s *FileServiceServer) GetFilesByIds(ctx context.Context, in *file.GetFilesByIdsReq) (*file.GetFilesByIdsResp, error) {
|
|
l := logic.NewGetFilesByIdsLogic(ctx, s.svcCtx)
|
|
return l.GetFilesByIds(in)
|
|
}
|