Update protoc-gen-micro

This commit is contained in:
Ben Toogood 2020-04-15 11:39:12 +01:00
parent ea29920afb
commit 234c192faf
16 changed files with 161 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Command service
func NewCommandEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Command service // Client API for Command service
type CommandService interface { type CommandService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Api service
func NewApiEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Api service // Client API for Api service
type ApiService interface { type ApiService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Auth service
func NewAuthEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Auth service // Client API for Auth service
type AuthService interface { type AuthService interface {
@ -118,6 +126,12 @@ func (h *authHandler) Token(ctx context.Context, in *TokenRequest, out *TokenRes
return h.AuthHandler.Token(ctx, in, out) return h.AuthHandler.Token(ctx, in, out)
} }
// Api Endpoints for Accounts service
func NewAccountsEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Accounts service // Client API for Accounts service
type AccountsService interface { type AccountsService interface {
@ -171,6 +185,12 @@ func (h *accountsHandler) List(ctx context.Context, in *ListAccountsRequest, out
return h.AccountsHandler.List(ctx, in, out) return h.AccountsHandler.List(ctx, in, out)
} }
// Api Endpoints for Rules service
func NewRulesEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Rules service // Client API for Rules service
type RulesService interface { type RulesService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Broker service
func NewBrokerEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Broker service // Client API for Broker service
type BrokerService interface { type BrokerService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Client service
func NewClientEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Client service // Client API for Client service
type ClientService interface { type ClientService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Config service
func NewConfigEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Config service // Client API for Config service
type ConfigService interface { type ConfigService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Debug service
func NewDebugEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Debug service // Client API for Debug service
type DebugService interface { type DebugService interface {

View File

@ -12,6 +12,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -28,10 +29,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Network service
func NewNetworkEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Network service // Client API for Network service
type NetworkService interface { type NetworkService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Registry service
func NewRegistryEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Registry service // Client API for Registry service
type RegistryService interface { type RegistryService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Router service
func NewRouterEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Router service // Client API for Router service
type RouterService interface { type RouterService interface {
@ -285,6 +293,12 @@ func (h *routerHandler) Process(ctx context.Context, in *Advert, out *ProcessRes
return h.RouterHandler.Process(ctx, in, out) return h.RouterHandler.Process(ctx, in, out)
} }
// Api Endpoints for Table service
func NewTableEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Table service // Client API for Table service
type TableService interface { type TableService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Runtime service
func NewRuntimeEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Runtime service // Client API for Runtime service
type RuntimeService interface { type RuntimeService interface {

View File

@ -12,6 +12,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -28,10 +29,25 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.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 // Client API for Test service
type TestService interface { type TestService interface {
@ -74,6 +90,13 @@ func RegisterTestHandler(s server.Server, hdlr TestHandler, opts ...server.Handl
test test
} }
h := &testHandler{hdlr} 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...)) return s.Handle(s.NewHandler(&Test{h}, opts...))
} }

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Server service
func NewServerEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Server service // Client API for Server service
type ServerService interface { type ServerService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Test service
func NewTestEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Test service // Client API for Test service
type TestService interface { type TestService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Store service
func NewStoreEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Store service // Client API for Store service
type StoreService interface { type StoreService interface {

View File

@ -11,6 +11,7 @@ import (
import ( import (
context "context" context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client" client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server" server "github.com/micro/go-micro/v2/server"
) )
@ -27,10 +28,17 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for Transport service
func NewTransportEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for Transport service // Client API for Transport service
type TransportService interface { type TransportService interface {