micro-examples/http/handler/handler.go
Vasiliy Tolstov 5608190dbf initial import
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-11-28 12:39:25 +03:00

23 lines
353 B
Go

package handler
import (
"context"
"github.com/jmoiron/sqlx"
pb "github.com/unistack-org/micro-examples/http/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
}