Delete data endpoints (#364)

This commit is contained in:
Dominic Wong
2022-02-07 16:45:27 +00:00
committed by GitHub
parent 7a826ed615
commit 9e252e9a30
6 changed files with 133 additions and 22 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/micro/micro/v3/service/logger"
"github.com/micro/services/function/handler"
pb "github.com/micro/services/function/proto"
admin "github.com/micro/services/pkg/service/proto"
)
func main() {
@@ -14,8 +15,10 @@ func main() {
service.Version("latest"),
)
h := handler.NewFunction()
// Register handler
pb.RegisterFunctionHandler(srv.Server(), handler.NewFunction())
pb.RegisterFunctionHandler(srv.Server(), h)
admin.RegisterAdminHandler(srv.Server(), h)
// Run service
if err := srv.Run(); err != nil {