From a6b5ee450f0a87a5b1916eb2658bb72e0b745d68 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 27 Oct 2021 01:24:35 +0300 Subject: [PATCH] update all Signed-off-by: Vasiliy Tolstov --- api/router/registry_test.go | 2 +- api/router/router_test.go | 42 +- broker/broker_test.go | 22 +- broker/segmentio/broker_test.go | 30 +- client/client_call_options_test.go | 22 +- client/drpc/drpc_test.go | 8 +- client/drpc/proto/test.pb.go | 11 +- client/drpc/proto/test.proto | 2 +- client/drpc/proto/test_micro.pb.go | 6 +- client/drpc/proto/test_micro_rpc.pb.go | 8 +- client/grpc/gproto/test_micro.pb.go | 8 +- client/grpc/gproto/test_micro_rpc.pb.go | 10 +- client/grpc/grpc_pool_test.go | 3 +- client/grpc/grpc_test.go | 17 +- client/grpc/proto/test.pb.go | 12 +- client/grpc/proto/test.proto | 2 +- client/http/generate.go | 2 +- client/http/http_test.go | 26 +- client/http/proto/github.pb.go | 57 ++- client/http/proto/github.proto | 26 +- client/http/proto/github_micro.pb.go | 6 +- client/http/proto/github_micro_http.pb.go | 20 +- client/http/tools.go | 7 - codec/codec_test.go | 8 +- codec/generate.go | 2 +- codec/proto/test.pb.go | 13 +- codec/proto/test.proto | 2 +- codec/proto/test_micro.pb.go | 8 +- codec/proto/test_micro_http.pb.go | 12 +- codec/segmentio/generate.go | 2 +- codec/segmentio/grpc_test.go | 26 +- codec/segmentio/proto/test.pb.go | 12 +- codec/segmentio/proto/test.proto | 2 +- codec/segmentio/proto/test_micro.pb.go | 6 +- codec/segmentio/proto/test_micro_http.pb.go | 10 +- config/consul/consul_test.go | 7 +- config/default_test.go | 4 +- config/vault/vault_test.go | 6 +- flow/flow_test.go | 27 +- flow/generate.go | 4 +- flow/proto/test.pb.go | 85 ++-- flow/proto/test.proto | 52 +-- flow/proto/test_micro.pb.go | 6 +- flow/proto/test_micro_http.pb.go | 30 +- go.mod | 85 ++-- go.sum | 305 +++++++++----- .../victoriametrics/victoriametrics_test.go | 15 +- protoc-gen-go-micro/generate.go | 3 + protoc-gen-go-micro/generate.sh | 11 + .../proto/apidocs.swagger.json | 397 ++++++++++++++++++ .../proto/test.pb.go | 183 ++++---- .../proto/test.proto | 67 ++- .../proto/test_micro.pb.go | 30 +- .../proto/test_micro_http.pb.go | 27 +- protoc-gen-micro/generate.sh | 10 - protoc-gen-micro/proto/apidocs.swagger.json | 180 -------- server/grpc/generate.go | 4 +- server/grpc/gproto/test_micro.pb.go | 18 +- server/grpc/gproto/test_micro_rpc.pb.go | 10 +- server/grpc/grpc_test.go | 30 +- server/grpc/proto/test.pb.go | 55 ++- server/grpc/proto/test.proto | 6 +- server/http/generate.go | 4 +- server/http/handler/github.go | 4 +- server/http/http_test.go | 42 +- server/http/proto/test.pb.go | 111 +++-- server/http/proto/test.proto | 64 +-- server/http/proto/test_micro.pb.go | 6 +- server/http/proto/test_micro_http.pb.go | 35 +- server/http/tools.go | 7 - server/tcp/tcp_test.go | 10 +- service/service_test.go | 9 +- store/store_test.go | 10 +- tools.go | 9 + util/id/id_internal_test.go | 2 +- util/id/id_test.go | 2 +- util/reflect/proto/test.pb.go | 11 +- util/reflect/proto/test.proto | 2 +- util/reflect/reflect_test.go | 6 +- wrapper/breaker/gobreaker/gobreaker_test.go | 9 +- wrapper/breaker/hystrix/hystrix_test.go | 9 +- wrapper/metrics/prometheus/prometheus_test.go | 23 +- wrapper/ratelimiter/juju/ratelimit_test.go | 25 +- wrapper/recovery/recovery_test.go | 22 +- wrapper/sql/wrapper_test.go | 68 ++- wrapper/trace/datadog/datadog_test.go | 18 +- wrapper/trace/opentracing/opentracing_test.go | 23 +- 87 files changed, 1461 insertions(+), 1179 deletions(-) delete mode 100644 client/http/tools.go create mode 100644 protoc-gen-go-micro/generate.go create mode 100755 protoc-gen-go-micro/generate.sh create mode 100644 protoc-gen-go-micro/proto/apidocs.swagger.json rename {protoc-gen-micro => protoc-gen-go-micro}/proto/test.pb.go (67%) rename {protoc-gen-micro => protoc-gen-go-micro}/proto/test.proto (56%) rename {protoc-gen-micro => protoc-gen-go-micro}/proto/test_micro.pb.go (80%) rename {protoc-gen-micro => protoc-gen-go-micro}/proto/test_micro_http.pb.go (85%) delete mode 100755 protoc-gen-micro/generate.sh delete mode 100644 protoc-gen-micro/proto/apidocs.swagger.json delete mode 100644 server/http/tools.go create mode 100644 tools.go diff --git a/api/router/registry_test.go b/api/router/registry_test.go index 995471d..d5e4eb1 100644 --- a/api/router/registry_test.go +++ b/api/router/registry_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/unistack-org/micro/v3/register" + "go.unistack.org/micro/v3/register" ) func TestStoreRegex(t *testing.T) { diff --git a/api/router/router_test.go b/api/router/router_test.go index aff9d32..1ec29be 100644 --- a/api/router/router_test.go +++ b/api/router/router_test.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package router_test @@ -13,30 +14,29 @@ import ( "testing" "time" - rpc "github.com/unistack-org/micro-api-handler-rpc/v3" - rregister "github.com/unistack-org/micro-api-router-register/v3" - rstatic "github.com/unistack-org/micro-api-router-static/v3" - gcli "github.com/unistack-org/micro-client-grpc/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - protocodec "github.com/unistack-org/micro-codec-proto/v3" - regRouter "github.com/unistack-org/micro-router-register/v3" - gsrv "github.com/unistack-org/micro-server-grpc/v3" - gpb "github.com/unistack-org/micro-tests/server/grpc/gproto" - pb "github.com/unistack-org/micro-tests/server/grpc/proto" - "github.com/unistack-org/micro/v3/api" - "github.com/unistack-org/micro/v3/api/handler" - "github.com/unistack-org/micro/v3/api/router" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/register" - rt "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" + rpc "go.unistack.org/micro-api-handler-rpc/v3" + rregister "go.unistack.org/micro-api-router-register/v3" + rstatic "go.unistack.org/micro-api-router-static/v3" + gcli "go.unistack.org/micro-client-grpc/v3" + jsoncodec "go.unistack.org/micro-codec-json/v3" + protocodec "go.unistack.org/micro-codec-proto/v3" + regRouter "go.unistack.org/micro-router-register/v3" + gsrv "go.unistack.org/micro-server-grpc/v3" + gpb "go.unistack.org/micro-tests/server/grpc/gproto" + pb "go.unistack.org/micro-tests/server/grpc/proto" + "go.unistack.org/micro/v3/api" + "go.unistack.org/micro/v3/api/handler" + "go.unistack.org/micro/v3/api/router" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/register" + rt "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" ) // server is used to implement helloworld.GreeterServer. -type testServer struct { -} +type testServer struct{} // TestHello implements helloworld.GreeterServer func (s *testServer) Call(ctx context.Context, req *pb.Request, rsp *pb.Response) error { diff --git a/broker/broker_test.go b/broker/broker_test.go index e304218..9144078 100644 --- a/broker/broker_test.go +++ b/broker/broker_test.go @@ -10,11 +10,12 @@ import ( "time" kg "github.com/twmb/franz-go/pkg/kgo" - kgo "github.com/unistack-org/micro-broker-kgo/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/logger" - "github.com/unistack-org/micro/v3/metadata" + kgo "go.unistack.org/micro-broker-kgo/v3" + jsoncodec "go.unistack.org/micro-codec-json/v3" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/logger" + "go.unistack.org/micro/v3/metadata" ) var ( @@ -43,12 +44,21 @@ func printRate() { fmt.Printf("%0.2f MiB/s; %0.2fk records/s\n", float64(bytes)/(1024*1024), float64(recs)/1000) } +func TestOptionPassing(t *testing.T) { + opts := []client.PublishOption{kgo.ClientPublishKey([]byte(`test`))} + options := client.NewPublishOptions(opts...) + + if !strings.Contains(fmt.Sprintf("%#+v\n", options.Context), "kgo.publishKey") { + t.Fatal("context does not have publish key") + } +} + func TestKgo(t *testing.T) { if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 { t.Skip() } - logger.DefaultLogger.Init(logger.WithLevel(logger.TraceLevel), logger.WithCallerSkipCount(3)) + _ = logger.DefaultLogger.Init(logger.WithLevel(logger.TraceLevel), logger.WithCallerSkipCount(3)) ctx := context.Background() var addrs []string diff --git a/broker/segmentio/broker_test.go b/broker/segmentio/broker_test.go index 2ccec4f..668ffe0 100644 --- a/broker/segmentio/broker_test.go +++ b/broker/segmentio/broker_test.go @@ -13,15 +13,15 @@ import ( "time" "github.com/segmentio/kafka-go" - segmentio "github.com/unistack-org/micro-broker-segmentio/v3" - victoriameter "github.com/unistack-org/micro-meter-victoriametrics/v3" - https "github.com/unistack-org/micro-server-http/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/codec" - "github.com/unistack-org/micro/v3/logger" - "github.com/unistack-org/micro/v3/meter" - meterhandler "github.com/unistack-org/micro/v3/meter/handler" - "github.com/unistack-org/micro/v3/server" + segmentio "go.unistack.org/micro-broker-segmentio/v3" + victoriameter "go.unistack.org/micro-meter-victoriametrics/v3" + https "go.unistack.org/micro-server-http/v3" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/codec" + "go.unistack.org/micro/v3/logger" + "go.unistack.org/micro/v3/meter" + meterhandler "go.unistack.org/micro/v3/meter/handler" + "go.unistack.org/micro/v3/server" ) type lg struct{} @@ -30,12 +30,10 @@ func (l *lg) Printf(format string, args ...interface{}) { // logger.Infof(context.Background(), format, args...) } -var ( - bm = &broker.Message{ - Header: map[string]string{"hkey": "hval"}, - Body: []byte(`"body"`), - } -) +var bm = &broker.Message{ + Header: map[string]string{"hkey": "hval"}, + Body: []byte(`"body"`), +} func TestConsumerGroup(t *testing.T) { topic := "test_topic" @@ -112,7 +110,7 @@ func TestConsumerGroup(t *testing.T) { if err := brk.Publish(ctx, topic, bm); err != nil { t.Fatal(err) } - //log.Printf("publish %d", i) + // log.Printf("publish %d", i) time.Sleep(600 * time.Millisecond) } }() diff --git a/client/client_call_options_test.go b/client/client_call_options_test.go index 8d0de8f..a2b9c16 100644 --- a/client/client_call_options_test.go +++ b/client/client_call_options_test.go @@ -6,17 +6,17 @@ import ( "context" "testing" - "github.com/unistack-org/micro/v3/broker" - bmemory "github.com/unistack-org/micro/v3/broker/memory" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/client/grpc" - tmemory "github.com/unistack-org/micro/v3/network/transport/memory" - rmemory "github.com/unistack-org/micro/v3/register/memory" - "github.com/unistack-org/micro/v3/router" - rtreg "github.com/unistack-org/micro/v3/router/register" - "github.com/unistack-org/micro/v3/server" - grpcsrv "github.com/unistack-org/micro/v3/server/grpc" - cw "github.com/unistack-org/micro/v3/util/client" + "go.unistack.org/micro/v3/broker" + bmemory "go.unistack.org/micro/v3/broker/memory" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/client/grpc" + tmemory "go.unistack.org/micro/v3/network/transport/memory" + rmemory "go.unistack.org/micro/v3/register/memory" + "go.unistack.org/micro/v3/router" + rtreg "go.unistack.org/micro/v3/router/register" + "go.unistack.org/micro/v3/server" + grpcsrv "go.unistack.org/micro/v3/server/grpc" + cw "go.unistack.org/micro/v3/util/client" ) type TestFoo struct { diff --git a/client/drpc/drpc_test.go b/client/drpc/drpc_test.go index caacb69..8c24f11 100644 --- a/client/drpc/drpc_test.go +++ b/client/drpc/drpc_test.go @@ -8,10 +8,10 @@ import ( "net" "testing" - drpc "github.com/unistack-org/micro-client-drpc/v3" - protocodec "github.com/unistack-org/micro-codec-proto/v3" - pb "github.com/unistack-org/micro-tests/client/drpc/proto" - "github.com/unistack-org/micro/v3/client" + drpc "go.unistack.org/micro-client-drpc/v3" + protocodec "go.unistack.org/micro-codec-proto/v3" + pb "go.unistack.org/micro-tests/client/drpc/proto" + "go.unistack.org/micro/v3/client" "storj.io/drpc/drpcmux" "storj.io/drpc/drpcserver" ) diff --git a/client/drpc/proto/test.pb.go b/client/drpc/proto/test.pb.go index 3d36d5b..64540a9 100644 --- a/client/drpc/proto/test.pb.go +++ b/client/drpc/proto/test.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: test.proto @@ -128,11 +128,10 @@ var file_test_proto_rawDesc = []byte{ 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x00, 0x12, 0x27, 0x0a, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x0d, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x00, - 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, - 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, - 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x64, - 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x32, 0x5a, 0x30, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x64, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/client/drpc/proto/test.proto b/client/drpc/proto/test.proto index e870ef3..7e3f751 100644 --- a/client/drpc/proto/test.proto +++ b/client/drpc/proto/test.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/unistack-org/micro-tests/client/drpc/proto;pb"; +option go_package = "go.unistack.org/micro-tests/client/drpc/proto;pb"; package Test; diff --git a/client/drpc/proto/test_micro.pb.go b/client/drpc/proto/test_micro.pb.go index b7ecb0d..64d1c57 100644 --- a/client/drpc/proto/test_micro.pb.go +++ b/client/drpc/proto/test_micro.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" ) var ( diff --git a/client/drpc/proto/test_micro_rpc.pb.go b/client/drpc/proto/test_micro_rpc.pb.go index f40a3a5..3866d04 100644 --- a/client/drpc/proto/test_micro_rpc.pb.go +++ b/client/drpc/proto/test_micro_rpc.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - server "github.com/unistack-org/micro/v3/server" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" + server "go.unistack.org/micro/v3/server" ) type testServiceClient struct { diff --git a/client/grpc/gproto/test_micro.pb.go b/client/grpc/gproto/test_micro.pb.go index 7aae2fc..49c0e32 100644 --- a/client/grpc/gproto/test_micro.pb.go +++ b/client/grpc/gproto/test_micro.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package helloworld import ( context "context" - proto "github.com/unistack-org/micro-tests/client/grpc/proto" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" + proto "go.unistack.org/micro-tests/client/grpc/proto" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" ) var ( diff --git a/client/grpc/gproto/test_micro_rpc.pb.go b/client/grpc/gproto/test_micro_rpc.pb.go index 5abae4a..5c81e50 100644 --- a/client/grpc/gproto/test_micro_rpc.pb.go +++ b/client/grpc/gproto/test_micro_rpc.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package helloworld import ( context "context" - proto "github.com/unistack-org/micro-tests/client/grpc/proto" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - server "github.com/unistack-org/micro/v3/server" + proto "go.unistack.org/micro-tests/client/grpc/proto" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" + server "go.unistack.org/micro/v3/server" ) type testClient struct { diff --git a/client/grpc/grpc_pool_test.go b/client/grpc/grpc_pool_test.go index e7c7d34..dd7eec5 100644 --- a/client/grpc/grpc_pool_test.go +++ b/client/grpc/grpc_pool_test.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package grpc @@ -8,7 +9,7 @@ import ( "testing" "time" - pb "github.com/unistack-org/micro-tests/client/grpc/proto" + pb "go.unistack.org/micro-tests/client/grpc/proto" "google.golang.org/grpc" pgrpc "google.golang.org/grpc" ) diff --git a/client/grpc/grpc_test.go b/client/grpc/grpc_test.go index 81b1d84..bb98b77 100644 --- a/client/grpc/grpc_test.go +++ b/client/grpc/grpc_test.go @@ -8,14 +8,14 @@ import ( "testing" "time" - grpc "github.com/unistack-org/micro-client-grpc/v3" - protocodec "github.com/unistack-org/micro-codec-proto/v3" - regRouter "github.com/unistack-org/micro-router-register/v3" - pb "github.com/unistack-org/micro-tests/client/grpc/proto" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/router" + grpc "go.unistack.org/micro-client-grpc/v3" + protocodec "go.unistack.org/micro-codec-proto/v3" + regRouter "go.unistack.org/micro-router-register/v3" + pb "go.unistack.org/micro-tests/client/grpc/proto" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/router" pgrpc "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -176,5 +176,4 @@ func TestGRPCClient(t *testing.T) { t.Fatalf("invalid msg: %v", rsp) } } - } diff --git a/client/grpc/proto/test.pb.go b/client/grpc/proto/test.pb.go index 05455b8..d8fa034 100644 --- a/client/grpc/proto/test.pb.go +++ b/client/grpc/proto/test.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: test.proto @@ -139,11 +139,11 @@ var file_test_proto_rawDesc = []byte{ 0x12, 0x13, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, - 0x01, 0x42, 0x42, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, - 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, - 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, - 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/client/grpc/proto/test.proto b/client/grpc/proto/test.proto index a380c71..570177f 100644 --- a/client/grpc/proto/test.proto +++ b/client/grpc/proto/test.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package helloworld; -option go_package = "github.com/unistack-org/micro-tests/client/grpc/proto;helloworld"; +option go_package = "go.unistack.org/micro-tests/client/grpc/proto;helloworld"; service Test { rpc Call(Request) returns (Response) {}; diff --git a/client/http/generate.go b/client/http/generate.go index d388138..16dd18a 100644 --- a/client/http/generate.go +++ b/client/http/generate.go @@ -1,3 +1,3 @@ package http -//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro-proto) --go_out=paths=source_relative:./proto --go-micro_out=components='micro|http',debug=true,paths=source_relative:./proto proto/github.proto" +//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go_out=paths=source_relative:./proto --go-micro_out=components='micro|http',debug=true,paths=source_relative:./proto proto/github.proto" diff --git a/client/http/http_test.go b/client/http/http_test.go index f22e443..e97178b 100644 --- a/client/http/http_test.go +++ b/client/http/http_test.go @@ -11,21 +11,19 @@ import ( "net/http" "testing" - mhttp "github.com/unistack-org/micro-client-http/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - rrouter "github.com/unistack-org/micro-router-register/v3" - pb "github.com/unistack-org/micro-tests/client/http/proto" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/codec" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/router" + mhttp "go.unistack.org/micro-client-http/v3" + jsoncodec "go.unistack.org/micro-codec-json/v3" + rrouter "go.unistack.org/micro-router-register/v3" + pb "go.unistack.org/micro-tests/client/http/proto" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/codec" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/router" ) -var ( - defaultHTTPCodecs = map[string]codec.Codec{ - "application/json": jsoncodec.NewCodec(), - } -) +var defaultHTTPCodecs = map[string]codec.Codec{ + "application/json": jsoncodec.NewCodec(), +} type Message struct { Seq int64 @@ -73,7 +71,6 @@ func TestNative(t *testing.T) { if rsp.Name != "Vasiliy Tolstov" { t.Fatalf("invalid rsp received: %#+v\n", rsp) } - } func TestNativeWithoutPath(t *testing.T) { @@ -88,7 +85,6 @@ func TestNativeWithoutPath(t *testing.T) { if rsp.Name != "Vasiliy Tolstov" { t.Fatalf("invalid rsp received: %#+v\n", rsp) } - } func TestHTTPClient(t *testing.T) { diff --git a/client/http/proto/github.pb.go b/client/http/proto/github.pb.go index 3803782..b9e0fba 100644 --- a/client/http/proto/github.pb.go +++ b/client/http/proto/github.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: github.proto package pb import ( - _ "github.com/unistack-org/micro-proto/api" - _ "github.com/unistack-org/micro-proto/openapiv2" + _ "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" @@ -177,7 +177,7 @@ var file_github_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x1a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x33, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x0d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, @@ -188,32 +188,29 @@ var file_github_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x32, 0xca, 0x02, 0x0a, - 0x06, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x12, 0x96, 0x01, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x73, 0x70, 0x22, 0x5a, 0xa2, 0x84, 0x9e, 0x03, 0x3c, 0x2a, 0x0a, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x4a, 0x2e, 0x0a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x21, 0x12, 0x1f, 0x0a, 0x0d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x13, 0x12, 0x11, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x12, 0xa6, 0x01, 0x0a, 0x15, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x57, - 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x15, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x5f, 0xa2, 0x84, 0x9e, 0x03, 0x47, 0x2a, - 0x15, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x6f, - 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4a, 0x2e, 0x0a, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x12, 0x21, 0x12, 0x1f, 0x0a, 0x0d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x0d, 0x12, 0x0b, 0x2f, 0x7b, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, - 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x32, 0x93, 0x02, 0x0a, + 0x06, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x12, 0x7b, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x73, 0x70, 0x22, 0x3f, 0xaa, 0x84, 0x9e, 0x03, 0x21, 0x2a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x42, 0x13, 0x0a, 0x11, 0x12, 0x0f, 0x0a, 0x0d, 0x2e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0xb2, 0xea, 0xff, 0xf9, 0x01, + 0x13, 0x12, 0x11, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8b, 0x01, 0x0a, 0x15, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, + 0x73, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x15, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x44, 0xaa, 0x84, + 0x9e, 0x03, 0x2c, 0x2a, 0x15, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x57, + 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x42, 0x13, 0x0a, 0x11, 0x12, 0x0f, + 0x0a, 0x0d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0xb2, + 0xea, 0xff, 0xf9, 0x01, 0x0d, 0x12, 0x0b, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, + 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/client/http/proto/github.proto b/client/http/proto/github.proto index fee364c..ae3a642 100644 --- a/client/http/proto/github.proto +++ b/client/http/proto/github.proto @@ -4,20 +4,16 @@ package github; option go_package = "github.com//unistack-org/micro-tests/client/http/proto;pb"; import "api/annotations.proto"; -import "openapiv2/annotations.proto"; +import "openapiv3/annotations.proto"; service Github { rpc LookupUser(LookupUserReq) returns (LookupUserRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "LookupUser"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".github.Error"; - }; + default: { + reference: { + _ref: ".github.Error"; }; }; }; @@ -25,16 +21,12 @@ service Github { option (micro.api.http) = { get: "/users/{username}"; }; }; rpc LookupUserWithoutPath(LookupUserReq) returns (LookupUserRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "LookupUserWithoutPath"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".github.Error"; - }; + default: { + reference: { + _ref: ".github.Error"; }; }; }; diff --git a/client/http/proto/github_micro.pb.go b/client/http/proto/github_micro.pb.go index d82bf89..f3de394 100644 --- a/client/http/proto/github_micro.pb.go +++ b/client/http/proto/github_micro.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: github.proto package pb import ( context "context" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" ) var ( diff --git a/client/http/proto/github_micro_http.pb.go b/client/http/proto/github_micro_http.pb.go index 9ed42f4..ed915e9 100644 --- a/client/http/proto/github_micro_http.pb.go +++ b/client/http/proto/github_micro_http.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: github.proto package pb import ( context "context" - v3 "github.com/unistack-org/micro-client-http/v3" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - server "github.com/unistack-org/micro/v3/server" + 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" ) @@ -23,11 +23,6 @@ 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}"), @@ -41,11 +36,6 @@ 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}"), diff --git a/client/http/tools.go b/client/http/tools.go deleted file mode 100644 index ba67cf7..0000000 --- a/client/http/tools.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build tools - -package http - -import ( - _ "github.com/unistack-org/micro-proto/openapiv2" -) diff --git a/codec/codec_test.go b/codec/codec_test.go index 21918c8..0bf56e8 100644 --- a/codec/codec_test.go +++ b/codec/codec_test.go @@ -3,10 +3,10 @@ package codec_test import ( "testing" - grpc "github.com/unistack-org/micro-codec-grpc/v3" - json "github.com/unistack-org/micro-codec-json/v3" - proto "github.com/unistack-org/micro-codec-proto/v3" - "github.com/unistack-org/micro/v3/codec" + grpc "go.unistack.org/micro-codec-grpc/v3" + json "go.unistack.org/micro-codec-json/v3" + proto "go.unistack.org/micro-codec-proto/v3" + "go.unistack.org/micro/v3/codec" ) type testRWC struct{} diff --git a/codec/generate.go b/codec/generate.go index 496e5e9..9f3dd70 100644 --- a/codec/generate.go +++ b/codec/generate.go @@ -1,3 +1,3 @@ package codec -//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro/v3) -I$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro-proto) --go_out=paths=source_relative:./proto --go-micro_out=components='micro|http',debug=true,paths=source_relative:./proto proto/test.proto" +//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro/v3) -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go_out=paths=source_relative:./proto --go-micro_out=components='micro|http',debug=true,paths=source_relative:./proto proto/test.proto" diff --git a/codec/proto/test.pb.go b/codec/proto/test.pb.go index fc8dfae..8e6e71a 100644 --- a/codec/proto/test.pb.go +++ b/codec/proto/test.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: test.proto package pb import ( - codec "github.com/unistack-org/micro/v3/codec" + codec "go.unistack.org/micro/v3/codec" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -29,11 +29,10 @@ var file_test_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x12, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x1a, 0x12, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2e, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x22, 0x00, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, - 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x64, - 0x65, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x61, 0x6d, 0x65, 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, + 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_test_proto_goTypes = []interface{}{ diff --git a/codec/proto/test.proto b/codec/proto/test.proto index 80a490a..8eb0b4c 100644 --- a/codec/proto/test.proto +++ b/codec/proto/test.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package helloworld; -option go_package = "github.com/unistack-org/micro-tests/codec/proto;pb"; +option go_package = "go.unistack.org/micro-tests/codec/proto;pb"; import "codec/frame.proto"; diff --git a/codec/proto/test_micro.pb.go b/codec/proto/test_micro.pb.go index 6b01ca9..73536c4 100644 --- a/codec/proto/test_micro.pb.go +++ b/codec/proto/test_micro.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - codec "github.com/unistack-org/micro/v3/codec" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" + codec "go.unistack.org/micro/v3/codec" ) var ( diff --git a/codec/proto/test_micro_http.pb.go b/codec/proto/test_micro_http.pb.go index 470722d..15e8350 100644 --- a/codec/proto/test_micro_http.pb.go +++ b/codec/proto/test_micro_http.pb.go @@ -1,16 +1,16 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - _ "github.com/unistack-org/micro-client-http/v3" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - codec "github.com/unistack-org/micro/v3/codec" - server "github.com/unistack-org/micro/v3/server" + _ "go.unistack.org/micro-client-http/v3" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" + codec "go.unistack.org/micro/v3/codec" + server "go.unistack.org/micro/v3/server" ) type testClient struct { diff --git a/codec/segmentio/generate.go b/codec/segmentio/generate.go index 1d3391f..64ef86a 100644 --- a/codec/segmentio/generate.go +++ b/codec/segmentio/generate.go @@ -1,4 +1,4 @@ package grpc -//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro-proto) --go_out=paths=source_relative:./proto --go-micro_out=components='micro|http',debug=true,paths=source_relative:./proto proto/test.proto" +//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go_out=paths=source_relative:./proto --go-micro_out=components='micro|http',debug=true,paths=source_relative:./proto proto/test.proto" diff --git a/codec/segmentio/grpc_test.go b/codec/segmentio/grpc_test.go index 89ed756..183feab 100644 --- a/codec/segmentio/grpc_test.go +++ b/codec/segmentio/grpc_test.go @@ -4,19 +4,19 @@ import ( "context" "testing" - gclient "github.com/unistack-org/micro-client-grpc/v3" - // protocodec "github.com/unistack-org/micro-codec-proto/v3" - protocodec "github.com/unistack-org/micro-codec-segmentio/v3/proto" - regRouter "github.com/unistack-org/micro-router-register/v3" - gserver "github.com/unistack-org/micro-server-grpc/v3" - gpb "github.com/unistack-org/micro-tests/server/grpc/gproto" - pb "github.com/unistack-org/micro-tests/server/grpc/proto" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" + gclient "go.unistack.org/micro-client-grpc/v3" + // protocodec "go.unistack.org/micro-codec-proto/v3" + protocodec "go.unistack.org/micro-codec-segmentio/v3/proto" + regRouter "go.unistack.org/micro-router-register/v3" + gserver "go.unistack.org/micro-server-grpc/v3" + gpb "go.unistack.org/micro-tests/server/grpc/gproto" + pb "go.unistack.org/micro-tests/server/grpc/proto" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" ) type testServer struct { diff --git a/codec/segmentio/proto/test.pb.go b/codec/segmentio/proto/test.pb.go index 0885f5e..fa8a9ab 100644 --- a/codec/segmentio/proto/test.pb.go +++ b/codec/segmentio/proto/test.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: test.proto @@ -135,11 +135,11 @@ var file_test_proto_rawDesc = []byte{ 0x74, 0x12, 0x33, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x13, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, - 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6f, - 0x64, 0x65, 0x63, 0x2f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, + 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2f, 0x73, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/codec/segmentio/proto/test.proto b/codec/segmentio/proto/test.proto index d19c181..93e36ee 100644 --- a/codec/segmentio/proto/test.proto +++ b/codec/segmentio/proto/test.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package helloworld; -option go_package = "github.com/unistack-org/micro-tests/codec/segmentio/proto;pb"; +option go_package = "go.unistack.org/micro-tests/codec/segmentio/proto;pb"; service Test { rpc Call(Request) returns (Response) {} diff --git a/codec/segmentio/proto/test_micro.pb.go b/codec/segmentio/proto/test_micro.pb.go index 63ca8e7..dba20c9 100644 --- a/codec/segmentio/proto/test_micro.pb.go +++ b/codec/segmentio/proto/test_micro.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" ) var ( diff --git a/codec/segmentio/proto/test_micro_http.pb.go b/codec/segmentio/proto/test_micro_http.pb.go index 08fca75..a335999 100644 --- a/codec/segmentio/proto/test_micro_http.pb.go +++ b/codec/segmentio/proto/test_micro_http.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - _ "github.com/unistack-org/micro-client-http/v3" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - server "github.com/unistack-org/micro/v3/server" + _ "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" ) type testClient struct { diff --git a/config/consul/consul_test.go b/config/consul/consul_test.go index e3b1650..eccd93f 100644 --- a/config/consul/consul_test.go +++ b/config/consul/consul_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - consul "github.com/unistack-org/micro-config-consul/v3" - "github.com/unistack-org/micro/v3/config" + jsoncodec "go.unistack.org/micro-codec-json/v3" + consul "go.unistack.org/micro-config-consul/v3" + "go.unistack.org/micro/v3/config" ) type Cfg struct { @@ -84,5 +84,4 @@ func TestWatch(t *testing.T) { }() <-done - } diff --git a/config/default_test.go b/config/default_test.go index ccfca89..69251cb 100644 --- a/config/default_test.go +++ b/config/default_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - envconfig "github.com/unistack-org/micro-config-env/v3" - "github.com/unistack-org/micro/v3/config" + envconfig "go.unistack.org/micro-config-env/v3" + "go.unistack.org/micro/v3/config" ) type Config struct { diff --git a/config/vault/vault_test.go b/config/vault/vault_test.go index 3029b71..969dd90 100644 --- a/config/vault/vault_test.go +++ b/config/vault/vault_test.go @@ -6,9 +6,9 @@ import ( "os" "testing" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - vault "github.com/unistack-org/micro-config-vault/v3" - "github.com/unistack-org/micro/v3/config" + jsoncodec "go.unistack.org/micro-codec-json/v3" + vault "go.unistack.org/micro-config-vault/v3" + "go.unistack.org/micro/v3/config" ) type Config struct { diff --git a/flow/flow_test.go b/flow/flow_test.go index deac080..93aaa17 100644 --- a/flow/flow_test.go +++ b/flow/flow_test.go @@ -6,19 +6,19 @@ import ( "testing" "time" - httpcli "github.com/unistack-org/micro-client-http/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - jsonpbcodec "github.com/unistack-org/micro-codec-jsonpb/v3" - httpsrv "github.com/unistack-org/micro-server-http/v3" - pb "github.com/unistack-org/micro-tests/flow/proto" - "github.com/unistack-org/micro/v3" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/flow" - "github.com/unistack-org/micro/v3/logger" - "github.com/unistack-org/micro/v3/meter" - "github.com/unistack-org/micro/v3/server" - "github.com/unistack-org/micro/v3/store" - "github.com/unistack-org/micro/v3/tracer" + httpcli "go.unistack.org/micro-client-http/v3" + jsoncodec "go.unistack.org/micro-codec-json/v3" + jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v3" + httpsrv "go.unistack.org/micro-server-http/v3" + pb "go.unistack.org/micro-tests/flow/proto" + "go.unistack.org/micro/v3" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/flow" + "go.unistack.org/micro/v3/logger" + "go.unistack.org/micro/v3/meter" + "go.unistack.org/micro/v3/server" + "go.unistack.org/micro/v3/store" + "go.unistack.org/micro/v3/tracer" ) type handler struct{} @@ -139,5 +139,4 @@ func TestFlow(t *testing.T) { } _ = keys t.Logf("execution id: %s, result: %v", id, err) - } diff --git a/flow/generate.go b/flow/generate.go index 189a1b8..ec07340 100644 --- a/flow/generate.go +++ b/flow/generate.go @@ -1,5 +1,5 @@ package flow -//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro-proto) --go_out=paths=source_relative:./proto proto/test.proto" +//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go_out=paths=source_relative:./proto proto/test.proto" -//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro-proto) --go-micro_out=components='micro|http',debug=true,tag_path=./proto,paths=source_relative:./proto proto/test.proto" +//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go-micro_out=components='micro|http',debug=true,tag_path=./proto,paths=source_relative:./proto proto/test.proto" diff --git a/flow/proto/test.pb.go b/flow/proto/test.pb.go index b7aeaa2..f9b00c1 100644 --- a/flow/proto/test.pb.go +++ b/flow/proto/test.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: test.proto package pb import ( - _ "github.com/unistack-org/micro-proto/api" - _ "github.com/unistack-org/micro-proto/openapiv2" + _ "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" @@ -433,7 +433,7 @@ var file_test_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x70, 0x69, 0x76, 0x33, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x21, 0x0a, 0x0b, 0x4d, 0x61, 0x69, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x25, 0x0a, 0x0b, 0x4d, 0x61, 0x69, @@ -452,50 +452,43 @@ var file_test_proto_rawDesc = []byte{ 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x19, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0xf4, 0x04, 0x0a, 0x0b, 0x54, 0x65, - 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x0a, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x73, 0x70, 0x22, 0x5e, 0xa2, 0x84, 0x9e, 0x03, 0x3a, 0x2a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x55, 0x73, 0x65, 0x72, 0x4a, 0x2c, 0x0a, 0x2a, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x12, 0x1f, 0x12, 0x1d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, - 0x08, 0x05, 0x12, 0x99, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x61, 0xa2, 0x84, 0x9e, - 0x03, 0x3a, 0x2a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4a, 0x2c, - 0x0a, 0x2a, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x12, 0x1d, 0x0a, - 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, - 0x01, 0x14, 0x1a, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x96, - 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x5e, 0xa2, 0x84, 0x9e, 0x03, 0x3a, 0x2a, 0x0a, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4a, 0x2c, 0x0a, 0x2a, 0x0a, 0x07, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x12, 0x1d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x11, 0x2a, 0x0f, - 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0xba, - 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x96, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x69, 0x6c, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x61, 0x69, 0x6c, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, - 0x61, 0x69, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x64, 0xa2, 0x84, 0x9e, 0x03, - 0x38, 0x2a, 0x08, 0x4d, 0x61, 0x69, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4a, 0x2c, 0x0a, 0x2a, 0x0a, - 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x12, 0x1d, 0x0a, 0x0b, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x19, 0x22, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0x84, 0x04, 0x0a, 0x0b, 0x54, 0x65, + 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, + 0x70, 0x22, 0x43, 0xaa, 0x84, 0x9e, 0x03, 0x1f, 0x2a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, + 0x55, 0x73, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x12, 0x0d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x11, 0x12, 0x0f, 0x2f, + 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0xba, 0xea, + 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x7e, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x46, + 0xaa, 0x84, 0x9e, 0x03, 0x1f, 0x2a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x12, 0x0d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x14, 0x1a, 0x0f, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, + 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x7b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x43, + 0xaa, 0x84, 0x9e, 0x03, 0x1f, 0x2a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x12, 0x0d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x11, 0x2a, 0x0f, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0xba, 0xea, 0xff, 0xf9, 0x01, + 0x02, 0x08, 0x05, 0x12, 0x7b, 0x0a, 0x08, 0x4d, 0x61, 0x69, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x11, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x61, 0x69, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x61, 0x69, 0x6c, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x49, 0xaa, 0x84, 0x9e, 0x03, 0x1d, 0x2a, 0x08, 0x4d, 0x61, + 0x69, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x12, 0x0d, 0x0a, 0x0b, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x61, 0x69, 0x6c, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, - 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, - 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, - 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, + 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/flow/proto/test.proto b/flow/proto/test.proto index f763925..7052bc6 100644 --- a/flow/proto/test.proto +++ b/flow/proto/test.proto @@ -2,26 +2,22 @@ syntax = "proto3"; package test; -option go_package = "github.com/unistack-org/micro-tests/flow/proto;pb"; +option go_package = "go.unistack.org/micro-tests/flow/proto;pb"; //import "tag/tag.proto"; import "api/annotations.proto"; -import "openapiv2/annotations.proto"; +import "openapiv3/annotations.proto"; //import "google/protobuf/wrappers.proto"; service TestService { //option (micro.api.micro_service) = { client_wrappers: ["one","two"]; }; rpc LookupUser(LookupUserReq) returns (LookupUserRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "LookupUser"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; @@ -30,16 +26,12 @@ service TestService { option (micro.api.micro_method) = { timeout: 5; }; }; rpc UpdateUser(UpdateUserReq) returns (UpdateUserRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "UpdateUser"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; @@ -48,16 +40,12 @@ service TestService { option (micro.api.micro_method) = { timeout: 5; }; }; rpc DeleteUser(DeleteUserReq) returns (DeleteUserRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "DeleteUser"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; @@ -66,16 +54,12 @@ service TestService { option (micro.api.micro_method) = { timeout: 5; }; }; rpc MailUser(MailUserReq) returns (MailUserRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "MailUser"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; diff --git a/flow/proto/test_micro.pb.go b/flow/proto/test_micro.pb.go index d004111..17bf334 100644 --- a/flow/proto/test_micro.pb.go +++ b/flow/proto/test_micro.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" ) var ( diff --git a/flow/proto/test_micro_http.pb.go b/flow/proto/test_micro_http.pb.go index 4339526..f1660b7 100644 --- a/flow/proto/test_micro_http.pb.go +++ b/flow/proto/test_micro_http.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - v3 "github.com/unistack-org/micro-client-http/v3" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - server "github.com/unistack-org/micro/v3/server" + 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" time "time" ) @@ -24,11 +24,6 @@ func NewTestServiceClient(name string, c client.Client) TestServiceClient { } func (c *testServiceClient) 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("/v1/user/{name}"), @@ -43,11 +38,6 @@ func (c *testServiceClient) LookupUser(ctx context.Context, req *LookupUserReq, } func (c *testServiceClient) UpdateUser(ctx context.Context, req *UpdateUserReq, opts ...client.CallOption) (*UpdateUserRsp, error) { - errmap := make(map[string]interface{}, 1) - errmap["default"] = &Error{} - opts = append(opts, - v3.ErrorMap(errmap), - ) opts = append(opts, v3.Method(http.MethodPut), v3.Path("/v1/user/{name}"), @@ -63,11 +53,6 @@ func (c *testServiceClient) UpdateUser(ctx context.Context, req *UpdateUserReq, } func (c *testServiceClient) DeleteUser(ctx context.Context, req *DeleteUserReq, opts ...client.CallOption) (*DeleteUserRsp, error) { - errmap := make(map[string]interface{}, 1) - errmap["default"] = &Error{} - opts = append(opts, - v3.ErrorMap(errmap), - ) opts = append(opts, v3.Method(http.MethodDelete), v3.Path("/v1/user/{name}"), @@ -82,11 +67,6 @@ func (c *testServiceClient) DeleteUser(ctx context.Context, req *DeleteUserReq, } func (c *testServiceClient) MailUser(ctx context.Context, req *MailUserReq, opts ...client.CallOption) (*MailUserRsp, 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/user/{name}/mail"), diff --git a/go.mod b/go.mod index 2d6a52a..8ce9a7e 100644 --- a/go.mod +++ b/go.mod @@ -1,61 +1,42 @@ -module github.com/unistack-org/micro-tests +module go.unistack.org/micro-tests go 1.16 +replace go.unistack.org/micro-wrapper-sql/v3 => ../micro-wrapper-sql + require ( - github.com/VictoriaMetrics/metrics v1.17.3 // indirect - github.com/armon/go-metrics v0.3.9 // indirect - github.com/fatih/color v1.12.0 // indirect - github.com/hashicorp/consul/api v1.9.1 // indirect - github.com/hashicorp/go-hclog v0.16.2 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/klauspost/cpuid/v2 v2.0.9 // indirect - github.com/mattn/go-isatty v0.0.13 // indirect - github.com/miekg/dns v1.1.38 // indirect + github.com/jmoiron/sqlx v1.3.4 github.com/opentracing/opentracing-go v1.2.0 - github.com/segmentio/kafka-go v0.4.20 + github.com/segmentio/kafka-go v0.4.22 github.com/stretchr/testify v1.7.0 - github.com/twmb/franz-go v1.1.1 - github.com/unistack-org/micro-broker-kgo/v3 v3.7.3 - github.com/unistack-org/micro-broker-segmentio/v3 v3.4.3-0.20210804134048-7916dafb4dfe - //github.com/unistack-org/micro-client-drpc/v3 v3.0.0-00010101000000-000000000000 - github.com/unistack-org/micro-client-grpc/v3 v3.7.8 - github.com/unistack-org/micro-client-http/v3 v3.7.3 - github.com/unistack-org/micro-codec-grpc/v3 v3.7.4 - github.com/unistack-org/micro-codec-json/v3 v3.7.8 - github.com/unistack-org/micro-codec-jsonpb/v3 v3.7.5 - github.com/unistack-org/micro-codec-proto/v3 v3.7.4 - github.com/unistack-org/micro-codec-segmentio/v3 v3.7.5 - github.com/unistack-org/micro-codec-urlencode/v3 v3.7.4 - github.com/unistack-org/micro-codec-xml/v3 v3.7.5 - github.com/unistack-org/micro-config-consul/v3 v3.6.0 - github.com/unistack-org/micro-config-env/v3 v3.5.0 - github.com/unistack-org/micro-config-vault/v3 v3.5.0 - github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.3 - github.com/unistack-org/micro-proto v0.0.9 - github.com/unistack-org/micro-router-register/v3 v3.7.8 - github.com/unistack-org/micro-server-grpc/v3 v3.7.4 - github.com/unistack-org/micro-server-http/v3 v3.7.6 - github.com/unistack-org/micro-server-tcp/v3 v3.3.2 - github.com/unistack-org/micro-wrapper-recovery/v3 v3.0.0 - github.com/unistack-org/micro-wrapper-trace-opentracing/v3 v3.3.0 - github.com/unistack-org/micro/v3 v3.7.8 - golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 // indirect - golang.org/x/sys v0.0.0-20210930212924-f542c8878de8 // indirect - golang.org/x/text v0.3.7 // indirect - google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3 - google.golang.org/grpc v1.41.0 + github.com/twmb/franz-go v1.2.2 + go.unistack.org/micro-broker-kgo/v3 v3.8.1 + go.unistack.org/micro-broker-segmentio/v3 v3.8.0 + go.unistack.org/micro-client-grpc/v3 v3.8.0 + go.unistack.org/micro-client-http/v3 v3.8.1 + go.unistack.org/micro-codec-grpc/v3 v3.8.1 + go.unistack.org/micro-codec-json/v3 v3.8.0 + go.unistack.org/micro-codec-jsonpb/v3 v3.8.1 + go.unistack.org/micro-codec-proto/v3 v3.8.1 + go.unistack.org/micro-codec-segmentio/v3 v3.8.1 + go.unistack.org/micro-codec-urlencode/v3 v3.8.1 + go.unistack.org/micro-codec-xml/v3 v3.8.1 + go.unistack.org/micro-config-consul/v3 v3.8.0 + go.unistack.org/micro-config-env/v3 v3.8.1 + go.unistack.org/micro-config-vault/v3 v3.8.1 + go.unistack.org/micro-meter-victoriametrics/v3 v3.8.2 + go.unistack.org/micro-proto/v3 v3.1.0 + go.unistack.org/micro-router-register/v3 v3.8.1 + go.unistack.org/micro-server-grpc/v3 v3.8.0 + go.unistack.org/micro-server-http/v3 v3.8.1 + go.unistack.org/micro-server-tcp/v3 v3.8.0 + go.unistack.org/micro-wrapper-recovery/v3 v3.8.0 + go.unistack.org/micro-wrapper-sql/v3 v3.0.0-00010101000000-000000000000 + go.unistack.org/micro-wrapper-trace-opentracing/v3 v3.8.0 + go.unistack.org/micro/v3 v3.8.5 + google.golang.org/grpc v1.40.0 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 // indirect google.golang.org/protobuf v1.27.1 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + modernc.org/sqlite v1.13.3 storj.io/drpc v0.0.26 ) - -//replace github.com/unistack-org/micro-wrapper-trace-opentracing/v3 => ../micro-wrapper-trace-opentracing -//replace github.com/unistack-org/micro-client-grpc/v3 => ../micro-client-grpc -//replace github.com/unistack-org/micro-server-grpc/v3 => ../micro-server-grpc -//replace github.com/unistack-org/micro-server-http/v3 => ../micro-server-http -//replace github.com/unistack-org/micro-client-http/v3 => ../micro-client-http -//replace github.com/unistack-org/micro-client-drpc/v3 => ../micro-client-drpc -//replace github.com/unistack-org/micro-broker-segmentio/v3 => ../micro-broker-segmentio -//replace github.com/unistack-org/micro-proto => ../micro-proto diff --git a/go.sum b/go.sum index fac3a88..593016e 100644 --- a/go.sum +++ b/go.sum @@ -7,9 +7,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/VictoriaMetrics/metrics v1.17.2/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE= -github.com/VictoriaMetrics/metrics v1.17.3 h1:QPUakR6JRy8BhL2C2kOgYKLuoPDwtJQ+7iKIZSjt1A4= -github.com/VictoriaMetrics/metrics v1.17.3/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE= +github.com/VictoriaMetrics/metrics v1.18.0 h1:vov5NxDHRSXFbdiH4dYLYEjKLoAXXSQ7hcnG8TSD9JQ= +github.com/VictoriaMetrics/metrics v1.18.0/go.mod h1:ArjwVz7WpgpegX/JpB0zpNF2h2232kErkEnzH1sxMmA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -41,7 +40,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -57,12 +55,13 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20200319182547-c7ad2b866182/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/ef-ds/deque v1.0.4/go.mod h1:gXDnTC3yqvBcHbq2lcExjtAcVrOnJCbMcZXmuj8Z4tg= @@ -71,12 +70,11 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= @@ -90,6 +88,7 @@ github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= @@ -99,9 +98,6 @@ github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -121,33 +117,30 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= -github.com/hashicorp/consul/api v1.9.1 h1:SngrdG2L62qqLsUz85qcPhFZ78rPf8tcD5qjMgs6MME= -github.com/hashicorp/consul/api v1.9.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/consul/api v1.11.0 h1:Hw/G8TtRvOElqxVIhBzXciiSTbapq8hZ2XKZsXk5ZCE= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -226,20 +219,22 @@ github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aW github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmoiron/sqlx v1.3.4 h1:wv+0IJZfL5z0uZoUjlpKgHkgaFSYD+r9CfrXjEXsO7w= +github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -250,23 +245,28 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= -github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU= +github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26 h1:gPxPSwALAeHJSjarOs00QjVdV9QoBvc1D2ujQUr5BzU= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.38 h1:MtIY+fmHUVVgv1AXzmKMWcwdCYxTRPG1EDjpqF4RCEw= -github.com/miekg/dns v1.1.38/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -279,8 +279,9 @@ github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUb github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -338,6 +339,8 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -349,10 +352,8 @@ github.com/segmentio/asm v1.0.1 h1:g9VK62hXylgXI4yJV+dLTu/1j7kTxG9bkUSYBxL9dpg= github.com/segmentio/asm v1.0.1/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= github.com/segmentio/encoding v0.2.21 h1:hlRQz3Pv+/mBj+jqr46TVqqv6AuTwvP5aAxQ0Usd4gY= github.com/segmentio/encoding v0.2.21/go.mod h1:kF1db1oBuYxMvLR3RXrZJchRdBKrS+1J/hL63p5hekI= -github.com/segmentio/kafka-go v0.4.17/go.mod h1:19+Eg7KwrNKy/PFhiIthEPkO8k+ac7/ZYXwYM9Df10w= -github.com/segmentio/kafka-go v0.4.20 h1:bcsboEoRXydZQL1cbd5ziPSwek2vOpR6PniYurFjOdg= -github.com/segmentio/kafka-go v0.4.20/go.mod h1:19+Eg7KwrNKy/PFhiIthEPkO8k+ac7/ZYXwYM9Df10w= -github.com/silas/dag v0.0.0-20210121180416-41cf55125c34/go.mod h1:7RTUFBdIRC9nZ7/3RyRNH1bdqIShrDejd1YbLwgPS+I= +github.com/segmentio/kafka-go v0.4.22 h1:F4k2OTm9Y4+zliuoXgNKJZTktE0miQioZZzofsjhRdk= +github.com/segmentio/kafka-go v0.4.22/go.mod h1:XzMcoMjSzDGHcIwpWUI7GB43iKZ2fTVmryPSGLf/MPg= github.com/silas/dag v0.0.0-20210626123444-3804bac2d6d4 h1:fOH64AB0C3ixGf9emky61STvPJL3smxJg+1Zwx1oCdg= github.com/silas/dag v0.0.0-20210626123444-3804bac2d6d4/go.mod h1:7RTUFBdIRC9nZ7/3RyRNH1bdqIShrDejd1YbLwgPS+I= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -374,81 +375,25 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/twmb/franz-go v1.1.0/go.mod h1:KerrVhzNpasYrWJLr2Yj6Cui43f1BxH4U9SJEDVOjqQ= -github.com/twmb/franz-go v1.1.1 h1:XR3JGvsRlvvTPakMcsW8vkubaHdtR4Vwy1RTiiiFshs= -github.com/twmb/franz-go v1.1.1/go.mod h1:KerrVhzNpasYrWJLr2Yj6Cui43f1BxH4U9SJEDVOjqQ= +github.com/twmb/franz-go v1.1.2/go.mod h1:KerrVhzNpasYrWJLr2Yj6Cui43f1BxH4U9SJEDVOjqQ= +github.com/twmb/franz-go v1.2.2 h1:Nv+Fb6eUklF8pB8VhDZm0RJ9diaRw9nQybcl+livhI8= +github.com/twmb/franz-go v1.2.2/go.mod h1:KerrVhzNpasYrWJLr2Yj6Cui43f1BxH4U9SJEDVOjqQ= github.com/twmb/franz-go/pkg/kmsg v0.0.0-20210914042331-106aef61b693/go.mod h1:SxG/xJKhgPu25SamAq0rrucfp7lbzCpEXOC+vH/ELrY= -github.com/twmb/franz-go/pkg/kmsg v0.0.0-20210914174821-2f676c0a574b h1:7d6eRt9HEqXVxMzD2fry9qtJ0kRkgeJ5olqW9K+aXv8= -github.com/twmb/franz-go/pkg/kmsg v0.0.0-20210914174821-2f676c0a574b/go.mod h1:SxG/xJKhgPu25SamAq0rrucfp7lbzCpEXOC+vH/ELrY= +github.com/twmb/franz-go/pkg/kmsg v0.0.0-20210930203137-7fbfd17de279 h1:58GX0Ju/PCG1zWVdsLEE5OUu70KlfOrxY7djPszuqiw= +github.com/twmb/franz-go/pkg/kmsg v0.0.0-20210930203137-7fbfd17de279/go.mod h1:SxG/xJKhgPu25SamAq0rrucfp7lbzCpEXOC+vH/ELrY= github.com/twmb/go-rbtree v1.0.0 h1:KxN7dXJ8XaZ4cvmHV1qqXTshxX3EBvX/toG5+UR49Mg= github.com/twmb/go-rbtree v1.0.0/go.mod h1:UlIAI8gu3KRPkXSobZnmJfVwCJgEhD/liWzT5ppzIyc= -github.com/unistack-org/micro-broker-kgo/v3 v3.7.3 h1:i7BQFPlMgTuer/3KG+OgcxYmlDWXWNHB6oUBJEaPOq8= -github.com/unistack-org/micro-broker-kgo/v3 v3.7.3/go.mod h1:7hRX0VK2Gspja0blI/uv7IVLdzMcr6CsP8rnRGkWLBg= -github.com/unistack-org/micro-broker-segmentio/v3 v3.4.3-0.20210804134048-7916dafb4dfe h1:uhXdevTWfyH83V9X56obz467ddVO9VIl/qhCRrN6MWw= -github.com/unistack-org/micro-broker-segmentio/v3 v3.4.3-0.20210804134048-7916dafb4dfe/go.mod h1:YlRoI+1nS7q5TyHLn+wBc7qqhUy4tFkAFJKtyyoVnmQ= -github.com/unistack-org/micro-client-grpc/v3 v3.7.8 h1:CWC1pklE9knS0qbknQWd+a5kB0Rs0gya6vWpHl2Y1rw= -github.com/unistack-org/micro-client-grpc/v3 v3.7.8/go.mod h1:sjC75XC53KvWD3dp+p6V1wzGeT1d5UwEjLXV8U9DcYI= -github.com/unistack-org/micro-client-http/v3 v3.7.3 h1:wh1tBHvz9Do8NSsAkMSr5bJoQ9BRU/293x3AIo7+1yw= -github.com/unistack-org/micro-client-http/v3 v3.7.3/go.mod h1:85Tmhu2obcfA+IYTF2iZA5nfuOdOc7FK3vdzxYzIF34= -github.com/unistack-org/micro-codec-grpc/v3 v3.7.4 h1:/UcqUHvyEnltkxJhcV0Ryiez5I/M5zcExgAiTekWhs0= -github.com/unistack-org/micro-codec-grpc/v3 v3.7.4/go.mod h1:p9LYM1uFTUIr7n2ZTUjKwknnWD6fOcGDdojbjIAXalQ= -github.com/unistack-org/micro-codec-json/v3 v3.7.7/go.mod h1:Gk0pKcPu1nf9jmSjuyn8yehaIpJsx8AqD+hh69OzWlI= -github.com/unistack-org/micro-codec-json/v3 v3.7.8 h1:SyLSsVwBd8zua/jOEEc5lwr4Sg03lAMOAduWeQG18ms= -github.com/unistack-org/micro-codec-json/v3 v3.7.8/go.mod h1:CDsPCSrehY38kRykTvjCncqMfXFhwpGLiPPjSBjC6e8= -github.com/unistack-org/micro-codec-jsonpb/v3 v3.7.5 h1:pSiCUeBqZlSFkmkArmp1XEgXSWFSi1Ny4tdNnPV4xZE= -github.com/unistack-org/micro-codec-jsonpb/v3 v3.7.5/go.mod h1:dNCg88s7bm0ekYR316IietEzrMcogKfMYt9P2VJ61FY= -github.com/unistack-org/micro-codec-proto/v3 v3.7.4 h1:rj90bweyp7Ds8Jh6s+ObKIZ4yULLBezwxBigZVgqzyU= -github.com/unistack-org/micro-codec-proto/v3 v3.7.4/go.mod h1:Id4UEQe5e/qEffvj8I7if8/GT9uew29PV9Uzp0swaV4= -github.com/unistack-org/micro-codec-segmentio/v3 v3.7.5 h1:XaMWwFLAdkIO6Dyn4eFOzkYSSa4V7ZV+kpsebOTXyks= -github.com/unistack-org/micro-codec-segmentio/v3 v3.7.5/go.mod h1:jVxL9FA2M1qiSc99RVoK4u73a6zvjHghjfZm7u4pU+c= -github.com/unistack-org/micro-codec-urlencode/v3 v3.7.4 h1:hCBaqskrFSUk7lapC7IZn8xhr5XYCt65cE9dIBrBwp4= -github.com/unistack-org/micro-codec-urlencode/v3 v3.7.4/go.mod h1:XTVxbYnj++tQpoX3G2CuR5TbBcJJfMYXHdIYM2XVx3M= -github.com/unistack-org/micro-codec-xml/v3 v3.7.5 h1:PZru4J954v+VSfAXGje7ZgeVQy2/EppTgPR4IlbKvao= -github.com/unistack-org/micro-codec-xml/v3 v3.7.5/go.mod h1:PRBPQQd1ABE/Hq5ceoAD1E7QnXOXXKJLcCFDMz4eWTs= -github.com/unistack-org/micro-config-consul/v3 v3.6.0 h1:RZZO+l6sQ3PqTb9uOJC0lGC/Ady+9Ag+05or3I1XbOA= -github.com/unistack-org/micro-config-consul/v3 v3.6.0/go.mod h1:Z+xhwFxTXdCofL6Qa7NeKMGt8GrXDUNeKyRMBJbtUAg= -github.com/unistack-org/micro-config-env/v3 v3.5.0 h1:MNDQ0oxB+Gh2cwfGsUqZIAzlocv/lsw9IHYO2naksyU= -github.com/unistack-org/micro-config-env/v3 v3.5.0/go.mod h1:+op0d+FbHFWcvRQxvKVV78D5Iu1ZxhmdVq8rpumyl8Y= -github.com/unistack-org/micro-config-vault/v3 v3.5.0 h1:tH0Bin7axMir2rmiocQ92qAlhTjezsVAL7qUlDN64uY= -github.com/unistack-org/micro-config-vault/v3 v3.5.0/go.mod h1:GJKV/gu55BWq3eCNwoZ4pDcGxuNvWs/3Glz5VXQCSAc= -github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.3 h1:eKe0IjMm5e02rkhALo1FcG6UxYKOsJ5HU1loGKAUyPs= -github.com/unistack-org/micro-meter-victoriametrics/v3 v3.3.3/go.mod h1:cDz4YigqJ3e3/2A8ze5SdJA8Z7KJf/s0VlIA6w97EHw= -github.com/unistack-org/micro-proto v0.0.5/go.mod h1:EuI7UlfGXmT1hy6WacULib9LbNgRnDYQvTCFoLgKM2I= -github.com/unistack-org/micro-proto v0.0.9 h1:KrWLS4FUX7UAWNAilQf70uad6ZPf/0EudeddCXllRVc= github.com/unistack-org/micro-proto v0.0.9/go.mod h1:Cckwmzd89gvS7ThxzZp9kQR/EOdksFQcsTAtDDyKwrg= -github.com/unistack-org/micro-router-register/v3 v3.7.8 h1:fBzYxrdGLigrN/Gdy59IOhIyTvtEH/P9Ya4mCRZ2Kbk= -github.com/unistack-org/micro-router-register/v3 v3.7.8/go.mod h1:uTHaE3sxBePOQ9HTs95xxAnaKqQI34eVFQuKVVPScnA= -github.com/unistack-org/micro-server-grpc/v3 v3.7.4 h1:1f31ngLwuLvpujc90CUkOJvDotXzSYCKyAGxReX5Cio= -github.com/unistack-org/micro-server-grpc/v3 v3.7.4/go.mod h1:EmzcCtRq0MFBt0v/GZ8uR5dBZChKYwkQPVcbkojnZAE= -github.com/unistack-org/micro-server-http/v3 v3.7.6 h1:Wf9xZCKrcyrJX6U5gw3RRwprbVbg4OqFrX3YQDqE/1w= -github.com/unistack-org/micro-server-http/v3 v3.7.6/go.mod h1:2FOvrJMqzUxqgA2q9wvTEzaxYDzxH/EOrmbwA7tO2iQ= -github.com/unistack-org/micro-server-tcp/v3 v3.3.2 h1:x5FjxOuI61Jy6OzgCWElCRCWP9NffGNWajz/WJPEzdQ= -github.com/unistack-org/micro-server-tcp/v3 v3.3.2/go.mod h1:981+kGQT3Js2LJrNaI2AyP/NcbnL7GU8WTnlRxj07Ao= -github.com/unistack-org/micro-wrapper-recovery/v3 v3.0.0 h1:g3V56WCzzQE9SKxRSygFQ3gtjxRH6Hnl/FfyMxiPmW0= -github.com/unistack-org/micro-wrapper-recovery/v3 v3.0.0/go.mod h1:pclgUgRdNAPmsWiBlbcf0J7BQnrycGUV7UGjhOL6jVY= -github.com/unistack-org/micro-wrapper-trace-opentracing/v3 v3.3.0 h1:2l//2Ej+CpmfHOdvQTnFjFM/a2MduA0YOFiL7tPs/Qw= -github.com/unistack-org/micro-wrapper-trace-opentracing/v3 v3.3.0/go.mod h1:2NX5VQ2NV6GZVs3d5WypcBkuu/ybUuoMUnL5yWXEtIM= -github.com/unistack-org/micro/v3 v3.3.17/go.mod h1:022EOEZZ789hZY3yB5ZSMXU6jLiadBgcNB/cpediV3c= -github.com/unistack-org/micro/v3 v3.4.11/go.mod h1:1ZkwpEqpiHiVhM2hiF9DamtpsF04oFybFhEQ4zEMcro= -github.com/unistack-org/micro/v3 v3.5.6/go.mod h1:P8k8nuM0RYUdX6TNxO4yzq3tjtrvh11trhr79zWYeTM= -github.com/unistack-org/micro/v3 v3.5.9/go.mod h1:zQnZPEy842kQNcyjmVys6tdMjty4PHdyUUKYm1wrg1s= -github.com/unistack-org/micro/v3 v3.6.0/go.mod h1:zQnZPEy842kQNcyjmVys6tdMjty4PHdyUUKYm1wrg1s= -github.com/unistack-org/micro/v3 v3.6.2/go.mod h1:X8UIH1JK4/jYN/CtvxJ6d+HrfqzmoVQc1no8Homy+ww= -github.com/unistack-org/micro/v3 v3.7.1/go.mod h1:gBoY6gvzeFiJTZ4FgDttGNSs4Y1+1PRg2cV1yTRMSlg= -github.com/unistack-org/micro/v3 v3.7.3/go.mod h1:78vy7ggElJD+ayx8ruhJsY+SkGUupfR32LXrg1UObvg= -github.com/unistack-org/micro/v3 v3.7.4/go.mod h1:78vy7ggElJD+ayx8ruhJsY+SkGUupfR32LXrg1UObvg= -github.com/unistack-org/micro/v3 v3.7.6/go.mod h1:Ke/8WJlNZi4ZYwL9HcsANAbQ66/HocTBEZM+od99/mM= -github.com/unistack-org/micro/v3 v3.7.8 h1:ytrJhomev32w5QdZ53G6uINHh9XDV6t6MyDz4p9b84c= -github.com/unistack-org/micro/v3 v3.7.8/go.mod h1:Ke/8WJlNZi4ZYwL9HcsANAbQ66/HocTBEZM+od99/mM= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI= -github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= -github.com/valyala/histogram v1.1.2 h1:vOk5VrGjMBIoPR5k6wA8vBaC8toeJ8XO0yfRjFEc1h8= -github.com/valyala/histogram v1.1.2/go.mod h1:CZAr6gK9dbD7hYx2s8WSPh0p5x5wETjC+2b3PJVtEdg= +github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8= +github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= +github.com/valyala/histogram v1.2.0 h1:wyYGAZZt3CpwUiIb9AU/Zbllg1llXyrtApRS815OLoQ= +github.com/valyala/histogram v1.2.0/go.mod h1:Hb4kBwb4UxsaNbbbh+RRz8ZR6pdodR57tzWUS3BUzXY= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= @@ -457,6 +402,55 @@ github.com/zeebo/errs v1.2.2/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtC go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.unistack.org/micro-broker-kgo/v3 v3.8.1 h1:jGiuorS6I3c5gGoEQBToxihVG8XgWl2r7YY1DiNjgT8= +go.unistack.org/micro-broker-kgo/v3 v3.8.1/go.mod h1:43eAPnKxWuIKs/7dOI40lpHdFSsSpWb8oF/d5pLZzi8= +go.unistack.org/micro-broker-segmentio/v3 v3.8.0 h1:Nm9BaS4eD6kuewHRGmUd/QFbdv4FDtWpPzv1Z3zaTPE= +go.unistack.org/micro-broker-segmentio/v3 v3.8.0/go.mod h1:Q3mavh0ZoNRO6mw31USvE760lDWB1nQHWiE64F6s8rs= +go.unistack.org/micro-client-grpc/v3 v3.8.0 h1:Dp92KVt2GGQoEqG1D0VAvLyOjsPKdsqILUdBYkVfSCw= +go.unistack.org/micro-client-grpc/v3 v3.8.0/go.mod h1:nu91OnGLuIeEcHhHOJu5NiLt6I2SprE3mEC3uYsZ0pM= +go.unistack.org/micro-client-http/v3 v3.8.1 h1:AK80AOt5SGha9MczJSo133rFEcKqKVKa0Kg3qvdS2bI= +go.unistack.org/micro-client-http/v3 v3.8.1/go.mod h1:hNsweSkl+etv+OK2d4E1nzME7isjeq2RD19JXe3c5tk= +go.unistack.org/micro-codec-grpc/v3 v3.8.1 h1:vZrR07L8NKziG1dtzCBKoooaHpV3oP2c7rh93ClbUGI= +go.unistack.org/micro-codec-grpc/v3 v3.8.1/go.mod h1:RawS1ObPRsjsdvDXrGcLNnTexOHdU9yRZbF4QhWkRWw= +go.unistack.org/micro-codec-json/v3 v3.8.0 h1:sQ6xdHaNUCxCiUakGaV1t8lbX1rGWlgnF/HbsXyhkGg= +go.unistack.org/micro-codec-json/v3 v3.8.0/go.mod h1:+F7S3ZNTKdMsu6pYFeNdKNT8G8b/nXugdln/lUY1kO8= +go.unistack.org/micro-codec-jsonpb/v3 v3.8.1 h1:JO5KVUC/fL0CephI42xwkKZt0SLNpP4w66nAk7O9oi8= +go.unistack.org/micro-codec-jsonpb/v3 v3.8.1/go.mod h1:igXQT6P1wibc9mVjYS99w56s4M2DlIUCl4GQmUQrtQU= +go.unistack.org/micro-codec-proto/v3 v3.8.1 h1:86bJca4JnE4Qp8u9sdUGyKi8n19c+3tXdDYN39KAkIY= +go.unistack.org/micro-codec-proto/v3 v3.8.1/go.mod h1:KawLWwswDCunabwWv3QvXVJWwKNhv6WiSbR3GQ4JHHA= +go.unistack.org/micro-codec-segmentio/v3 v3.8.1 h1:e8/8aDlTfSFM7T3azEGxUE9xQ6FPid124Uo+2p/ZCXA= +go.unistack.org/micro-codec-segmentio/v3 v3.8.1/go.mod h1:d7xjN5JwqNXTHi9wVLZimOcKjXtZzScLbgCKeBuosPM= +go.unistack.org/micro-codec-urlencode/v3 v3.8.1 h1:p1VzzvuQnbm2CQnn/qr7NDiuaEuM6eXuh2oExWIUFmk= +go.unistack.org/micro-codec-urlencode/v3 v3.8.1/go.mod h1:TxaelCAvvXLyZpMIhZUvsMi6Xy2J3rvKKI7WOQhb5wI= +go.unistack.org/micro-codec-xml/v3 v3.8.1 h1:hE211qCnyjdPt33ub1cg4HbHaKtHx0tNDXtq5xwLjQ4= +go.unistack.org/micro-codec-xml/v3 v3.8.1/go.mod h1:sNwBgamgKsumUV06rk8Z+Gutzshfm0VnCYH+YTUCqqU= +go.unistack.org/micro-config-consul/v3 v3.8.0 h1:qPz/NlhzdptosEHi7KZuUmj1JY2koNiyd1y0Cm1ILLE= +go.unistack.org/micro-config-consul/v3 v3.8.0/go.mod h1:uHxLujVpQ+S9pZ28Ge6CB6yuSGR3JYWwQOwesIvTCLI= +go.unistack.org/micro-config-env/v3 v3.8.1 h1:OR/ZB4FWgXHy45jXrh8a3T3j9tmFNs6KGPv7EPelMLs= +go.unistack.org/micro-config-env/v3 v3.8.1/go.mod h1:Ef2j0gnQO9+T/AG1d2nkDndoRO9jJgQ4iECu8r/yYvs= +go.unistack.org/micro-config-vault/v3 v3.8.1 h1:AtM1s4x5VxVgWhY6BAoHmNqmJ1Q580fenmC8YgQCaHM= +go.unistack.org/micro-config-vault/v3 v3.8.1/go.mod h1:eUe4R19VFicFH3aSV8lGapub+/LTnk9O15EWx66vztE= +go.unistack.org/micro-meter-victoriametrics/v3 v3.8.2 h1:1UgzebgfAxKekrv+/W/n9CJs6rzzLtLcmpS3fSRN1ac= +go.unistack.org/micro-meter-victoriametrics/v3 v3.8.2/go.mod h1:qGYO+fCZvqLsDXCIWPMQscaR9uV+srIivq+L9O519nA= +go.unistack.org/micro-proto/v3 v3.1.0 h1:q39FwjFiRZn+Ux/tt+d3bJTmDtsQQWa+3SLYVo1vLfA= +go.unistack.org/micro-proto/v3 v3.1.0/go.mod h1:DpRhYCBXlmSJ/AAXTmntvlh7kQkYU6eFvlmYAx4BQS8= +go.unistack.org/micro-router-register/v3 v3.8.1 h1:7pxbBxT4gk9XfigpHYWHFEljWpwVXm2QndZhX75ZAqU= +go.unistack.org/micro-router-register/v3 v3.8.1/go.mod h1:JKRDKYMl6A/ZqIux2D4txgerRfT+HJdPbo0Ik6nKo98= +go.unistack.org/micro-server-grpc/v3 v3.8.0 h1:/cP4WBftiO7Vlj9D5YUShqmnw7CxyobXZCVshs5YfY8= +go.unistack.org/micro-server-grpc/v3 v3.8.0/go.mod h1:UcevUkT7vZwDVxWWHWg+GtSDG6ro5doNxihNKdDCr1o= +go.unistack.org/micro-server-http/v3 v3.8.1 h1:6mKhmvtKCjtvL8fPgaL8mW+0MBOxscpzOpajAJeYHQw= +go.unistack.org/micro-server-http/v3 v3.8.1/go.mod h1:NQeaEkNZESzXgaQ55IFAqFqYjVyotFCL+3EcS/2aH60= +go.unistack.org/micro-server-tcp/v3 v3.8.0 h1:J6vuctWx/A4FRrY4FuS5KUGPopLEpB8/2c8ntWQfWXk= +go.unistack.org/micro-server-tcp/v3 v3.8.0/go.mod h1:U2LjBk52yxq6QyOmZomS2FJTqca6E0q71UJrW4QgoNk= +go.unistack.org/micro-wrapper-recovery/v3 v3.8.0 h1:ivobT81NUA/74hshbbXM7iOcgODYDHvD2JOHVas6qxU= +go.unistack.org/micro-wrapper-recovery/v3 v3.8.0/go.mod h1:22Ik6keu5Q1Pix6M3gMDAYbAa7cr9pfM6l7XbIuKCvg= +go.unistack.org/micro-wrapper-trace-opentracing/v3 v3.8.0 h1:3MboqNLqh+L2Dvj2Azsf+a+HJMkO1Nb8HIBCkcxCrhE= +go.unistack.org/micro-wrapper-trace-opentracing/v3 v3.8.0/go.mod h1:+QJ8gVq8CG/6RJfj1rCZlHMHTiWrMEIRVFmwlFPxZKM= +go.unistack.org/micro/v3 v3.8.0/go.mod h1:Tkteri0wiiybbH6aPqay26pZHFIAwL9LXJc2x1Jkakk= +go.unistack.org/micro/v3 v3.8.2/go.mod h1:Tkteri0wiiybbH6aPqay26pZHFIAwL9LXJc2x1Jkakk= +go.unistack.org/micro/v3 v3.8.4/go.mod h1:KMMmOmbgo/D52/rCAbqeKbBsgEEbSKM69he54J3ZIuA= +go.unistack.org/micro/v3 v3.8.5 h1:DIYWRsQF+NPhKZP45sCtNsUhaRw6u2+Ps7U+pKU7i3s= +go.unistack.org/micro/v3 v3.8.5/go.mod h1:KMMmOmbgo/D52/rCAbqeKbBsgEEbSKM69he54J3ZIuA= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -478,6 +472,8 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -499,15 +495,13 @@ golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210913180222-943fd674d43e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 h1:Z04ewVs7JhXaYkmDhBERPi41gnltfQpMWDnTnQbaCqk= -golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211020060615-d418f374d309 h1:A0lJIi+hcTR6aajJH4YqKWwohY4aW9RO7oRMcdv+HKI= +golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -516,6 +510,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -542,22 +538,25 @@ golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210930212924-f542c8878de8 h1:g54bVHzt/eKaj59LDwiDyLRXbOdJSfwRxA1WYEJx/Yo= -golang.org/x/sys v0.0.0-20210930212924-f542c8878de8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac h1:oN6lz7iLW/YC7un8pq+9bOLyXrprv2+DKfkJY+2LJJw= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= @@ -573,8 +572,9 @@ golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -589,9 +589,8 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20210729151513-df9385d47c1b h1:4xoALQmXxqVdDdLimpPyPeDdsJzo+nFTJw9euAMpqgM= google.golang.org/genproto v0.0.0-20210729151513-df9385d47c1b/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3 h1:+F3FcO6LTrzNq5wp1Z6JtoBvnJzX6euyN70FoyMDXy4= -google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -604,9 +603,10 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -641,12 +641,87 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +lukechampine.com/uint128 v1.1.1 h1:pnxCASz787iMf+02ssImqk6OLt+Z5QHMoZyUXR4z6JU= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.33.6/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.33.9/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.33.11/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.34.0/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.35.0/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.35.4/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.35.5/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.35.7/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.35.8/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.35.10/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.35.15 h1:hb4dYlebd23NPxULTgLPoM5pI3QBgInCOHPJQiff5PA= +modernc.org/cc/v3 v3.35.15/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/ccgo/v3 v3.9.5/go.mod h1:umuo2EP2oDSBnD3ckjaVUXMrmeAw8C8OSICVa0iFf60= +modernc.org/ccgo/v3 v3.10.0/go.mod h1:c0yBmkRFi7uW4J7fwx/JiijwOjeAeR2NoSaRVFPmjMw= +modernc.org/ccgo/v3 v3.11.0/go.mod h1:dGNposbDp9TOZ/1KBxghxtUp/bzErD0/0QW4hhSaBMI= +modernc.org/ccgo/v3 v3.11.1/go.mod h1:lWHxfsn13L3f7hgGsGlU28D9eUOf6y3ZYHKoPaKU0ag= +modernc.org/ccgo/v3 v3.11.3/go.mod h1:0oHunRBMBiXOKdaglfMlRPBALQqsfrCKXgw9okQ3GEw= +modernc.org/ccgo/v3 v3.12.4/go.mod h1:Bk+m6m2tsooJchP/Yk5ji56cClmN6R1cqc9o/YtbgBQ= +modernc.org/ccgo/v3 v3.12.6/go.mod h1:0Ji3ruvpFPpz+yu+1m0wk68pdr/LENABhTrDkMDWH6c= +modernc.org/ccgo/v3 v3.12.8/go.mod h1:Hq9keM4ZfjCDuDXxaHptpv9N24JhgBZmUG5q60iLgUo= +modernc.org/ccgo/v3 v3.12.11/go.mod h1:0jVcmyDwDKDGWbcrzQ+xwJjbhZruHtouiBEvDfoIsdg= +modernc.org/ccgo/v3 v3.12.14/go.mod h1:GhTu1k0YCpJSuWwtRAEHAol5W7g1/RRfS4/9hc9vF5I= +modernc.org/ccgo/v3 v3.12.18/go.mod h1:jvg/xVdWWmZACSgOiAhpWpwHWylbJaSzayCqNOJKIhs= +modernc.org/ccgo/v3 v3.12.20/go.mod h1:aKEdssiu7gVgSy/jjMastnv/q6wWGRbszbheXgWRHc8= +modernc.org/ccgo/v3 v3.12.21/go.mod h1:ydgg2tEprnyMn159ZO/N4pLBqpL7NOkJ88GT5zNU2dE= +modernc.org/ccgo/v3 v3.12.22/go.mod h1:nyDVFMmMWhMsgQw+5JH6B6o4MnZ+UQNw1pp52XYFPRk= +modernc.org/ccgo/v3 v3.12.25/go.mod h1:UaLyWI26TwyIT4+ZFNjkyTbsPsY3plAEB6E7L/vZV3w= +modernc.org/ccgo/v3 v3.12.29/go.mod h1:FXVjG7YLf9FetsS2OOYcwNhcdOLGt8S9bQ48+OP75cE= +modernc.org/ccgo/v3 v3.12.36/go.mod h1:uP3/Fiezp/Ga8onfvMLpREq+KUjUmYMxXPO8tETHtA8= +modernc.org/ccgo/v3 v3.12.38/go.mod h1:93O0G7baRST1vNj4wnZ49b1kLxt0xCW5Hsa2qRaZPqc= +modernc.org/ccgo/v3 v3.12.39 h1:a5VerUVWhtfhVTiLDKIcebmVzXY1U9PeUrKJ71unE9w= +modernc.org/ccgo/v3 v3.12.39/go.mod h1:0r9ejJghrz/33dA6cF6m6m6Glk1uWs0pwagU5T4wOf8= +modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v1.9.8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= +modernc.org/libc v1.9.11/go.mod h1:NyF3tsA5ArIjJ83XB0JlqhjTabTCHm9aX4XMPHyQn0Q= +modernc.org/libc v1.11.0/go.mod h1:2lOfPmj7cz+g1MrPNmX65QCzVxgNq2C5o0jdLY2gAYg= +modernc.org/libc v1.11.2/go.mod h1:ioIyrl3ETkugDO3SGZ+6EOKvlP3zSOycUETe4XM4n8M= +modernc.org/libc v1.11.5/go.mod h1:k3HDCP95A6U111Q5TmG3nAyUcp3kR5YFZTeDS9v8vSU= +modernc.org/libc v1.11.6/go.mod h1:ddqmzR6p5i4jIGK1d/EiSw97LBcE3dK24QEwCFvgNgE= +modernc.org/libc v1.11.11/go.mod h1:lXEp9QOOk4qAYOtL3BmMve99S5Owz7Qyowzvg6LiZso= +modernc.org/libc v1.11.13/go.mod h1:ZYawJWlXIzXy2Pzghaf7YfM8OKacP3eZQI81PDLFdY8= +modernc.org/libc v1.11.16/go.mod h1:+DJquzYi+DMRUtWI1YNxrlQO6TcA5+dRRiq8HWBWRC8= +modernc.org/libc v1.11.19/go.mod h1:e0dgEame6mkydy19KKaVPBeEnyJB4LGNb0bBH1EtQ3I= +modernc.org/libc v1.11.24/go.mod h1:FOSzE0UwookyT1TtCJrRkvsOrX2k38HoInhw+cSCUGk= +modernc.org/libc v1.11.26/go.mod h1:SFjnYi9OSd2W7f4ct622o/PAYqk7KHv6GS8NZULIjKY= +modernc.org/libc v1.11.27/go.mod h1:zmWm6kcFXt/jpzeCgfvUNswM0qke8qVwxqZrnddlDiE= +modernc.org/libc v1.11.28/go.mod h1:Ii4V0fTFcbq3qrv3CNn+OGHAvzqMBvC7dBNyC4vHZlg= +modernc.org/libc v1.11.31/go.mod h1:FpBncUkEAtopRNJj8aRo29qUiyx5AvAlAxzlx9GNaVM= +modernc.org/libc v1.11.34/go.mod h1:+Tzc4hnb1iaX/SKAutJmfzES6awxfU1BPvrrJO0pYLg= +modernc.org/libc v1.11.37/go.mod h1:dCQebOwoO1046yTrfUE5nX1f3YpGZQKNcITUYWlrAWo= +modernc.org/libc v1.11.39/go.mod h1:mV8lJMo2S5A31uD0k1cMu7vrJbSA3J3waQJxpV4iqx8= +modernc.org/libc v1.11.40 h1:kzLVEt6LvBF9KrFgHDVzd597oqgRcBfMN8x5OidNN90= +modernc.org/libc v1.11.40/go.mod h1:yzrLDU+sSjLE+D4bIhS7q1L5UwXDOw99PLSX0BlZvSQ= +modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc= +modernc.org/memory v1.0.5 h1:XRch8trV7GgvTec2i7jc33YlUI0RKVDBvZ5eZ5m8y14= +modernc.org/memory v1.0.5/go.mod h1:B7OYswTRnfGg+4tDH1t1OeUNnsy2viGTdME4tzd+IjM= +modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.13.3 h1:YBJFhSWRjWQzu7nt0ge/YrRck04eRnGPsarJFZcmHiI= +modernc.org/sqlite v1.13.3/go.mod h1:Y8WjcK0WOWYeA5jN3V9IqtrZdm4iEUxxCebCngP/08M= +modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= +modernc.org/tcl v1.8.1 h1:siVlE4O6t06k8CFftpJyb5T76O1uWzDus5hWScEF1F4= +modernc.org/tcl v1.8.1/go.mod h1:7SlzI6/UneYHe4xn3QCyvbHnj6A//hDZVkAWSGHnowg= +modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/z v1.2.7 h1:N0BrQ6wWlEkF+jj1phyav9guASZcWb5j+TuwHcWLWzY= +modernc.org/z v1.2.7/go.mod h1:+L7Vxulgf/QRxha9syRObResxBwvPEDs53Cy43g47Ls= storj.io/drpc v0.0.26 h1:T6jJzjby7QUa/2XHR1qMxTCENpDHEw4/o+kfDfZQqQI= storj.io/drpc v0.0.26/go.mod h1:ofQUDPQbbIymRDKE0tms48k8bLP5Y+dsI9CbXGv3gko= diff --git a/metric/victoriametrics/victoriametrics_test.go b/metric/victoriametrics/victoriametrics_test.go index 5b3eb2a..373bd0b 100644 --- a/metric/victoriametrics/victoriametrics_test.go +++ b/metric/victoriametrics/victoriametrics_test.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package victoriametrics @@ -13,13 +14,13 @@ import ( metrics "github.com/VictoriaMetrics/metrics" "github.com/stretchr/testify/assert" - gclient "github.com/unistack-org/micro-client-grpc/v3" - rrouter "github.com/unistack-org/micro-router-register/v3" - gserver "github.com/unistack-org/micro-server-grpc/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" + gclient "go.unistack.org/micro-client-grpc/v3" + rrouter "go.unistack.org/micro-router-register/v3" + gserver "go.unistack.org/micro-server-grpc/v3" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" ) type Test interface { diff --git a/protoc-gen-go-micro/generate.go b/protoc-gen-go-micro/generate.go new file mode 100644 index 0000000..f8059c4 --- /dev/null +++ b/protoc-gen-go-micro/generate.go @@ -0,0 +1,3 @@ +package protoc_gen_go_micro + +//go:generate ./generate.sh diff --git a/protoc-gen-go-micro/generate.sh b/protoc-gen-go-micro/generate.sh new file mode 100755 index 0000000..3ec113f --- /dev/null +++ b/protoc-gen-go-micro/generate.sh @@ -0,0 +1,11 @@ +#!/bin/sh -e + +INC=$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) +INC_CODEC=$(go list -f '{{ .Dir }}' -m go.unistack.org/micro/v3) +ARGS="-I${INC}" +CODEC_ARGS="-I${INC_CODEC}" + +protoc $ARGS $CODEC_ARGS -Iproto --go-micro_out=components="micro|http",debug=true,tag_path=./proto/,paths=source_relative:./proto/ proto/*.proto + +protoc $ARGS $CODEC_ARGS -Iproto --go-micro_out=openapi_file=apidocs.swagger.json,components="openapiv3",debug=true,paths=source_relative:./proto/ proto/*.proto + diff --git a/protoc-gen-go-micro/proto/apidocs.swagger.json b/protoc-gen-go-micro/proto/apidocs.swagger.json new file mode 100644 index 0000000..855042f --- /dev/null +++ b/protoc-gen-go-micro/proto/apidocs.swagger.json @@ -0,0 +1,397 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "test title", + "description": "test desc", + "version": "0.0.5" + }, + "servers": [ + { + "url": "{proto}://{sub}.example.com/v1", + "description": "server", + "variables": { + "additionalProperties": [ + { + "name": "proto", + "value": { + "enum": [ + "http", + "https" + ], + "default": "http", + "description": "protocols" + } + }, + { + "name": "sub", + "value": { + "enum": [ + "test", + "prod" + ], + "default": "test", + "description": "subdomain" + } + } + ] + } + }, + { + "url": "https://other.example.com/v1", + "description": "other test server" + } + ], + "paths": { + "path": [ + { + "name": "/aml", + "value": { + "post": { + "operationId": "TestService_KzAmlRs", + "parameters": [ + { + "parameter": { + "name": "kzAmlNewOnlineRs", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + } + ], + "responses": { + "responseOrReference": [ + { + "name": "200", + "value": { + "response": { + "description": "OK", + "content": { + "additionalProperties": [ + { + "name": "application/json", + "value": { + "schema": { + "reference": { + "Ref": "#/components/schemas/ResponseAml" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "name": "/users/image/upload", + "value": { + "post": { + "operationId": "TestService_UploadFile", + "parameters": [ + { + "parameter": { + "name": "image", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + }, + { + "parameter": { + "name": "file_name", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + }, + { + "parameter": { + "name": "doc_type", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + } + ], + "responses": { + "responseOrReference": [ + { + "name": "200", + "value": { + "response": { + "description": "OK", + "content": { + "additionalProperties": [ + { + "name": "application/json", + "value": { + "schema": { + "reference": { + "Ref": "#/components/schemas/ResponseImage" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "name": "/users/test", + "value": { + "get": { + "operationId": "TestEndpoint", + "parameters": [ + { + "parameter": { + "name": "client_uid", + "in": "header", + "required": true, + "schema": { + "schema": { + "type": "string" + } + } + } + }, + { + "parameter": { + "name": "csrftoken", + "in": "cookie", + "required": true, + "schema": { + "schema": { + "type": "string" + } + } + } + }, + { + "parameter": { + "name": "id", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + } + ], + "responses": { + "responseOrReference": [ + { + "name": "200", + "value": { + "response": { + "description": "OK", + "content": { + "additionalProperties": [ + { + "name": "application/json", + "value": { + "schema": { + "reference": { + "Ref": "#/components/schemas/Response" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "name": "/users/{id}", + "value": { + "get": { + "operationId": "TestService_UserByID", + "parameters": [ + { + "parameter": { + "name": "id", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + }, + { + "parameter": { + "name": "client_uid", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + } + ], + "responses": { + "responseOrReference": [ + { + "name": "200", + "value": { + "response": { + "description": "OK", + "content": { + "additionalProperties": [ + { + "name": "application/json", + "value": { + "schema": { + "reference": { + "Ref": "#/components/schemas/Response" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "name": "/users/{id}/image", + "value": { + "get": { + "operationId": "TestService_UserImageByID", + "parameters": [ + { + "parameter": { + "name": "id", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + }, + { + "parameter": { + "name": "client_uid", + "in": "query", + "schema": { + "schema": { + "type": "string" + } + } + } + } + ], + "responses": { + "responseOrReference": [ + { + "name": "200", + "value": { + "response": { + "description": "OK", + "content": { + "additionalProperties": [ + { + "name": "application/octet-stream", + "value": {} + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "components": { + "schemas": { + "additionalProperties": [ + { + "name": "Response", + "value": { + "schema": { + "properties": { + "additionalProperties": [ + { + "name": "encoded_id", + "value": { + "schema": { + "type": "string" + } + } + } + ] + } + } + } + }, + { + "name": "ResponseAml", + "value": { + "schema": { + "properties": { + "additionalProperties": [ + { + "name": "resp", + "value": { + "schema": { + "type": "string" + } + } + } + ] + } + } + } + }, + { + "name": "ResponseImage", + "value": { + "schema": { + "properties": {} + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/protoc-gen-micro/proto/test.pb.go b/protoc-gen-go-micro/proto/test.pb.go similarity index 67% rename from protoc-gen-micro/proto/test.pb.go rename to protoc-gen-go-micro/proto/test.pb.go index f014a51..17eb6e6 100644 --- a/protoc-gen-micro/proto/test.pb.go +++ b/protoc-gen-go-micro/proto/test.pb.go @@ -1,19 +1,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.17.3 // source: test.proto package pb import ( - _ "github.com/unistack-org/micro-proto/api" - _ "github.com/unistack-org/micro-proto/tag" - codec "github.com/unistack-org/micro/v3/codec" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" 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" + codec "go.unistack.org/micro/v3/codec" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -445,75 +447,79 @@ var file_test_proto_rawDesc = []byte{ 0x73, 0x74, 0x1a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x74, 0x61, - 0x67, 0x2f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x0a, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6c, 0x12, 0x5f, 0x0a, 0x10, 0x6b, 0x7a, 0x41, - 0x6d, 0x6c, 0x4e, 0x65, 0x77, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x5a, 0x41, 0x6d, 0x6c, - 0x4e, 0x65, 0x77, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x42, 0x1b, 0x9a, 0x84, 0x9e, - 0x03, 0x16, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x4b, 0x5a, 0x41, 0x6d, 0x6c, 0x4e, 0x65, 0x77, 0x4f, - 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x22, 0x52, 0x10, 0x6b, 0x7a, 0x41, 0x6d, 0x6c, 0x4e, - 0x65, 0x77, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x10, 0x4b, - 0x5a, 0x41, 0x6d, 0x6c, 0x4e, 0x65, 0x77, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x12, - 0x26, 0x0a, 0x05, 0x72, 0x71, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, - 0x9a, 0x84, 0x9e, 0x03, 0x0b, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x52, 0x71, 0x55, 0x49, 0x44, 0x22, - 0x52, 0x05, 0x72, 0x71, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x72, 0x71, 0x74, 0x6d, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0x9a, 0x84, 0x9e, 0x03, 0x0a, 0x78, 0x6d, 0x6c, 0x3a, - 0x22, 0x52, 0x71, 0x54, 0x6d, 0x22, 0x52, 0x04, 0x72, 0x71, 0x74, 0x6d, 0x12, 0x37, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x11, 0x9a, 0x84, 0x9e, 0x03, - 0x0c, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x72, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0x9a, 0x84, 0x9e, 0x03, - 0x10, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x54, 0x65, 0x72, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x22, 0x52, 0x0a, 0x74, 0x65, 0x72, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x33, 0x0a, - 0x0a, 0x61, 0x6d, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x14, 0x9a, 0x84, 0x9e, 0x03, 0x0f, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x41, 0x4d, 0x4c, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x52, 0x09, 0x61, 0x6d, 0x6c, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x40, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x0b, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x15, 0x9a, 0x84, 0x9e, 0x03, 0x10, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x43, 0x6f, 0x64, 0x65, 0x22, 0x21, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x41, 0x6d, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x72, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x6f, - 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, - 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x19, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x45, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, - 0x0a, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x1a, 0x9a, 0x84, 0x9e, 0x03, 0x15, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x2c, 0x61, 0x74, 0x74, 0x72, 0x22, 0x52, 0x09, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x49, 0x64, 0x32, 0xf2, 0x02, 0x0a, 0x0b, 0x54, 0x65, 0x73, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, - 0x0b, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, - 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x44, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, - 0x0b, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x4d, 0x0a, 0x0d, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x0d, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, - 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, - 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6d, 0x61, - 0x67, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x3c, 0x0a, 0x07, 0x4b, 0x7a, 0x41, 0x6d, 0x6c, 0x52, 0x73, 0x12, 0x10, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6c, 0x1a, 0x11, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x6d, 0x6c, 0x22, - 0x0c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x06, 0x22, 0x04, 0x2f, 0x61, 0x6d, 0x6c, 0x42, 0x0b, 0x5a, - 0x09, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x67, 0x2f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x33, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x0a, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6c, 0x12, 0x5f, 0x0a, 0x10, 0x6b, 0x7a, 0x41, 0x6d, 0x6c, 0x4e, + 0x65, 0x77, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x5a, 0x41, 0x6d, 0x6c, 0x4e, 0x65, 0x77, + 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x42, 0x1b, 0x9a, 0x84, 0x9e, 0x03, 0x16, 0x78, + 0x6d, 0x6c, 0x3a, 0x22, 0x4b, 0x5a, 0x41, 0x6d, 0x6c, 0x4e, 0x65, 0x77, 0x4f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x52, 0x73, 0x22, 0x52, 0x10, 0x6b, 0x7a, 0x41, 0x6d, 0x6c, 0x4e, 0x65, 0x77, 0x4f, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x10, 0x4b, 0x5a, 0x41, 0x6d, + 0x6c, 0x4e, 0x65, 0x77, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x73, 0x12, 0x26, 0x0a, 0x05, + 0x72, 0x71, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x9a, 0x84, 0x9e, + 0x03, 0x0b, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x52, 0x71, 0x55, 0x49, 0x44, 0x22, 0x52, 0x05, 0x72, + 0x71, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x72, 0x71, 0x74, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0f, 0x9a, 0x84, 0x9e, 0x03, 0x0a, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x52, 0x71, + 0x54, 0x6d, 0x22, 0x52, 0x04, 0x72, 0x71, 0x74, 0x6d, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x11, 0x9a, 0x84, 0x9e, 0x03, 0x0c, 0x78, 0x6d, + 0x6c, 0x3a, 0x22, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0x9a, 0x84, 0x9e, 0x03, 0x10, 0x78, 0x6d, + 0x6c, 0x3a, 0x22, 0x54, 0x65, 0x72, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x52, 0x0a, + 0x74, 0x65, 0x72, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x61, 0x6d, + 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x14, + 0x9a, 0x84, 0x9e, 0x03, 0x0f, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x41, 0x4d, 0x4c, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x52, 0x09, 0x61, 0x6d, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0x40, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, + 0x9a, 0x84, 0x9e, 0x03, 0x10, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x43, 0x6f, 0x64, 0x65, 0x22, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, + 0x65, 0x22, 0x21, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x6d, 0x6c, + 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x72, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x63, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x22, 0x19, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x45, + 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, + 0x9a, 0x84, 0x9e, 0x03, 0x15, 0x78, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x64, 0x5f, 0x69, 0x64, 0x2c, 0x61, 0x74, 0x74, 0x72, 0x22, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x64, 0x49, 0x64, 0x32, 0xf2, 0x02, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x0d, 0x12, 0x0b, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x79, 0x49, 0x44, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x0d, 0x12, 0x0b, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x4d, 0x0a, 0x0d, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x69, 0x63, 0x72, + 0x6f, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0x19, 0xb2, + 0xea, 0xff, 0xf9, 0x01, 0x13, 0x12, 0x11, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, + 0x64, 0x7d, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, + 0x1b, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x15, 0x22, 0x13, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3c, 0x0a, 0x07, + 0x4b, 0x7a, 0x41, 0x6d, 0x6c, 0x52, 0x73, 0x12, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6c, 0x1a, 0x11, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x6d, 0x6c, 0x22, 0x0c, 0xb2, 0xea, + 0xff, 0xf9, 0x01, 0x06, 0x22, 0x04, 0x2f, 0x61, 0x6d, 0x6c, 0x42, 0x30, 0x5a, 0x09, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0xaa, 0x84, 0x9e, 0x03, 0x20, 0x12, 0x1e, 0x0a, 0x0a, + 0x74, 0x65, 0x73, 0x74, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x09, 0x74, 0x65, 0x73, 0x74, + 0x20, 0x64, 0x65, 0x73, 0x63, 0x32, 0x05, 0x30, 0x2e, 0x30, 0x2e, 0x35, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -528,18 +534,21 @@ func file_test_proto_rawDescGZIP() []byte { return file_test_proto_rawDescData } -var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_test_proto_goTypes = []interface{}{ - (*RequestAml)(nil), // 0: test.RequestAml - (*KZAmlNewOnlineRs)(nil), // 1: test.KZAmlNewOnlineRs - (*Status)(nil), // 2: test.Status - (*ResponseAml)(nil), // 3: test.ResponseAml - (*RequestImage)(nil), // 4: test.RequestImage - (*ResponseImage)(nil), // 5: test.ResponseImage - (*Request)(nil), // 6: test.Request - (*Response)(nil), // 7: test.Response - (*codec.Frame)(nil), // 8: micro.codec.Frame -} +var ( + file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 8) + file_test_proto_goTypes = []interface{}{ + (*RequestAml)(nil), // 0: test.RequestAml + (*KZAmlNewOnlineRs)(nil), // 1: test.KZAmlNewOnlineRs + (*Status)(nil), // 2: test.Status + (*ResponseAml)(nil), // 3: test.ResponseAml + (*RequestImage)(nil), // 4: test.RequestImage + (*ResponseImage)(nil), // 5: test.ResponseImage + (*Request)(nil), // 6: test.Request + (*Response)(nil), // 7: test.Response + (*codec.Frame)(nil), // 8: micro.codec.Frame + } +) + var file_test_proto_depIdxs = []int32{ 1, // 0: test.RequestAml.kzAmlNewOnlineRs:type_name -> test.KZAmlNewOnlineRs 2, // 1: test.KZAmlNewOnlineRs.status:type_name -> test.Status diff --git a/protoc-gen-micro/proto/test.proto b/protoc-gen-go-micro/proto/test.proto similarity index 56% rename from protoc-gen-micro/proto/test.proto rename to protoc-gen-go-micro/proto/test.proto index 35e2e0d..9b53475 100644 --- a/protoc-gen-micro/proto/test.proto +++ b/protoc-gen-go-micro/proto/test.proto @@ -7,13 +7,75 @@ option go_package="/proto;pb"; import "api/annotations.proto"; import "codec/frame.proto"; import "tag/tag.proto"; +import "openapiv3/annotations.proto"; + +option (micro.openapiv3.openapiv3_swagger) = { + info: { + title: "test title"; + version: "0.0.5"; + description: "test desc"; + }; + servers: { + url: "{proto}://{sub}.example.com/v1"; + description: "server"; + variables: { + additional_properties: { + name: "proto"; + value: { + enum: ["http", "https"]; + default: "http"; + description: "protocols" + }; + }; + additional_properties: { + name: "sub"; + value: { + enum: ["test", "prod"]; + default: "test"; + description: "subdomain"; + }; + }; + }; + }; + servers: { + url: "https://other.example.com/v1"; + description: "other test server"; + }; +}; service TestService { rpc TestEndpoint(Request) returns (Response) { option (micro.api.http) = { get: "/users/test" }; - } + option (micro.openapiv3.openapiv3_operation) = { + operation_id: "TestEndpoint"; + parameters: { + parameter: { + name: "client_uid"; + in: "header"; + schema: { + schema: { + type: "string"; + }; + }; + required: true; + }; + }; + parameters: { + parameter: { + name: "csrftoken"; + in: "cookie"; + schema: { + schema: { + type: "string"; + }; + }; + required: true; + }; + }; + }; + }; rpc UserByID(Request) returns (Response) { option (micro.api.http) = { get: "/users/{id}" @@ -66,8 +128,9 @@ message ResponseImage {} message Request { string id = 1; + string client_uid = 2; } message Response { string encoded_id = 1 [(micro.tag.tags) = "xml:\"encoded_id,attr\"" ]; -} \ No newline at end of file +} diff --git a/protoc-gen-micro/proto/test_micro.pb.go b/protoc-gen-go-micro/proto/test_micro.pb.go similarity index 80% rename from protoc-gen-micro/proto/test_micro.pb.go rename to protoc-gen-go-micro/proto/test_micro.pb.go index 93bdf4b..2c5ed73 100644 --- a/protoc-gen-micro/proto/test_micro.pb.go +++ b/protoc-gen-go-micro/proto/test_micro.pb.go @@ -1,47 +1,55 @@ -// Code generated by protoc-gen-micro +// Code generated by protoc-gen-go-micro. DO NOT EDIT. +// protoc-gen-go-micro version: v3.5.3 // source: test.proto + package pb import ( context "context" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - codec "github.com/unistack-org/micro/v3/codec" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" + codec "go.unistack.org/micro/v3/codec" ) -func NewTestServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - &api.Endpoint{ +var ( + TestServiceName = "TestService" + + TestServiceEndpoints = []api.Endpoint{ + { Name: "TestService.TestEndpoint", Path: []string{"/users/test"}, Method: []string{"GET"}, Handler: "rpc", }, - &api.Endpoint{ + { Name: "TestService.UserByID", Path: []string{"/users/{id}"}, Method: []string{"GET"}, Handler: "rpc", }, - &api.Endpoint{ + { Name: "TestService.UserImageByID", Path: []string{"/users/{id}/image"}, Method: []string{"GET"}, Handler: "rpc", }, - &api.Endpoint{ + { Name: "TestService.UploadFile", Path: []string{"/users/image/upload"}, Method: []string{"POST"}, Handler: "rpc", }, - &api.Endpoint{ + { Name: "TestService.KzAmlRs", Path: []string{"/aml"}, Method: []string{"POST"}, Handler: "rpc", }, } +) + +func NewTestServiceEndpoints() []api.Endpoint { + return TestServiceEndpoints } type TestServiceClient interface { diff --git a/protoc-gen-micro/proto/test_micro_http.pb.go b/protoc-gen-go-micro/proto/test_micro_http.pb.go similarity index 85% rename from protoc-gen-micro/proto/test_micro_http.pb.go rename to protoc-gen-go-micro/proto/test_micro_http.pb.go index 0f5ce58..341dd1d 100644 --- a/protoc-gen-micro/proto/test_micro_http.pb.go +++ b/protoc-gen-go-micro/proto/test_micro_http.pb.go @@ -1,14 +1,17 @@ -// Code generated by protoc-gen-micro +// Code generated by protoc-gen-go-micro. DO NOT EDIT. +// protoc-gen-go-micro version: v3.5.3 // source: test.proto + package pb import ( context "context" - v3 "github.com/unistack-org/micro-client-http/v3" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - codec "github.com/unistack-org/micro/v3/codec" - server "github.com/unistack-org/micro/v3/server" + 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" + codec "go.unistack.org/micro/v3/codec" + server "go.unistack.org/micro/v3/server" http "net/http" ) @@ -26,6 +29,10 @@ func (c *testServiceClient) TestEndpoint(ctx context.Context, req *Request, opts v3.Method(http.MethodGet), v3.Path("/users/test"), ) + opts = append(opts, + v3.Header("client_uid", "true"), + v3.Cookie("csrftoken", "true"), + ) rsp := &Response{} err := c.c.Call(ctx, c.c.NewRequest(c.name, "TestService.TestEndpoint", req), rsp, opts...) if err != nil { @@ -91,6 +98,10 @@ type testServiceServer struct { } func (h *testServiceServer) TestEndpoint(ctx context.Context, req *Request, rsp *Response) error { + v31.FillRequest(ctx, req, + v31.Header("client_uid", "true"), + v31.Cookie("csrftoken", "true"), + ) return h.TestServiceServer.TestEndpoint(ctx, req, rsp) } @@ -123,8 +134,8 @@ func RegisterTestServiceServer(s server.Server, sh TestServiceServer, opts ...se } h := &testServiceServer{sh} var nopts []server.HandlerOption - for _, endpoint := range NewTestServiceEndpoints() { - nopts = append(nopts, api.WithEndpoint(endpoint)) + for _, endpoint := range TestServiceEndpoints { + nopts = append(nopts, api.WithEndpoint(&endpoint)) } return s.Handle(s.NewHandler(&TestService{h}, append(nopts, opts...)...)) } diff --git a/protoc-gen-micro/generate.sh b/protoc-gen-micro/generate.sh deleted file mode 100755 index 0aa1071..0000000 --- a/protoc-gen-micro/generate.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -e - -INC=$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro-proto) -INC_CODEC=$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro/v3) -ARGS="-I${INC}" -CODEC_ARGS="-I${INC_CODEC}" - -protoc $ARGS $CODEC_ARGS -Iproto --openapiv2_out=disable_default_errors=true,allow_merge=true:./proto/ --go_out=paths=source_relative:./proto/ proto/*.proto - -protoc $ARGS $CODEC_ARGS -Iproto --go-micro_out=components="micro|http",debug=true,tag_path=./proto/,paths=source_relative:./proto/ proto/*.proto diff --git a/protoc-gen-micro/proto/apidocs.swagger.json b/protoc-gen-micro/proto/apidocs.swagger.json deleted file mode 100644 index 79cd10d..0000000 --- a/protoc-gen-micro/proto/apidocs.swagger.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "test.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/aml": { - "post": { - "operationId": "TestService_KzAmlRs", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/testResponseAml" - } - } - }, - "tags": [ - "TestService" - ] - } - }, - "/users/image/upload": { - "post": { - "operationId": "TestService_UploadFile", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/testResponseImage" - } - } - }, - "tags": [ - "TestService" - ] - } - }, - "/users/test": { - "get": { - "operationId": "TestService_TestEndpoint", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/testResponse" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "TestService" - ] - } - }, - "/users/{id}": { - "get": { - "operationId": "TestService_UserByID", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/testResponse" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "TestService" - ] - } - }, - "/users/{id}/image": { - "get": { - "operationId": "TestService_UserImageByID", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/codecFrame" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "TestService" - ] - } - } - }, - "definitions": { - "codecFrame": { - "type": "object", - "properties": { - "data": { - "type": "string", - "format": "byte" - } - } - }, - "testKZAmlNewOnlineRs": { - "type": "object", - "properties": { - "rquid": { - "type": "string" - }, - "rqtm": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/testStatus" - }, - "terrStatus": { - "type": "string", - "format": "int64" - }, - "amlStatus": { - "type": "string", - "format": "int64" - } - } - }, - "testResponse": { - "type": "object", - "properties": { - "encodedId": { - "type": "string" - } - } - }, - "testResponseAml": { - "type": "object", - "properties": { - "resp": { - "type": "string" - } - } - }, - "testResponseImage": { - "type": "object" - }, - "testStatus": { - "type": "object", - "properties": { - "statusCode": { - "type": "string", - "format": "int64" - } - } - } - } -} diff --git a/server/grpc/generate.go b/server/grpc/generate.go index f48842a..eda2538 100644 --- a/server/grpc/generate.go +++ b/server/grpc/generate.go @@ -1,4 +1,4 @@ package grpc -//go:generate go get google.golang.org/grpc/cmd/protoc-gen-go-grpc -//go:generate protoc -I./proto -I$GOPATH/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.9.5/third_party/googleapis -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --go-micro_out=components=micro|rpc,debug=true,standalone=true,paths=source_relative:./gproto proto/test.proto +//go:generate go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest +//go:generate sh -c "protoc -I./proto -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --go-micro_out=components='micro|rpc',debug=true,standalone=true,paths=source_relative:./gproto proto/test.proto" diff --git a/server/grpc/gproto/test_micro.pb.go b/server/grpc/gproto/test_micro.pb.go index 1f9bcba..d985134 100644 --- a/server/grpc/gproto/test_micro.pb.go +++ b/server/grpc/gproto/test_micro.pb.go @@ -1,20 +1,28 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package helloworld import ( context "context" - proto "github.com/unistack-org/micro-tests/server/grpc/proto" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" + proto "go.unistack.org/micro-tests/server/grpc/proto" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" ) var ( TestName = "Test" - TestEndpoints = []api.Endpoint{} + TestEndpoints = []api.Endpoint{ + { + Name: "Test.Call", + Path: []string{"/api/v0/test/call/TEST"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + } ) func NewTestEndpoints() []api.Endpoint { diff --git a/server/grpc/gproto/test_micro_rpc.pb.go b/server/grpc/gproto/test_micro_rpc.pb.go index 12c8db5..995c8e7 100644 --- a/server/grpc/gproto/test_micro_rpc.pb.go +++ b/server/grpc/gproto/test_micro_rpc.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package helloworld import ( context "context" - proto "github.com/unistack-org/micro-tests/server/grpc/proto" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - server "github.com/unistack-org/micro/v3/server" + proto "go.unistack.org/micro-tests/server/grpc/proto" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" + server "go.unistack.org/micro/v3/server" ) type testClient struct { diff --git a/server/grpc/grpc_test.go b/server/grpc/grpc_test.go index a475659..ab03fb1 100644 --- a/server/grpc/grpc_test.go +++ b/server/grpc/grpc_test.go @@ -6,21 +6,21 @@ import ( "net/http" "testing" - gclient "github.com/unistack-org/micro-client-grpc/v3" - protocodec "github.com/unistack-org/micro-codec-proto/v3" - regRouter "github.com/unistack-org/micro-router-register/v3" - gserver "github.com/unistack-org/micro-server-grpc/v3" - httpsrv "github.com/unistack-org/micro-server-http/v3" - gpb "github.com/unistack-org/micro-tests/server/grpc/gproto" - pb "github.com/unistack-org/micro-tests/server/grpc/proto" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/codec" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" - health "github.com/unistack-org/micro/v3/server/health" + gclient "go.unistack.org/micro-client-grpc/v3" + protocodec "go.unistack.org/micro-codec-proto/v3" + regRouter "go.unistack.org/micro-router-register/v3" + gserver "go.unistack.org/micro-server-grpc/v3" + httpsrv "go.unistack.org/micro-server-http/v3" + gpb "go.unistack.org/micro-tests/server/grpc/gproto" + pb "go.unistack.org/micro-tests/server/grpc/proto" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/codec" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" + health "go.unistack.org/micro/v3/server/health" jsonpb "google.golang.org/protobuf/encoding/protojson" ) diff --git a/server/grpc/proto/test.pb.go b/server/grpc/proto/test.pb.go index 3cee44d..138c97e 100644 --- a/server/grpc/proto/test.pb.go +++ b/server/grpc/proto/test.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: test.proto package helloworld import ( - _ "google.golang.org/genproto/googleapis/api/annotations" + _ "go.unistack.org/micro-proto/v3/api" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -190,32 +190,31 @@ var File_test_proto protoreflect.FileDescriptor var file_test_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x62, 0x72, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x06, 0x62, - 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x1e, 0x0a, 0x06, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x48, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6d, 0x73, 0x67, 0x12, 0x2a, 0x0a, 0x06, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, - 0x2e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x06, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x32, - 0x5c, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, - 0x13, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, - 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1b, 0x22, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x65, 0x73, 0x74, - 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x54, 0x45, 0x53, 0x54, 0x3a, 0x01, 0x2a, 0x42, 0x42, 0x5a, - 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, - 0x65, 0x73, 0x74, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x70, 0x63, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, - 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x1a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x5d, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, + 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x06, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x1e, + 0x0a, 0x06, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x48, + 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x2a, 0x0a, 0x06, + 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x68, + 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x06, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x5c, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, + 0x12, 0x54, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x13, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, + 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x21, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x1b, 0x22, 0x16, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x54, + 0x45, 0x53, 0x54, 0x3a, 0x01, 0x2a, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, + 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/server/grpc/proto/test.proto b/server/grpc/proto/test.proto index a75edce..a07eb50 100644 --- a/server/grpc/proto/test.proto +++ b/server/grpc/proto/test.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package helloworld; -option go_package = "github.com/unistack-org/micro-tests/server/grpc/proto;helloworld"; -import "google/api/annotations.proto"; +option go_package = "go.unistack.org/micro-tests/server/grpc/proto;helloworld"; +import "api/annotations.proto"; service Test { rpc Call(Request) returns (Response) { - option (google.api.http) = { post: "/api/v0/test/call/TEST"; body: "*"; }; + option (micro.api.http) = { post: "/api/v0/test/call/TEST"; body: "*"; }; }; } diff --git a/server/http/generate.go b/server/http/generate.go index 2a59cbf..c277d84 100644 --- a/server/http/generate.go +++ b/server/http/generate.go @@ -1,5 +1,5 @@ package http -//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro-proto) --go_out=paths=source_relative:./proto proto/test.proto" +//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go_out=paths=source_relative:./proto proto/test.proto" -//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m github.com/unistack-org/micro-proto) --go-micro_out=components='micro|http',debug=true,tag_path=./proto,paths=source_relative:./proto proto/test.proto" +//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go-micro_out=components='micro|http',debug=true,tag_path=./proto,paths=source_relative:./proto proto/test.proto" diff --git a/server/http/handler/github.go b/server/http/handler/github.go index 698550a..9830305 100644 --- a/server/http/handler/github.go +++ b/server/http/handler/github.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - httpsrv "github.com/unistack-org/micro-server-http/v3" - pb "github.com/unistack-org/micro-tests/client/http/proto" + httpsrv "go.unistack.org/micro-server-http/v3" + pb "go.unistack.org/micro-tests/client/http/proto" ) type GithubHandler struct{} diff --git a/server/http/http_test.go b/server/http/http_test.go index 67a574e..150c18e 100644 --- a/server/http/http_test.go +++ b/server/http/http_test.go @@ -12,22 +12,22 @@ import ( "strings" "testing" - httpcli "github.com/unistack-org/micro-client-http/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - jsonpbcodec "github.com/unistack-org/micro-codec-jsonpb/v3" - urlencodecodec "github.com/unistack-org/micro-codec-urlencode/v3" - xmlcodec "github.com/unistack-org/micro-codec-xml/v3" - vmeter "github.com/unistack-org/micro-meter-victoriametrics/v3" - httpsrv "github.com/unistack-org/micro-server-http/v3" - pb "github.com/unistack-org/micro-tests/server/http/proto" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/logger" - lwrapper "github.com/unistack-org/micro/v3/logger/wrapper" - "github.com/unistack-org/micro/v3/metadata" - handler "github.com/unistack-org/micro/v3/meter/handler" - mwrapper "github.com/unistack-org/micro/v3/meter/wrapper" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/server" + httpcli "go.unistack.org/micro-client-http/v3" + jsoncodec "go.unistack.org/micro-codec-json/v3" + jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v3" + urlencodecodec "go.unistack.org/micro-codec-urlencode/v3" + xmlcodec "go.unistack.org/micro-codec-xml/v3" + vmeter "go.unistack.org/micro-meter-victoriametrics/v3" + httpsrv "go.unistack.org/micro-server-http/v3" + pb "go.unistack.org/micro-tests/server/http/proto" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/logger" + lwrapper "go.unistack.org/micro/v3/logger/wrapper" + "go.unistack.org/micro/v3/metadata" + handler "go.unistack.org/micro/v3/meter/handler" + mwrapper "go.unistack.org/micro/v3/meter/wrapper" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/server" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" ) @@ -36,7 +36,7 @@ type Handler struct { } func multipartHandler(w http.ResponseWriter, r *http.Request) { - //fmt.Printf("%#+v\n", r) + // fmt.Printf("%#+v\n", r) } func upload(client *http.Client, url string, values map[string]io.Reader) error { @@ -176,6 +176,7 @@ func (h *Handler) CallRepeatedString(ctx context.Context, req *pb.CallReq, rsp * httpsrv.SetRspCode(ctx, http.StatusCreated) return nil } + func (h *Handler) CallRepeatedInt64(ctx context.Context, req *pb.CallReq, rsp *pb.CallRsp) error { if len(req.Int64Ids) != 2 || req.Int64Ids[0] != 123 { h.t.Fatalf("invalid reflect merging, int64_ids invalid: %v", req.Int64Ids) @@ -226,7 +227,7 @@ func TestNativeFormUrlencoded(t *testing.T) { server.Register(reg), server.Codec("application/json", jsoncodec.NewCodec()), server.Codec("application/x-www-form-urlencoded", urlencodecodec.NewCodec()), - //server.WrapHandler(NewServerHandlerWrapper()), + // server.WrapHandler(NewServerHandlerWrapper()), ) if err := srv.Init(); err != nil { @@ -266,7 +267,7 @@ func TestNativeFormUrlencoded(t *testing.T) { // make request req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("http://%s/v1/test/call/my_name", service[0].Nodes[0].Address), strings.NewReader(data.Encode())) // URL-encoded payload req.Header.Add("Content-Type", "application/x-www-form-urlencoded") - //req.Header.Add("Content-Length", strconv.Itoa(len(data.Encode()))) + // req.Header.Add("Content-Length", strconv.Itoa(len(data.Encode()))) if err != nil { t.Fatal(err) } @@ -326,7 +327,6 @@ func TestNativeFormUrlencoded(t *testing.T) { if err := srv.Stop(); err != nil { t.Fatal(err) } - } func TestNativeClientServer(t *testing.T) { @@ -479,7 +479,6 @@ func TestNativeClientServer(t *testing.T) { if err := srv.Stop(); err != nil { t.Fatal(err) } - } func TestNativeServer(t *testing.T) { @@ -624,7 +623,6 @@ func TestNativeServer(t *testing.T) { if err := srv.Stop(); err != nil { t.Fatal(err) } - } func TestHTTPHandler(t *testing.T) { diff --git a/server/http/proto/test.pb.go b/server/http/proto/test.pb.go index d40b60d..f676fae 100644 --- a/server/http/proto/test.pb.go +++ b/server/http/proto/test.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: test.proto package pb import ( - _ "github.com/unistack-org/micro-proto/api" - _ "github.com/unistack-org/micro-proto/openapiv2" - _ "github.com/unistack-org/micro-proto/tag" + _ "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" @@ -377,7 +377,7 @@ var file_test_proto_rawDesc = []byte{ 0x73, 0x74, 0x1a, 0x0d, 0x74, 0x61, 0x67, 0x2f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x69, 0x76, 0x33, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x01, 0x0a, 0x07, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, @@ -408,61 +408,52 @@ var file_test_proto_rawDesc = []byte{ 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x31, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x73, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x73, 0x70, 0x22, 0x19, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0xa6, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x44, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, - 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, - 0x70, 0x22, 0x6b, 0xa2, 0x84, 0x9e, 0x03, 0x34, 0x2a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x4a, 0x2c, - 0x0a, 0x2a, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x12, 0x1d, 0x0a, - 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, - 0x01, 0x24, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x32, 0xfa, - 0x04, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0xab, 0x01, 0x0a, 0x12, 0x43, 0x61, 0x6c, 0x6c, - 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x0d, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x77, 0xa2, 0x84, - 0x9e, 0x03, 0x42, 0x2a, 0x12, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4a, 0x2c, 0x0a, 0x2a, 0x0a, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x12, 0x1d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x22, 0x22, 0x1d, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, - 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0xa8, 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, - 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x0d, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x75, 0xa2, 0x84, 0x9e, 0x03, 0x41, - 0x2a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x4a, 0x2c, 0x0a, 0x2a, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x12, 0x1f, 0x12, 0x1d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x21, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, - 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x69, 0x6e, 0x74, 0x36, 0x34, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, - 0x12, 0x86, 0x01, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, - 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x22, 0x60, 0xa2, 0x84, 0x9e, 0x03, 0x34, 0x2a, 0x04, - 0x43, 0x61, 0x6c, 0x6c, 0x4a, 0x2c, 0x0a, 0x2a, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x12, 0x1f, 0x12, 0x1d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, - 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, - 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x43, 0x61, - 0x6c, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x31, 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x31, 0x22, 0x62, 0xa2, 0x84, 0x9e, 0x03, 0x39, 0x2a, 0x09, - 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4a, 0x2c, 0x0a, 0x2a, 0x0a, 0x07, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x12, 0x1d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x1e, 0x22, 0x19, 0x2f, - 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x42, 0x3a, 0x5a, 0x38, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, - 0x74, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0x8a, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x44, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x12, 0x7c, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x75, 0x62, + 0x6c, 0x65, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, + 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, + 0x22, 0x50, 0xaa, 0x84, 0x9e, 0x03, 0x19, 0x2a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x42, 0x11, 0x0a, + 0x0f, 0x12, 0x0d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x24, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x6e, 0x61, 0x6d, 0x65, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, + 0x08, 0x05, 0x32, 0x8c, 0x04, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x90, 0x01, 0x0a, 0x12, + 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, + 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, + 0x22, 0x5c, 0xaa, 0x84, 0x9e, 0x03, 0x27, 0x2a, 0x12, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x11, 0x0a, 0x0f, 0x12, + 0x0d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0xb2, 0xea, + 0xff, 0xf9, 0x01, 0x22, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, + 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x8d, + 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, + 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, + 0x73, 0x70, 0x22, 0x5a, 0xaa, 0x84, 0x9e, 0x03, 0x26, 0x2a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x42, 0x11, 0x0a, 0x0f, + 0x12, 0x0d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0xb2, + 0xea, 0xff, 0xf9, 0x01, 0x21, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, + 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x6b, + 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, + 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6c, + 0x6c, 0x52, 0x73, 0x70, 0x22, 0x45, 0xaa, 0x84, 0x9e, 0x03, 0x19, 0x2a, 0x04, 0x43, 0x61, 0x6c, + 0x6c, 0x42, 0x11, 0x0a, 0x0f, 0x12, 0x0d, 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x19, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x3a, 0x01, 0x2a, 0xba, 0xea, 0xff, 0xf9, 0x01, 0x02, 0x08, 0x05, 0x12, 0x74, 0x0a, 0x09, 0x43, + 0x61, 0x6c, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, + 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x31, 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, + 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x73, 0x70, 0x31, 0x22, 0x47, 0xaa, 0x84, 0x9e, 0x03, 0x1e, 0x2a, + 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x12, 0x0d, + 0x0a, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0xb2, 0xea, 0xff, + 0xf9, 0x01, 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x63, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, + 0x2a, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/server/http/proto/test.proto b/server/http/proto/test.proto index 2f12967..5690697 100644 --- a/server/http/proto/test.proto +++ b/server/http/proto/test.proto @@ -2,26 +2,22 @@ syntax = "proto3"; package test; -option go_package = "github.com/unistack-org/micro-tests/server/http/proto;pb"; +option go_package = "go.unistack.org/micro-tests/server/http/proto;pb"; import "tag/tag.proto"; import "api/annotations.proto"; -import "openapiv2/annotations.proto"; +import "openapiv3/annotations.proto"; import "google/protobuf/wrappers.proto"; service TestDouble { //option (micro.api.micro_service) = { client_wrappers: ["one","two"]; }; rpc CallDouble(CallReq) returns (CallRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "Call"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; @@ -33,16 +29,12 @@ service TestDouble { service Test { rpc CallRepeatedString(CallReq) returns (CallRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "CallRepeatedString"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; @@ -51,16 +43,12 @@ service Test { option (micro.api.micro_method) = { timeout: 5; }; }; rpc CallRepeatedInt64(CallReq) returns (CallRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "CallRepeatedInt64"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; @@ -72,16 +60,12 @@ service Test { //option (micro.api.micro_service) = { client_wrappers: ["one","two"]; }; rpc Call(CallReq) returns (CallRsp) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "Call"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; @@ -90,16 +74,12 @@ service Test { option (micro.api.micro_method) = { timeout: 5; }; }; rpc CallError(CallReq1) returns (CallRsp1) { - option (micro.openapiv2.openapiv2_operation) = { + option (micro.openapiv3.openapiv3_operation) = { operation_id: "CallError"; responses: { - response_code: { - name: "default"; - value: { - json_reference: { - description: "Error response"; - _ref: ".test.Error"; - }; + default: { + reference: { + _ref: ".test.Error"; }; }; }; diff --git a/server/http/proto/test_micro.pb.go b/server/http/proto/test_micro.pb.go index 21637f4..8652bbb 100644 --- a/server/http/proto/test_micro.pb.go +++ b/server/http/proto/test_micro.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" ) var ( diff --git a/server/http/proto/test_micro_http.pb.go b/server/http/proto/test_micro_http.pb.go index 9afd4b3..b922969 100644 --- a/server/http/proto/test_micro_http.pb.go +++ b/server/http/proto/test_micro_http.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go-micro. DO NOT EDIT. -// protoc-gen-go-micro version: v3.4.2 +// protoc-gen-go-micro version: v3.5.3 // source: test.proto package pb import ( context "context" - v3 "github.com/unistack-org/micro-client-http/v3" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - server "github.com/unistack-org/micro/v3/server" + 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" time "time" ) @@ -24,11 +24,6 @@ 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}"), @@ -79,11 +74,6 @@ 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"), @@ -99,11 +89,6 @@ 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"), @@ -119,11 +104,6 @@ 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}"), @@ -139,11 +119,6 @@ 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}"), diff --git a/server/http/tools.go b/server/http/tools.go deleted file mode 100644 index ba67cf7..0000000 --- a/server/http/tools.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build tools - -package http - -import ( - _ "github.com/unistack-org/micro-proto/openapiv2" -) diff --git a/server/tcp/tcp_test.go b/server/tcp/tcp_test.go index cc9f423..442032a 100644 --- a/server/tcp/tcp_test.go +++ b/server/tcp/tcp_test.go @@ -8,11 +8,11 @@ import ( "testing" "time" - tcp "github.com/unistack-org/micro-server-tcp/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/logger" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/server" + tcp "go.unistack.org/micro-server-tcp/v3" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/logger" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/server" ) type testHandler struct { diff --git a/service/service_test.go b/service/service_test.go index bd3a863..e2f02bb 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -3,10 +3,10 @@ package service import ( "testing" - httpcli "github.com/unistack-org/micro-client-http/v3" - httpsrv "github.com/unistack-org/micro-server-http/v3" - "github.com/unistack-org/micro/v3" - "github.com/unistack-org/micro/v3/server" + httpcli "go.unistack.org/micro-client-http/v3" + httpsrv "go.unistack.org/micro-server-http/v3" + "go.unistack.org/micro/v3" + "go.unistack.org/micro/v3/server" ) func TestHTTPService(t *testing.T) { @@ -18,5 +18,4 @@ func TestHTTPService(t *testing.T) { if err := svc.Init(); err != nil { t.Fatal(err) } - } diff --git a/store/store_test.go b/store/store_test.go index b503653..021014c 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -12,16 +12,16 @@ import ( "testing" "time" - "github.com/unistack-org/micro/v3/store/cache" + "go.unistack.org/micro/v3/store/cache" - "github.com/unistack-org/micro/v3/store/memory" + "go.unistack.org/micro/v3/store/memory" "github.com/kr/pretty" - "github.com/unistack-org/micro/v3/store/cockroach" + "go.unistack.org/micro/v3/store/cockroach" - "github.com/unistack-org/micro/v3/store" + "go.unistack.org/micro/v3/store" - "github.com/unistack-org/micro/v3/store/file" + "go.unistack.org/micro/v3/store/file" "github.com/davecgh/go-spew/spew" ) diff --git a/tools.go b/tools.go new file mode 100644 index 0000000..fff6f3a --- /dev/null +++ b/tools.go @@ -0,0 +1,9 @@ +// +build tools + +package micro-tests + +import ( + _ "go.unistack.org/micro-proto/v3/openapiv3" + _ "go.unistack.org/micro-proto/v3/api" + _ "go.unistack.org/micro-proto/v3/tag" +) diff --git a/util/id/id_internal_test.go b/util/id/id_internal_test.go index 5cbed1a..b23c49f 100644 --- a/util/id/id_internal_test.go +++ b/util/id/id_internal_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - mid "github.com/unistack-org/micro/v3/util/id" + mid "go.unistack.org/micro/v3/util/id" ) func TestHasNoCollisions(t *testing.T) { diff --git a/util/id/id_test.go b/util/id/id_test.go index e2f0c7f..c76b40d 100644 --- a/util/id/id_test.go +++ b/util/id/id_test.go @@ -6,7 +6,7 @@ import ( "unicode/utf8" "github.com/stretchr/testify/assert" - id "github.com/unistack-org/micro/v3/util/id" + id "go.unistack.org/micro/v3/util/id" ) func TestGenerate(t *testing.T) { diff --git a/util/reflect/proto/test.pb.go b/util/reflect/proto/test.pb.go index 45fec6e..e33fb27 100644 --- a/util/reflect/proto/test.pb.go +++ b/util/reflect/proto/test.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc v3.17.3 // source: test.proto @@ -176,11 +176,10 @@ var file_test_proto_rawDesc = []byte{ 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, - 0x67, 0x73, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, - 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x72, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x73, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x74, 0x65, 0x73, 0x74, + 0x73, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/util/reflect/proto/test.proto b/util/reflect/proto/test.proto index f6a6ceb..d544d9f 100644 --- a/util/reflect/proto/test.proto +++ b/util/reflect/proto/test.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package reflect; -option go_package = "github.com/unistack-org/micro-tests/util/reflect/proto;pb"; +option go_package = "go.unistack.org/micro-tests/util/reflect/proto;pb"; import "google/protobuf/wrappers.proto"; message CallReq { diff --git a/util/reflect/reflect_test.go b/util/reflect/reflect_test.go index 632a9df..06326c3 100644 --- a/util/reflect/reflect_test.go +++ b/util/reflect/reflect_test.go @@ -3,8 +3,8 @@ package reflect import ( "testing" - pb "github.com/unistack-org/micro-tests/util/reflect/proto" - rutil "github.com/unistack-org/micro/v3/util/reflect" + pb "go.unistack.org/micro-tests/util/reflect/proto" + rutil "go.unistack.org/micro/v3/util/reflect" ) func TestFieldName(t *testing.T) { @@ -50,7 +50,6 @@ func TestMergeBool(t *testing.T) { if !s.Bool { t.Fatalf("merge bool error: %#+v\n", s) } - } func TestMergeString(t *testing.T) { @@ -80,7 +79,6 @@ func TestMergeString(t *testing.T) { if s.Bool != "false" { t.Fatalf("merge bool error: %#+v\n", s) } - } func TestMerge(t *testing.T) { diff --git a/wrapper/breaker/gobreaker/gobreaker_test.go b/wrapper/breaker/gobreaker/gobreaker_test.go index 5e9d689..0e8d40d 100644 --- a/wrapper/breaker/gobreaker/gobreaker_test.go +++ b/wrapper/breaker/gobreaker/gobreaker_test.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package gobreaker @@ -7,10 +8,10 @@ import ( "testing" "github.com/sony/gobreaker" - "github.com/unistack-org/micro/register/memory" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/router" + "go.unistack.org/micro/register/memory" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/router" ) func TestBreaker(t *testing.T) { diff --git a/wrapper/breaker/hystrix/hystrix_test.go b/wrapper/breaker/hystrix/hystrix_test.go index c68c79a..2043696 100644 --- a/wrapper/breaker/hystrix/hystrix_test.go +++ b/wrapper/breaker/hystrix/hystrix_test.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package hystrix @@ -7,10 +8,10 @@ import ( "testing" "github.com/afex/hystrix-go/hystrix" - rrouter "github.com/unistack-org/micro-router-register/v3" - "github.com/unistack-org/micro/register/memory" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/router" + rrouter "go.unistack.org/micro-router-register/v3" + "go.unistack.org/micro/register/memory" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/router" ) func TestBreaker(t *testing.T) { diff --git a/wrapper/metrics/prometheus/prometheus_test.go b/wrapper/metrics/prometheus/prometheus_test.go index f39d59d..5aba8ab 100644 --- a/wrapper/metrics/prometheus/prometheus_test.go +++ b/wrapper/metrics/prometheus/prometheus_test.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package prometheus_test @@ -9,17 +10,17 @@ import ( "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" - cli "github.com/unistack-org/micro-client-grpc/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - promwrapper "github.com/unistack-org/micro-metrics-prometheus/v3" - rrouter "github.com/unistack-org/micro-router-register/v3" - srv "github.com/unistack-org/micro-server-grpc/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" + cli "go.unistack.org/micro-client-grpc/v3" + jsoncodec "go.unistack.org/micro-codec-json/v3" + promwrapper "go.unistack.org/micro-metrics-prometheus/v3" + rrouter "go.unistack.org/micro-router-register/v3" + srv "go.unistack.org/micro-server-grpc/v3" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" ) type Test interface { diff --git a/wrapper/ratelimiter/juju/ratelimit_test.go b/wrapper/ratelimiter/juju/ratelimit_test.go index 19b88f9..e768dbd 100644 --- a/wrapper/ratelimiter/juju/ratelimit_test.go +++ b/wrapper/ratelimiter/juju/ratelimit_test.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package ratelimit @@ -9,18 +10,20 @@ import ( "time" "github.com/juju/ratelimit" - rrouter "github.com/unistack-org/micro-router-register/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/network/transport" - "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" + rrouter "go.unistack.org/micro-router-register/v3" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/network/transport" + "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" ) -type testHandler struct{} -type TestRequest struct{} -type TestResponse struct{} +type ( + testHandler struct{} + TestRequest struct{} + TestResponse struct{} +) func (t *testHandler) Method(ctx context.Context, req *TestRequest, rsp *TestResponse) error { return nil @@ -89,7 +92,7 @@ func TestRateServerLimit(t *testing.T) { server.Register(r), server.Transport(tr), // add broker - //server.Broker(b), + // server.Broker(b), // add the breaker wrapper server.WrapHandler(NewHandlerWrapper(br, false)), ) diff --git a/wrapper/recovery/recovery_test.go b/wrapper/recovery/recovery_test.go index 01eb3ce..56ceb6d 100644 --- a/wrapper/recovery/recovery_test.go +++ b/wrapper/recovery/recovery_test.go @@ -5,17 +5,17 @@ import ( "fmt" "testing" - cli "github.com/unistack-org/micro-client-grpc/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - rrouter "github.com/unistack-org/micro-router-register/v3" - srv "github.com/unistack-org/micro-server-grpc/v3" - recwrapper "github.com/unistack-org/micro-wrapper-recovery/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" + cli "go.unistack.org/micro-client-grpc/v3" + jsoncodec "go.unistack.org/micro-codec-json/v3" + rrouter "go.unistack.org/micro-router-register/v3" + srv "go.unistack.org/micro-server-grpc/v3" + recwrapper "go.unistack.org/micro-wrapper-recovery/v3" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" ) type Test interface { diff --git a/wrapper/sql/wrapper_test.go b/wrapper/sql/wrapper_test.go index f5c988d..cd3e6b3 100644 --- a/wrapper/sql/wrapper_test.go +++ b/wrapper/sql/wrapper_test.go @@ -1,25 +1,25 @@ -// +build ignore - package wrapper_test import ( + "bytes" "context" - "fmt" + "database/sql" "testing" + "time" "github.com/jmoiron/sqlx" - //_ "github.com/mattn/go-sqlite3" - wrapper "github.com/unistack-org/micro-wrapper-sql" + vmeter "go.unistack.org/micro-meter-victoriametrics/v3" + wrapper "go.unistack.org/micro-wrapper-sql/v3" + "go.unistack.org/micro/v3/meter" + "modernc.org/sqlite" ) -var ( - schema = ` +var schema = ` CREATE TABLE IF NOT EXISTS person ( first_name text, last_name text, email text );` -) type Person struct { FirstName string `db:"first_name"` @@ -28,25 +28,51 @@ type Person struct { } func TestWrapper(t *testing.T) { - db, err := sqlx.Connect("sqlite3", "test.db") + wrapper.DefaultMeterStatsInterval = 100 * time.Millisecond + meter.DefaultMeter = vmeter.NewMeter() + + sql.Register("micro-wrapper-sql", wrapper.NewWrapper(&sqlite.Driver{})) + wdb, err := sql.Open("micro-wrapper-sql", ":memory:") if err != nil { t.Fatal(err) } - w := wrapper.NewWrapper(db) - defer w.Close() - ctx := context.Background() + db := sqlx.NewDb(wdb, "sqlite") + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() - db.MustExec(schema) - - tx := db.MustBegin() - //tx.NamedExec("INSERT OR REPLACE INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)", &Person{"Jane", "Citizen", "jane.citzen@example.com"}) - tx.Commit() - - people := &Person{} - if err := sqlx.GetContext(ctx, w, people, "SELECT * FROM person limit 1"); err != nil { + wrapper.NewStatsMeter(ctx, db, wrapper.DatabaseHost("localhost"), wrapper.DatabaseName("memory")) + if _, err := db.Exec(schema); err != nil { t.Fatal(err) } - fmt.Printf("%#+v\n", people) + tx, err := db.BeginTxx(ctx, nil) + if err != nil { + t.Fatal(err) + } + + if _, err := tx.NamedExec("INSERT OR REPLACE INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)", &Person{"Fist1", "Last1", "Email1"}); err != nil { + t.Fatal(err) + } + if _, err := tx.NamedExec("INSERT OR REPLACE INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)", &Person{"Fist2", "Last2", "Email2"}); err != nil { + t.Fatal(err) + } + + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + + var peoples []*Person + if err := sqlx.SelectContext(ctx, db, &peoples, "SELECT * FROM person limit 2"); err != nil { + t.Fatal(err) + } + + _ = peoples + time.Sleep(1 * time.Second) + buf := bytes.NewBuffer(nil) + _ = meter.DefaultMeter.Write(buf, meter.WriteProcessMetrics(true)) + + if !bytes.Contains(buf.Bytes(), []byte(`micro_sql_idle_connections`)) { + t.Fatalf("micro-wrapper-sql output contains invalid output: %s", buf.Bytes()) + } } diff --git a/wrapper/trace/datadog/datadog_test.go b/wrapper/trace/datadog/datadog_test.go index 4195b8b..9492e17 100644 --- a/wrapper/trace/datadog/datadog_test.go +++ b/wrapper/trace/datadog/datadog_test.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package datadog @@ -8,18 +9,18 @@ import ( "testing" "github.com/stretchr/testify/assert" - rrouter "github.com/unistack-org/micro-router-register/v3" - "github.com/unistack-org/micro/register/memory" - "github.com/unistack-org/micro/v3/client" - microerr "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" + rrouter "go.unistack.org/micro-router-register/v3" + "go.unistack.org/micro/register/memory" + "go.unistack.org/micro/v3/client" + microerr "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext" "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/mocktracer" "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer" - cli "github.com/unistack-org/micro/v3/client" - srv "github.com/unistack-org/micro/v3/server" + cli "go.unistack.org/micro/v3/client" + srv "go.unistack.org/micro/v3/server" ) type Test interface { @@ -29,6 +30,7 @@ type Test interface { type TestRequest struct { IsError bool } + type TestResponse struct { Message string } diff --git a/wrapper/trace/opentracing/opentracing_test.go b/wrapper/trace/opentracing/opentracing_test.go index feda47b..3375bc2 100644 --- a/wrapper/trace/opentracing/opentracing_test.go +++ b/wrapper/trace/opentracing/opentracing_test.go @@ -7,17 +7,17 @@ import ( opentracing "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/mocktracer" "github.com/stretchr/testify/assert" - cli "github.com/unistack-org/micro-client-grpc/v3" - jsoncodec "github.com/unistack-org/micro-codec-json/v3" - rrouter "github.com/unistack-org/micro-router-register/v3" - srv "github.com/unistack-org/micro-server-grpc/v3" - otwrapper "github.com/unistack-org/micro-wrapper-trace-opentracing/v3" - "github.com/unistack-org/micro/v3/broker" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/errors" - "github.com/unistack-org/micro/v3/register" - "github.com/unistack-org/micro/v3/router" - "github.com/unistack-org/micro/v3/server" + cli "go.unistack.org/micro-client-grpc/v3" + jsoncodec "go.unistack.org/micro-codec-json/v3" + rrouter "go.unistack.org/micro-router-register/v3" + srv "go.unistack.org/micro-server-grpc/v3" + otwrapper "go.unistack.org/micro-wrapper-trace-opentracing/v3" + "go.unistack.org/micro/v3/broker" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v3/router" + "go.unistack.org/micro/v3/server" ) type Test interface { @@ -27,6 +27,7 @@ type Test interface { type TestRequest struct { IsError bool } + type TestResponse struct { Message string }