update all

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-03-03 18:01:37 +03:00
parent 652d74cc3a
commit 2073a6b3f4
36 changed files with 731 additions and 817 deletions

View File

@@ -6,7 +6,6 @@ package helloworld
import (
context "context"
proto "go.unistack.org/micro-tests/server/grpc/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"

View File

@@ -6,7 +6,6 @@ package helloworld
import (
context "context"
proto "go.unistack.org/micro-tests/server/grpc/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"

View File

@@ -1,18 +1,17 @@
// 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"
_ "go.unistack.org/micro-proto/v3/api"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
@@ -230,15 +229,12 @@ func file_test_proto_rawDescGZIP() []byte {
return file_test_proto_rawDescData
}
var (
file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
file_test_proto_goTypes = []interface{}{
(*Request)(nil), // 0: helloworld.Request
(*Broken)(nil), // 1: helloworld.Broken
(*Response)(nil), // 2: helloworld.Response
}
)
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_test_proto_goTypes = []interface{}{
(*Request)(nil), // 0: helloworld.Request
(*Broken)(nil), // 1: helloworld.Broken
(*Response)(nil), // 2: helloworld.Response
}
var file_test_proto_depIdxs = []int32{
1, // 0: helloworld.Request.broken:type_name -> helloworld.Broken
1, // 1: helloworld.Response.broken:type_name -> helloworld.Broken

View File

@@ -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"
@@ -52,7 +51,8 @@ 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")

View File

@@ -1,21 +1,20 @@
// 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"
_ "go.unistack.org/micro-proto/v3/api"
_ "go.unistack.org/micro-proto/v3/openapiv3"
_ "go.unistack.org/micro-proto/v3/tag"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
const (
@@ -494,19 +493,16 @@ func file_test_proto_rawDescGZIP() []byte {
return file_test_proto_rawDescData
}
var (
file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
file_test_proto_goTypes = []interface{}{
(*CallReq)(nil), // 0: test.CallReq
(*Nested)(nil), // 1: test.Nested
(*CallRsp)(nil), // 2: test.CallRsp
(*CallReq1)(nil), // 3: test.CallReq1
(*CallRsp1)(nil), // 4: test.CallRsp1
(*Error)(nil), // 5: test.Error
(*wrapperspb.UInt64Value)(nil), // 6: google.protobuf.UInt64Value
}
)
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_test_proto_goTypes = []interface{}{
(*CallReq)(nil), // 0: test.CallReq
(*Nested)(nil), // 1: test.Nested
(*CallRsp)(nil), // 2: test.CallRsp
(*CallReq1)(nil), // 3: test.CallReq1
(*CallRsp1)(nil), // 4: test.CallRsp1
(*Error)(nil), // 5: test.Error
(*wrapperspb.UInt64Value)(nil), // 6: google.protobuf.UInt64Value
}
var file_test_proto_depIdxs = []int32{
1, // 0: test.CallReq.nested:type_name -> test.Nested
6, // 1: test.Nested.uint64_args:type_name -> google.protobuf.UInt64Value

View File

@@ -6,7 +6,6 @@ package pb
import (
context "context"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
)

View File

@@ -6,14 +6,13 @@ package pb
import (
context "context"
http "net/http"
time "time"
v3 "go.unistack.org/micro-client-http/v3"
v31 "go.unistack.org/micro-server-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"
time "time"
)
type testDoubleClient struct {
@@ -26,6 +25,11 @@ func NewTestDoubleClient(name string, c client.Client) TestDoubleClient {
}
func (c *testDoubleClient) CallDouble(ctx context.Context, req *CallReq, opts ...client.CallOption) (*CallRsp, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodPost),
v3.Path("/v1/testdouble/call/name/{name}"),
@@ -76,6 +80,11 @@ func NewTestClient(name string, c client.Client) TestClient {
}
func (c *testClient) CallRepeatedString(ctx context.Context, req *CallReq, opts ...client.CallOption) (*CallRsp, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodPost),
v3.Path("/v1/test/call_repeated_string"),
@@ -91,6 +100,11 @@ func (c *testClient) CallRepeatedString(ctx context.Context, req *CallReq, opts
}
func (c *testClient) CallRepeatedInt64(ctx context.Context, req *CallReq, opts ...client.CallOption) (*CallRsp, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodPost),
v3.Path("/v1/test/call_repeated_int64"),
@@ -106,14 +120,19 @@ func (c *testClient) CallRepeatedInt64(ctx context.Context, req *CallReq, opts .
}
func (c *testClient) Call(ctx context.Context, req *CallReq, opts ...client.CallOption) (*CallRsp, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodPost),
v3.Path("/v1/test/call/{name}"),
v3.Body("*"),
)
opts = append(opts,
v3.Header("Clientid", "true"),
v3.Cookie("Csrftoken", "true"),
v3.Header("Clientid", "true"),
)
opts = append(opts, client.WithRequestTimeout(time.Second*5))
rsp := &CallRsp{}
@@ -125,6 +144,11 @@ func (c *testClient) Call(ctx context.Context, req *CallReq, opts ...client.Call
}
func (c *testClient) CallError(ctx context.Context, req *CallReq1, opts ...client.CallOption) (*CallRsp1, error) {
errmap := make(map[string]interface{}, 1)
errmap["default"] = &Error{}
opts = append(opts,
v3.ErrorMap(errmap),
)
opts = append(opts,
v3.Method(http.MethodPost),
v3.Path("/v1/test/callerror/{name}"),
@@ -161,8 +185,8 @@ func (h *testServer) Call(ctx context.Context, req *CallReq, rsp *CallRsp) error
ctx, cancel = context.WithTimeout(ctx, time.Second*5)
defer cancel()
v31.FillRequest(ctx, req,
v31.Cookie("Csrftoken", "true"),
v31.Header("Clientid", "true"),
v31.Cookie("Csrftoken", "true"),
)
return h.TestServer.Call(ctx, req, rsp)
}