regen and update
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
package grpc
|
||||
|
||||
//go:generate protoc -I./proto -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --micro_out=components=micro|rpc,standalone=true,paths=source_relative:./gproto proto/test.proto
|
||||
//go:generate protoc -I./proto -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --go-micro_out=components=micro|rpc,standalone=true,paths=source_relative:./gproto proto/test.proto
|
||||
|
@@ -1,5 +1,7 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
||||
// protoc-gen-go-micro version: v3.4.0
|
||||
// source: test.proto
|
||||
|
||||
package helloworld
|
||||
|
||||
import (
|
||||
@@ -9,8 +11,12 @@ import (
|
||||
client "github.com/unistack-org/micro/v3/client"
|
||||
)
|
||||
|
||||
func NewTestEndpoints() []*api.Endpoint {
|
||||
return []*api.Endpoint{}
|
||||
var (
|
||||
TestEndpoints = []api.Endpoint{}
|
||||
)
|
||||
|
||||
func NewTestEndpoints() []api.Endpoint {
|
||||
return TestEndpoints
|
||||
}
|
||||
|
||||
type TestClient interface {
|
||||
|
@@ -1,5 +1,7 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
||||
// protoc-gen-go-micro version: v3.4.0
|
||||
// source: test.proto
|
||||
|
||||
package helloworld
|
||||
|
||||
import (
|
||||
@@ -122,8 +124,8 @@ func RegisterTestServer(s server.Server, sh TestServer, opts ...server.HandlerOp
|
||||
}
|
||||
h := &testServer{sh}
|
||||
var nopts []server.HandlerOption
|
||||
for _, endpoint := range NewTestEndpoints() {
|
||||
nopts = append(nopts, api.WithEndpoint(endpoint))
|
||||
for _, endpoint := range TestEndpoints {
|
||||
nopts = append(nopts, api.WithEndpoint(&endpoint))
|
||||
}
|
||||
return s.Handle(s.NewHandler(&Test{h}, append(nopts, opts...)...))
|
||||
}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
package http
|
||||
|
||||
//go:generate protoc -I./proto -I. -I/home/vtolstov/.cache/go-path/pkg/mod/github.com/unistack-org/micro-proto@v0.0.1 --go_out=paths=source_relative:./proto --micro_out=components=micro|http,debug=true,paths=source_relative:./proto proto/github.proto
|
||||
//go:generate protoc -I./proto -I. -I/home/vtolstov/.cache/go-path/pkg/mod/github.com/unistack-org/micro-proto@v0.0.1 --go_out=paths=source_relative:./proto --go-micro_out=components=micro|http,debug=true,paths=source_relative:./proto proto/github.proto
|
||||
|
@@ -1,5 +1,7 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
||||
// protoc-gen-go-micro version: v3.4.0
|
||||
// source: github.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
@@ -8,21 +10,25 @@ import (
|
||||
client "github.com/unistack-org/micro/v3/client"
|
||||
)
|
||||
|
||||
func NewGithubEndpoints() []*api.Endpoint {
|
||||
return []*api.Endpoint{
|
||||
&api.Endpoint{
|
||||
var (
|
||||
GithubEndpoints = []api.Endpoint{
|
||||
api.Endpoint{
|
||||
Name: "Github.LookupUser",
|
||||
Path: []string{"/users/{username}"},
|
||||
Method: []string{"GET"},
|
||||
Handler: "rpc",
|
||||
},
|
||||
&api.Endpoint{
|
||||
api.Endpoint{
|
||||
Name: "Github.LookupUserWithoutPath",
|
||||
Path: []string{"/{username}"},
|
||||
Method: []string{"GET"},
|
||||
Handler: "rpc",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
func NewGithubEndpoints() []api.Endpoint {
|
||||
return GithubEndpoints
|
||||
}
|
||||
|
||||
type GithubClient interface {
|
||||
|
@@ -1,5 +1,7 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
||||
// protoc-gen-go-micro version: v3.4.0
|
||||
// source: github.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
@@ -78,8 +80,8 @@ func RegisterGithubServer(s server.Server, sh GithubServer, opts ...server.Handl
|
||||
}
|
||||
h := &githubServer{sh}
|
||||
var nopts []server.HandlerOption
|
||||
for _, endpoint := range NewGithubEndpoints() {
|
||||
nopts = append(nopts, api.WithEndpoint(endpoint))
|
||||
for _, endpoint := range GithubEndpoints {
|
||||
nopts = append(nopts, api.WithEndpoint(&endpoint))
|
||||
}
|
||||
return s.Handle(s.NewHandler(&Github{h}, append(nopts, opts...)...))
|
||||
}
|
||||
|
Reference in New Issue
Block a user