regen and update

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-06-30 17:53:06 +03:00
parent 14d062b4a5
commit 3ceff22f52
28 changed files with 1333 additions and 60 deletions

View File

@@ -1,3 +1,3 @@
package grpc
//go:generate protoc -I./proto -I$GOPATH/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.9.5/third_party/googleapis -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --micro_out=components=micro|rpc,debug=true,standalone=true,paths=source_relative:./gproto proto/test.proto
//go:generate protoc -I./proto -I$GOPATH/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.9.5/third_party/googleapis -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --go-micro_out=components=micro|rpc,debug=true,standalone=true,paths=source_relative:./gproto proto/test.proto

View File

@@ -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,9 +11,9 @@ import (
client "github.com/unistack-org/micro/v3/client"
)
func NewTestEndpoints() []*api.Endpoint {
return []*api.Endpoint{
&api.Endpoint{
var (
TestEndpoints = []api.Endpoint{
api.Endpoint{
Name: "Test.Call",
Path: []string{"/api/v0/test/call/TEST"},
Method: []string{"POST"},
@@ -19,6 +21,10 @@ func NewTestEndpoints() []*api.Endpoint {
Handler: "rpc",
},
}
)
func NewTestEndpoints() []api.Endpoint {
return TestEndpoints
}
type TestClient interface {

View File

@@ -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 (
@@ -45,8 +47,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...)...))
}