add pubsub

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-11-28 14:49:22 +03:00
parent a46561f48a
commit ce39374ff5
20 changed files with 1729 additions and 6 deletions

22
pubsub/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/pubsub/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
}