You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/example/bookstore/rpc/add/internal/server/adderserver.go

28 lines
522 B
Go

// Code generated by goctl. DO NOT EDIT!
// Source: add.proto
package server
import (
4 years ago
"context"
"bookstore/rpc/add/internal/logic"
add "bookstore/rpc/add/internal/pb"
"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)
}