@@ -1,17 +1,16 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.19.1
|
||||
// protoc v3.19.4
|
||||
// source: test.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -147,14 +146,11 @@ func file_test_proto_rawDescGZIP() []byte {
|
||||
return file_test_proto_rawDescData
|
||||
}
|
||||
|
||||
var (
|
||||
file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
file_test_proto_goTypes = []interface{}{
|
||||
(*CallReq)(nil), // 0: Test.CallReq
|
||||
(*CallRsp)(nil), // 1: Test.CallRsp
|
||||
}
|
||||
)
|
||||
|
||||
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_test_proto_goTypes = []interface{}{
|
||||
(*CallReq)(nil), // 0: Test.CallReq
|
||||
(*CallRsp)(nil), // 1: Test.CallRsp
|
||||
}
|
||||
var file_test_proto_depIdxs = []int32{
|
||||
0, // 0: Test.TestService.Call:input_type -> Test.CallReq
|
||||
0, // 1: Test.TestService.Hello:input_type -> Test.CallReq
|
||||
|
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-go-drpc. DO NOT EDIT.
|
||||
// protoc-gen-go-drpc version: v0.0.26
|
||||
// protoc-gen-go-drpc version: v0.0.27
|
||||
// source: test.proto
|
||||
|
||||
package pb
|
||||
@@ -7,7 +7,6 @@ package pb
|
||||
import (
|
||||
context "context"
|
||||
errors "errors"
|
||||
|
||||
proto "google.golang.org/protobuf/proto"
|
||||
drpc "storj.io/drpc"
|
||||
drpcerr "storj.io/drpc/drpcerr"
|
||||
|
@@ -6,7 +6,6 @@ package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
)
|
||||
|
@@ -6,7 +6,6 @@ package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
server "go.unistack.org/micro/v3/server"
|
||||
|
@@ -6,7 +6,6 @@ package helloworld
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
proto "go.unistack.org/micro-tests/client/grpc/proto"
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
|
@@ -6,7 +6,6 @@ package helloworld
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
proto "go.unistack.org/micro-tests/client/grpc/proto"
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
|
@@ -1,17 +1,16 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.19.1
|
||||
// protoc v3.19.4
|
||||
// source: test.proto
|
||||
|
||||
package helloworld
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -159,14 +158,11 @@ func file_test_proto_rawDescGZIP() []byte {
|
||||
return file_test_proto_rawDescData
|
||||
}
|
||||
|
||||
var (
|
||||
file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
file_test_proto_goTypes = []interface{}{
|
||||
(*Request)(nil), // 0: helloworld.Request
|
||||
(*Response)(nil), // 1: helloworld.Response
|
||||
}
|
||||
)
|
||||
|
||||
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_test_proto_goTypes = []interface{}{
|
||||
(*Request)(nil), // 0: helloworld.Request
|
||||
(*Response)(nil), // 1: helloworld.Response
|
||||
}
|
||||
var file_test_proto_depIdxs = []int32{
|
||||
0, // 0: helloworld.Test.Call:input_type -> helloworld.Request
|
||||
0, // 1: helloworld.Test.Stream:input_type -> helloworld.Request
|
||||
|
@@ -1,14 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.19.1
|
||||
// - protoc v3.19.4
|
||||
// source: test.proto
|
||||
|
||||
package helloworld
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
@@ -85,12 +84,12 @@ type TestServer interface {
|
||||
}
|
||||
|
||||
// UnimplementedTestServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedTestServer struct{}
|
||||
type UnimplementedTestServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedTestServer) Call(context.Context, *Request) (*Response, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
|
||||
}
|
||||
|
||||
func (UnimplementedTestServer) Stream(Test_StreamServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Stream not implemented")
|
||||
}
|
||||
|
@@ -1,19 +1,18 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.19.1
|
||||
// protoc v3.19.4
|
||||
// source: github.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
_ "go.unistack.org/micro-proto/v3/api"
|
||||
_ "go.unistack.org/micro-proto/v3/openapiv3"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -226,15 +225,12 @@ func file_github_proto_rawDescGZIP() []byte {
|
||||
return file_github_proto_rawDescData
|
||||
}
|
||||
|
||||
var (
|
||||
file_github_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
file_github_proto_goTypes = []interface{}{
|
||||
(*LookupUserReq)(nil), // 0: github.LookupUserReq
|
||||
(*LookupUserRsp)(nil), // 1: github.LookupUserRsp
|
||||
(*Error)(nil), // 2: github.Error
|
||||
}
|
||||
)
|
||||
|
||||
var file_github_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_github_proto_goTypes = []interface{}{
|
||||
(*LookupUserReq)(nil), // 0: github.LookupUserReq
|
||||
(*LookupUserRsp)(nil), // 1: github.LookupUserRsp
|
||||
(*Error)(nil), // 2: github.Error
|
||||
}
|
||||
var file_github_proto_depIdxs = []int32{
|
||||
0, // 0: github.Github.LookupUser:input_type -> github.LookupUserReq
|
||||
0, // 1: github.Github.LookupUserWithoutPath:input_type -> github.LookupUserReq
|
||||
|
@@ -6,7 +6,6 @@ package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
)
|
||||
|
@@ -6,12 +6,11 @@ package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
http "net/http"
|
||||
|
||||
v3 "go.unistack.org/micro-client-http/v3"
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
server "go.unistack.org/micro/v3/server"
|
||||
http "net/http"
|
||||
)
|
||||
|
||||
type githubClient struct {
|
||||
@@ -24,6 +23,11 @@ func NewGithubClient(name string, c client.Client) GithubClient {
|
||||
}
|
||||
|
||||
func (c *githubClient) LookupUser(ctx context.Context, req *LookupUserReq, opts ...client.CallOption) (*LookupUserRsp, error) {
|
||||
errmap := make(map[string]interface{}, 1)
|
||||
errmap["default"] = &Error{}
|
||||
opts = append(opts,
|
||||
v3.ErrorMap(errmap),
|
||||
)
|
||||
opts = append(opts,
|
||||
v3.Method(http.MethodGet),
|
||||
v3.Path("/users/{username}"),
|
||||
@@ -37,6 +41,11 @@ func (c *githubClient) LookupUser(ctx context.Context, req *LookupUserReq, opts
|
||||
}
|
||||
|
||||
func (c *githubClient) LookupUserWithoutPath(ctx context.Context, req *LookupUserReq, opts ...client.CallOption) (*LookupUserRsp, error) {
|
||||
errmap := make(map[string]interface{}, 1)
|
||||
errmap["default"] = &Error{}
|
||||
opts = append(opts,
|
||||
v3.ErrorMap(errmap),
|
||||
)
|
||||
opts = append(opts,
|
||||
v3.Method(http.MethodGet),
|
||||
v3.Path("/{username}"),
|
||||
|
Reference in New Issue
Block a user