diff --git a/cmd/internal/controller/artistinfo_statement.go b/cmd/internal/controller/artistinfo_statement.go new file mode 100644 index 0000000..4e16bed --- /dev/null +++ b/cmd/internal/controller/artistinfo_statement.go @@ -0,0 +1,40 @@ +package controller + +import ( + "context" + + "github.com/fonchain/fonchain-artistinfo/cmd/internal/logic" + "github.com/fonchain/fonchain-artistinfo/pb/artistinfoStatement" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +//go:generate mockgen -destination .\artistinfoStatement_triple.pb.go -package controller -source ..\..\..\pb\artistinfoStatement\artistinfoStatement_triple.pb.go StatementServer + +type StatementServerProvider struct { + artistinfoStatement.UnimplementedStatementServer + logic logic.StatementLogic +} + +func (s *StatementServerProvider) CreateStatementBatch(ctx context.Context, in *artistinfoStatement.StatementBatchRequest) (res *artistinfoStatement.CreateStatementBatchResponse, err error) { + return s.logic.CreateStatementBatch(in) +} + +func (s *StatementServerProvider) BatchCreateStatementBatch(ctx context.Context, in *artistinfoStatement.BatchCreateStatementBatchRequest) (*emptypb.Empty, error) { + return s.logic.BatchCreateStatementBatch(in) +} + +func (s *StatementServerProvider) GetStatementBatchList(ctx context.Context, in *artistinfoStatement.GetStatementBatchListRequest) (*artistinfoStatement.GetStatementBatchListResponse, error) { + return s.logic.GetStatementBatchList(in) +} + +func (s *StatementServerProvider) CreateStatementDetail(ctx context.Context, in *artistinfoStatement.StatementDetailRequest) (*artistinfoStatement.CreateStatementDetailResponse, error) { + return s.logic.CreateStatementDetail(in) +} + +func (s *StatementServerProvider) BatchCreateStatementDetail(ctx context.Context, in *artistinfoStatement.BatchCreateStatementDetailRequest) (*emptypb.Empty, error) { + return s.logic.BatchCreateStatementDetail(in) +} + +func (s *StatementServerProvider) GetStatementDetailList(ctx context.Context, in *artistinfoStatement.GetStatementDetailListRequest) (*artistinfoStatement.GetStatementDetailListResponse, error) { + return s.logic.GetStatementDetailList(in) +}