Files
go-zero/example/bookstore/rpc/add/internal/server/adderserver.go

28 lines
522 B
Go
Raw Normal View History

2020-09-03 23:26:04 +08:00
// Code generated by goctl. DO NOT EDIT!
// Source: add.proto
package server
import (
2020-09-27 11:10:21 +08:00
"context"
2020-09-03 23:26:04 +08:00
"bookstore/rpc/add/internal/logic"
add "bookstore/rpc/add/internal/pb"
2020-09-03 23:26:04 +08:00
"bookstore/rpc/add/internal/svc"
)
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)
}