regen and update
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -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 pb
|
||||
|
||||
import (
|
||||
@@ -8,9 +10,9 @@ import (
|
||||
client "github.com/unistack-org/micro/v3/client"
|
||||
)
|
||||
|
||||
func NewTestDoubleEndpoints() []*api.Endpoint {
|
||||
return []*api.Endpoint{
|
||||
&api.Endpoint{
|
||||
var (
|
||||
TestDoubleEndpoints = []api.Endpoint{
|
||||
api.Endpoint{
|
||||
Name: "TestDouble.CallDouble",
|
||||
Path: []string{"/v1/testdouble/call/{name}"},
|
||||
Method: []string{"POST"},
|
||||
@@ -18,6 +20,10 @@ func NewTestDoubleEndpoints() []*api.Endpoint {
|
||||
Handler: "rpc",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
func NewTestDoubleEndpoints() []api.Endpoint {
|
||||
return TestDoubleEndpoints
|
||||
}
|
||||
|
||||
type TestDoubleClient interface {
|
||||
@@ -28,30 +34,30 @@ type TestDoubleServer interface {
|
||||
CallDouble(ctx context.Context, req *CallReq, rsp *CallRsp) error
|
||||
}
|
||||
|
||||
func NewTestEndpoints() []*api.Endpoint {
|
||||
return []*api.Endpoint{
|
||||
&api.Endpoint{
|
||||
var (
|
||||
TestEndpoints = []api.Endpoint{
|
||||
api.Endpoint{
|
||||
Name: "Test.CallRepeatedString",
|
||||
Path: []string{"/v1/test/call_repeated_string/{string_ids}"},
|
||||
Method: []string{"POST"},
|
||||
Body: "*",
|
||||
Handler: "rpc",
|
||||
},
|
||||
&api.Endpoint{
|
||||
api.Endpoint{
|
||||
Name: "Test.CallRepeatedInt64",
|
||||
Path: []string{"/v1/test/call_repeated_int64/{int64_ids}"},
|
||||
Method: []string{"POST"},
|
||||
Body: "*",
|
||||
Handler: "rpc",
|
||||
},
|
||||
&api.Endpoint{
|
||||
api.Endpoint{
|
||||
Name: "Test.Call",
|
||||
Path: []string{"/v1/test/call/{name}"},
|
||||
Method: []string{"POST"},
|
||||
Body: "*",
|
||||
Handler: "rpc",
|
||||
},
|
||||
&api.Endpoint{
|
||||
api.Endpoint{
|
||||
Name: "Test.CallError",
|
||||
Path: []string{"/v1/test/callerror/{name}"},
|
||||
Method: []string{"POST"},
|
||||
@@ -59,6 +65,10 @@ func NewTestEndpoints() []*api.Endpoint {
|
||||
Handler: "rpc",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
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 pb
|
||||
|
||||
import (
|
||||
@@ -61,8 +63,8 @@ func RegisterTestDoubleServer(s server.Server, sh TestDoubleServer, opts ...serv
|
||||
}
|
||||
h := &testDoubleServer{sh}
|
||||
var nopts []server.HandlerOption
|
||||
for _, endpoint := range NewTestDoubleEndpoints() {
|
||||
nopts = append(nopts, api.WithEndpoint(endpoint))
|
||||
for _, endpoint := range TestDoubleEndpoints {
|
||||
nopts = append(nopts, api.WithEndpoint(&endpoint))
|
||||
}
|
||||
return s.Handle(s.NewHandler(&TestDouble{h}, append(nopts, opts...)...))
|
||||
}
|
||||
@@ -196,8 +198,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...)...))
|
||||
}
|
||||
|
Reference in New Issue
Block a user