initial import

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-11-28 12:39:25 +03:00
parent 255bcc0329
commit 5608190dbf
16 changed files with 1821 additions and 0 deletions

22
http/handler/handler.go Normal file
View File

@@ -0,0 +1,22 @@
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
}