micro-examples/grpc/handler/handler.go
Vasiliy Tolstov a46561f48a add grpc server
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-11-28 13:19:46 +03:00

23 lines
353 B
Go

package handler
import (
"context"
"github.com/jmoiron/sqlx"
pb "github.com/unistack-org/micro-examples/grpc/proto"
)
type Handler struct {
db *sqlx.DB
}
func NewHandler(db *sqlx.DB) (*Handler, error) {
return &Handler{
db: db,
}, nil
}
func (h *Handler) Hello(ctx context.Context, req *pb.HelloReq, rsp *pb.HelloRsp) error {
return nil
}