@@ -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
|
||||
|
@@ -6,7 +6,6 @@ package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
)
|
||||
|
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user