Add Priority to auth rules

This commit is contained in:
Ben Toogood
2020-04-15 11:31:19 +01:00
parent 4d177a782e
commit ea29920afb
21 changed files with 100 additions and 218 deletions

View File

@@ -12,7 +12,6 @@ import (
import (
context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server"
)
@@ -29,25 +28,10 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context
var _ client.Option
var _ server.Option
// Api Endpoints for Test service
func NewTestEndpoints() []*api.Endpoint {
return []*api.Endpoint{
&api.Endpoint{
Name: "Test.Call",
Path: []string{"/api/v0/test/call/{uuid}"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
}
}
// Client API for Test service
type TestService interface {
@@ -90,13 +74,6 @@ func RegisterTestHandler(s server.Server, hdlr TestHandler, opts ...server.Handl
test
}
h := &testHandler{hdlr}
opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "Test.Call",
Path: []string{"/api/v0/test/call/{uuid}"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
}))
return s.Handle(s.NewHandler(&Test{h}, opts...))
}