Files
go-zero/example/bookstore/rpc/add/internal/server/adderserver.go
2020-09-27 11:10:21 +08:00

28 lines
513 B
Go
Executable File

// Code generated by goctl. DO NOT EDIT!
// Source: add.proto
package server
import (
"context"
"bookstore/rpc/add/internal/logic"
"bookstore/rpc/add/internal/svc"
add "bookstore/rpc/add/pb"
)
type AdderServer struct {
svcCtx *svc.ServiceContext
}
func NewAdderServer(svcCtx *svc.ServiceContext) *AdderServer {
return &AdderServer{
svcCtx: svcCtx,
}
}
func (s *AdderServer) Add(ctx context.Context, in *add.AddReq) (*add.AddResp, error) {
l := logic.NewAddLogic(ctx, s.svcCtx)
return l.Add(in)
}