adderserver.go 510 B

123456789101112131415161718192021222324252627
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: add.proto
  3. package server
  4. import (
  5. "context"
  6. "bookstore/rpc/add/add"
  7. "bookstore/rpc/add/internal/logic"
  8. "bookstore/rpc/add/internal/svc"
  9. )
  10. type AdderServer struct {
  11. svcCtx *svc.ServiceContext
  12. }
  13. func NewAdderServer(svcCtx *svc.ServiceContext) *AdderServer {
  14. return &AdderServer{
  15. svcCtx: svcCtx,
  16. }
  17. }
  18. func (s *AdderServer) Add(ctx context.Context, in *add.AddReq) (*add.AddResp, error) {
  19. l := logic.NewAddLogic(ctx, s.svcCtx)
  20. return l.Add(in)
  21. }