fix and regen

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-02-22 00:12:01 +03:00
parent f72a39965a
commit 09f5a71e0b
32 changed files with 296 additions and 371 deletions

View File

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions:
// - protoc-gen-go-micro v3.5.3
// - protoc-gen-go-micro v3.10.1
// - protoc v3.21.12
// source: test.proto
@@ -8,19 +8,16 @@ package pb
import (
context "context"
api "go.unistack.org/micro/v3/api"
v3 "go.unistack.org/micro-server-http/v3"
client "go.unistack.org/micro/v3/client"
)
var (
TestServiceName = "TestService"
TestServiceEndpoints = []api.Endpoint{}
)
func NewTestServiceEndpoints() []api.Endpoint {
return TestServiceEndpoints
}
var (
TestServiceServerEndpoints = []v3.EndpointMetadata{}
)
type TestServiceClient interface {
Call(ctx context.Context, req *CallReq, opts ...client.CallOption) (*CallRsp, error)

View File

@@ -1,12 +1,12 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.5.3
// protoc-gen-go-micro version: v3.10.1
// source: test.proto
package pb
import (
context "context"
api "go.unistack.org/micro/v3/api"
v3 "go.unistack.org/micro-server-http/v3"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"
)
@@ -60,8 +60,6 @@ func RegisterTestServiceServer(s server.Server, sh TestServiceServer, opts ...se
}
h := &testServiceServer{sh}
var nopts []server.HandlerOption
for _, endpoint := range TestServiceEndpoints {
nopts = append(nopts, api.WithEndpoint(&endpoint))
}
nopts = append(nopts, v3.HandlerEndpoints(TestServiceServerEndpoints))
return s.Handle(s.NewHandler(&TestService{h}, append(nopts, opts...)...))
}

View File

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions:
// - protoc-gen-go-micro v3.5.3
// - protoc-gen-go-micro v3.10.1
// - protoc v3.21.12
// source: test.proto
@@ -8,21 +8,18 @@ package helloworld
import (
context "context"
v3 "go.unistack.org/micro-server-http/v3"
proto "go.unistack.org/micro-tests/client/grpc/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
metadata "go.unistack.org/micro/v3/metadata"
)
var (
TestName = "Test"
TestEndpoints = []api.Endpoint{}
)
func NewTestEndpoints() []api.Endpoint {
return TestEndpoints
}
var (
TestServerEndpoints = []v3.EndpointMetadata{}
)
type TestClient interface {
Call(ctx context.Context, req *proto.Request, opts ...client.CallOption) (*proto.Response, error)

View File

@@ -1,13 +1,13 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.5.3
// protoc-gen-go-micro version: v3.10.1
// source: test.proto
package helloworld
import (
context "context"
v3 "go.unistack.org/micro-server-http/v3"
proto "go.unistack.org/micro-tests/client/grpc/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
metadata "go.unistack.org/micro/v3/metadata"
server "go.unistack.org/micro/v3/server"
@@ -133,8 +133,6 @@ func RegisterTestServer(s server.Server, sh TestServer, opts ...server.HandlerOp
}
h := &testServer{sh}
var nopts []server.HandlerOption
for _, endpoint := range TestEndpoints {
nopts = append(nopts, api.WithEndpoint(&endpoint))
}
nopts = append(nopts, v3.HandlerEndpoints(TestServerEndpoints))
return s.Handle(s.NewHandler(&Test{h}, append(nopts, opts...)...))
}

View File

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions:
// - protoc-gen-go-micro v3.5.3
// - protoc-gen-go-micro v3.10.1
// - protoc v3.21.12
// source: github.proto
@@ -8,33 +8,32 @@ package pb
import (
context "context"
api "go.unistack.org/micro/v3/api"
v3 "go.unistack.org/micro-server-http/v3"
client "go.unistack.org/micro/v3/client"
)
var (
GithubName = "Github"
GithubEndpoints = []api.Endpoint{
)
var (
GithubServerEndpoints = []v3.EndpointMetadata{
{
Name: "Github.LookupUser",
Path: []string{"/users/{username}"},
Method: []string{"GET"},
Handler: "rpc",
Name: "Github.LookupUser",
Path: "/users/{username}",
Method: "GET",
Body: "",
Stream: false,
},
{
Name: "Github.LookupUserWithoutPath",
Path: []string{"/{username}"},
Method: []string{"GET"},
Handler: "rpc",
Name: "Github.LookupUserWithoutPath",
Path: "/{username}",
Method: "GET",
Body: "",
Stream: false,
},
}
)
func NewGithubEndpoints() []api.Endpoint {
return GithubEndpoints
}
type GithubClient interface {
LookupUser(ctx context.Context, req *LookupUserReq, opts ...client.CallOption) (*LookupUserRsp, error)
LookupUserWithoutPath(ctx context.Context, req *LookupUserReq, opts ...client.CallOption) (*LookupUserRsp, error)

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.5.3
// protoc-gen-go-micro version: v3.10.1
// source: github.proto
package pb
@@ -7,7 +7,7 @@ package pb
import (
context "context"
v3 "go.unistack.org/micro-client-http/v3"
api "go.unistack.org/micro/v3/api"
v31 "go.unistack.org/micro-server-http/v3"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"
http "net/http"
@@ -80,8 +80,6 @@ func RegisterGithubServer(s server.Server, sh GithubServer, opts ...server.Handl
}
h := &githubServer{sh}
var nopts []server.HandlerOption
for _, endpoint := range GithubEndpoints {
nopts = append(nopts, api.WithEndpoint(&endpoint))
}
nopts = append(nopts, v31.HandlerEndpoints(GithubServerEndpoints))
return s.Handle(s.NewHandler(&Github{h}, append(nopts, opts...)...))
}