From db62ad326b0e7d2c2a4f1a0a5115a6d7ec85789d Mon Sep 17 00:00:00 2001 From: "zhoucan.zc" Date: Thu, 16 Jan 2020 16:08:49 +0800 Subject: [PATCH 1/5] v5 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index deb087c..c5fa5c1 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/aliyun/aliyun-tablestore-go-sdk +module github.com/aliyun/aliyun-tablestore-go-sdk/v5 go 1.13 From aac215aa710d3a8b6c8d51c464ffca1c01e56074 Mon Sep 17 00:00:00 2001 From: "zhoucan.zc" Date: Mon, 20 Jan 2020 17:00:44 +0800 Subject: [PATCH 2/5] proper support for go modules --- go.mod | 3 +- go.sum | 35 +++++++++++++++++++ sample.go | 4 +-- sample/GlobalTableOperation.go | 2 +- sample/LocalIndexTableOperation.go | 2 +- sample/LocalTransactionOperation.go | 2 +- sample/MultipleRowOperation.go | 2 +- sample/SearchIndexOperation.go | 4 +-- sample/SingleRowOperation.go | 2 +- sample/StreamOperation.go | 4 +-- sample/TableOperation.go | 2 +- tablestore/api.go | 2 +- tablestore/error_test.go | 2 +- tablestore/model.go | 4 +-- tablestore/search/aggregation.go | 2 +- tablestore/search/aggregation_avg.go | 2 +- tablestore/search/aggregation_avg_test.go | 2 +- tablestore/search/aggregation_count.go | 2 +- tablestore/search/aggregation_count_test.go | 2 +- .../search/aggregation_distinct_count.go | 2 +- .../search/aggregation_distinct_count_test.go | 2 +- tablestore/search/aggregation_max.go | 2 +- tablestore/search/aggregation_max_test.go | 2 +- tablestore/search/aggregation_min.go | 2 +- tablestore/search/aggregation_min_test.go | 2 +- tablestore/search/aggregation_results.go | 2 +- tablestore/search/aggregation_results_test.go | 2 +- tablestore/search/aggregation_sum.go | 2 +- tablestore/search/aggregation_sum_test.go | 2 +- tablestore/search/aggregation_test.go | 2 +- tablestore/search/collapse.go | 2 +- tablestore/search/group_by.go | 2 +- tablestore/search/group_by_field.go | 2 +- tablestore/search/group_by_filter.go | 2 +- tablestore/search/group_by_geo_distance.go | 2 +- tablestore/search/group_by_range.go | 2 +- tablestore/search/group_by_results.go | 2 +- tablestore/search/group_by_results_test.go | 2 +- tablestore/search/group_by_sort.go | 2 +- tablestore/search/group_by_sort_group_key.go | 2 +- tablestore/search/group_by_sort_row_count.go | 2 +- tablestore/search/group_by_sort_sub_agg.go | 2 +- tablestore/search/group_by_test.go | 2 +- tablestore/search/query.go | 2 +- tablestore/search/query_bool.go | 2 +- tablestore/search/query_const_score.go | 2 +- tablestore/search/query_exists.go | 2 +- tablestore/search/query_exists_test.go | 2 +- tablestore/search/query_function_score.go | 2 +- tablestore/search/query_geo_bounding_box.go | 2 +- tablestore/search/query_geo_distance.go | 2 +- tablestore/search/query_geo_polygon.go | 2 +- tablestore/search/query_match.go | 2 +- tablestore/search/query_match_phrase.go | 2 +- tablestore/search/query_matchall.go | 2 +- tablestore/search/query_nested.go | 2 +- tablestore/search/query_prefix.go | 2 +- tablestore/search/query_range.go | 2 +- tablestore/search/query_term.go | 2 +- tablestore/search/query_terms.go | 2 +- tablestore/search/query_wildcard.go | 2 +- tablestore/search/range.go | 2 +- tablestore/search/search_query.go | 2 +- tablestore/search/sort.go | 2 +- tablestore/search/sort_field.go | 2 +- tablestore/search/sort_geo_distance.go | 2 +- tablestore/search/sort_mode.go | 2 +- tablestore/search/sort_order.go | 2 +- tablestore/search/sort_primary_key.go | 2 +- tablestore/search/sort_score.go | 2 +- tablestore/search_api.go | 4 +-- tablestore/search_api_test.go | 2 +- tablestore/search_model.go | 4 +-- tablestore/search_model_test.go | 2 +- tablestore/util.go | 2 +- timeline/README.md | 4 +-- timeline/column.go | 2 +- timeline/message.go | 2 +- timeline/option.go | 4 +-- timeline/sample/feed/feed.go | 6 ++-- timeline/sample/feed/main.go | 2 +- timeline/sample/im/im.go | 6 ++-- timeline/sample/im/main.go | 2 +- timeline/scan.go | 2 +- timeline/store.go | 6 ++-- timeline/timeline.go | 2 +- timeline/timeline_test.go | 6 ++-- timeline/writer/writer.go | 4 +-- timeline/writer/writer_test.go | 4 +-- tunnel/Gopkg.lock | 2 +- tunnel/api.go | 2 +- tunnel/api_test.go | 2 +- tunnel/channel.go | 2 +- tunnel/channel_test.go | 2 +- tunnel/error.go | 2 +- tunnel/model.go | 2 +- tunnel/protocol/plain_buffer.go | 2 +- tunnel/sample/backfillTunnel/main.go | 4 +-- tunnel/sample/createTunnel/main.go | 2 +- tunnel/sample/exactlyOnce/main.go | 6 ++-- tunnel/sample/openTunnel/main.go | 2 +- tunnel/sample/schedule/main.go | 2 +- tunnel/state.go | 2 +- tunnel/state_test.go | 2 +- tunnel/util.go | 2 +- 105 files changed, 160 insertions(+), 126 deletions(-) diff --git a/go.mod b/go.mod index c5fa5c1..0dba026 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,13 @@ module github.com/aliyun/aliyun-tablestore-go-sdk/v5 go 1.13 require ( - github.com/BurntSushi/toml v0.3.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible github.com/golang/mock v1.3.1 github.com/golang/protobuf v1.3.2 - github.com/kr/pretty v0.1.0 // indirect github.com/satori/go.uuid v1.2.0 github.com/smartystreets/goconvey v1.6.4 github.com/stretchr/testify v1.4.0 + go.uber.org/zap v1.13.0 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 gopkg.in/natefinch/lumberjack.v2 v2.0.0 ) diff --git a/go.sum b/go.sum index ef28cbc..a648786 100644 --- a/go.sum +++ b/go.sum @@ -1,24 +1,33 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/aliyun/aliyun-tablestore-go-sdk v4.1.3+incompatible h1:UbBDubZ5xDDaB50NvikAEPxz9dNG4+JVgIvV4y3dvFM= +github.com/aliyun/aliyun-tablestore-go-sdk v4.1.3+incompatible/go.mod h1:LDQHRZylxvcg8H7wBIDfvO5g/cy4/sz1iucBlc2l3Jw= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 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/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= @@ -26,19 +35,45 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/sample.go b/sample.go index 87ace13..7dffa60 100644 --- a/sample.go +++ b/sample.go @@ -3,8 +3,8 @@ package main import ( "os" - "github.com/aliyun/aliyun-tablestore-go-sdk/sample" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/sample" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" ) func main() { diff --git a/sample/GlobalTableOperation.go b/sample/GlobalTableOperation.go index 09b0e51..7a4bae3 100644 --- a/sample/GlobalTableOperation.go +++ b/sample/GlobalTableOperation.go @@ -1,7 +1,7 @@ package sample import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" "fmt" ) diff --git a/sample/LocalIndexTableOperation.go b/sample/LocalIndexTableOperation.go index b0348f8..c608070 100644 --- a/sample/LocalIndexTableOperation.go +++ b/sample/LocalIndexTableOperation.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" ) func CreateTableWithLocalIndexSample(client *tablestore.TableStoreClient, tableName string) { diff --git a/sample/LocalTransactionOperation.go b/sample/LocalTransactionOperation.go index 8ad177c..1e665f5 100644 --- a/sample/LocalTransactionOperation.go +++ b/sample/LocalTransactionOperation.go @@ -1,7 +1,7 @@ package sample import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" "fmt" "time" ) diff --git a/sample/MultipleRowOperation.go b/sample/MultipleRowOperation.go index 8dcc6fc..d2dfec5 100644 --- a/sample/MultipleRowOperation.go +++ b/sample/MultipleRowOperation.go @@ -2,7 +2,7 @@ package sample import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" "math/rand" "time" ) diff --git a/sample/SearchIndexOperation.go b/sample/SearchIndexOperation.go index 0ff099c..ad70f7c 100644 --- a/sample/SearchIndexOperation.go +++ b/sample/SearchIndexOperation.go @@ -4,8 +4,8 @@ import ( "encoding/json" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/search" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/search" "github.com/golang/protobuf/proto" "time" ) diff --git a/sample/SingleRowOperation.go b/sample/SingleRowOperation.go index d21d494..b4242f8 100644 --- a/sample/SingleRowOperation.go +++ b/sample/SingleRowOperation.go @@ -2,7 +2,7 @@ package sample import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" ) func PutRowSample(client *tablestore.TableStoreClient, tableName string) { diff --git a/sample/StreamOperation.go b/sample/StreamOperation.go index 60e3979..9374941 100644 --- a/sample/StreamOperation.go +++ b/sample/StreamOperation.go @@ -2,10 +2,10 @@ package sample import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" + "github.com/golang/protobuf/proto" "strconv" "time" - "github.com/golang/protobuf/proto" ) func GetStreamRecordWithTimestampSample(client *tablestore.TableStoreClient, tableName string) { diff --git a/sample/TableOperation.go b/sample/TableOperation.go index 929abff..18cd7cf 100644 --- a/sample/TableOperation.go +++ b/sample/TableOperation.go @@ -2,7 +2,7 @@ package sample import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" ) func CreateTableSample(client *tablestore.TableStoreClient, tableName string) { diff --git a/tablestore/api.go b/tablestore/api.go index 76452a1..7e6a4db 100644 --- a/tablestore/api.go +++ b/tablestore/api.go @@ -5,7 +5,7 @@ import ( "crypto/md5" "encoding/base64" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "io" "math/rand" diff --git a/tablestore/error_test.go b/tablestore/error_test.go index 4320ded..c16f6b9 100644 --- a/tablestore/error_test.go +++ b/tablestore/error_test.go @@ -2,7 +2,7 @@ package tablestore import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "testing" ) diff --git a/tablestore/model.go b/tablestore/model.go index eb3ed9f..48e55a4 100644 --- a/tablestore/model.go +++ b/tablestore/model.go @@ -2,14 +2,14 @@ package tablestore import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "math/rand" "net/http" "strconv" "strings" "time" - //"github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + //"github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" ) // @class TableStoreClient diff --git a/tablestore/search/aggregation.go b/tablestore/search/aggregation.go index 000a581..4cac630 100644 --- a/tablestore/search/aggregation.go +++ b/tablestore/search/aggregation.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/aggregation_avg.go b/tablestore/search/aggregation_avg.go index b36f881..6ef60f4 100644 --- a/tablestore/search/aggregation_avg.go +++ b/tablestore/search/aggregation_avg.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/aggregation_avg_test.go b/tablestore/search/aggregation_avg_test.go index 8fd6b28..9aff5e6 100644 --- a/tablestore/search/aggregation_avg_test.go +++ b/tablestore/search/aggregation_avg_test.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "testing" diff --git a/tablestore/search/aggregation_count.go b/tablestore/search/aggregation_count.go index 5b2ad65..ee2b0a3 100644 --- a/tablestore/search/aggregation_count.go +++ b/tablestore/search/aggregation_count.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/aggregation_count_test.go b/tablestore/search/aggregation_count_test.go index a3cf7f7..5214ec5 100644 --- a/tablestore/search/aggregation_count_test.go +++ b/tablestore/search/aggregation_count_test.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "testing" diff --git a/tablestore/search/aggregation_distinct_count.go b/tablestore/search/aggregation_distinct_count.go index 85e9c2e..3e599ef 100644 --- a/tablestore/search/aggregation_distinct_count.go +++ b/tablestore/search/aggregation_distinct_count.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/aggregation_distinct_count_test.go b/tablestore/search/aggregation_distinct_count_test.go index a3e6d04..21698d7 100644 --- a/tablestore/search/aggregation_distinct_count_test.go +++ b/tablestore/search/aggregation_distinct_count_test.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "testing" diff --git a/tablestore/search/aggregation_max.go b/tablestore/search/aggregation_max.go index f8846a5..91d8f27 100644 --- a/tablestore/search/aggregation_max.go +++ b/tablestore/search/aggregation_max.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/aggregation_max_test.go b/tablestore/search/aggregation_max_test.go index 926f1c6..175e3a4 100644 --- a/tablestore/search/aggregation_max_test.go +++ b/tablestore/search/aggregation_max_test.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "testing" diff --git a/tablestore/search/aggregation_min.go b/tablestore/search/aggregation_min.go index 44f6d53..80a35cf 100644 --- a/tablestore/search/aggregation_min.go +++ b/tablestore/search/aggregation_min.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/aggregation_min_test.go b/tablestore/search/aggregation_min_test.go index 4dfa488..d852abb 100644 --- a/tablestore/search/aggregation_min_test.go +++ b/tablestore/search/aggregation_min_test.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "testing" diff --git a/tablestore/search/aggregation_results.go b/tablestore/search/aggregation_results.go index b4c9f7c..9646cae 100644 --- a/tablestore/search/aggregation_results.go +++ b/tablestore/search/aggregation_results.go @@ -3,7 +3,7 @@ package search import ( "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/aggregation_results_test.go b/tablestore/search/aggregation_results_test.go index bcb8a5a..f37146b 100644 --- a/tablestore/search/aggregation_results_test.go +++ b/tablestore/search/aggregation_results_test.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "testing" diff --git a/tablestore/search/aggregation_sum.go b/tablestore/search/aggregation_sum.go index af7f2d3..9f70da7 100644 --- a/tablestore/search/aggregation_sum.go +++ b/tablestore/search/aggregation_sum.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/aggregation_sum_test.go b/tablestore/search/aggregation_sum_test.go index 49c5a59..fc03134 100644 --- a/tablestore/search/aggregation_sum_test.go +++ b/tablestore/search/aggregation_sum_test.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "testing" diff --git a/tablestore/search/aggregation_test.go b/tablestore/search/aggregation_test.go index 280c223..09c0da5 100644 --- a/tablestore/search/aggregation_test.go +++ b/tablestore/search/aggregation_test.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/stretchr/testify/assert" "testing" ) diff --git a/tablestore/search/collapse.go b/tablestore/search/collapse.go index 60b19cb..da87b71 100644 --- a/tablestore/search/collapse.go +++ b/tablestore/search/collapse.go @@ -1,6 +1,6 @@ package search -import "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" +import "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" type Collapse struct { FieldName string diff --git a/tablestore/search/group_by.go b/tablestore/search/group_by.go index e59731d..73d1445 100644 --- a/tablestore/search/group_by.go +++ b/tablestore/search/group_by.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/group_by_field.go b/tablestore/search/group_by_field.go index 517a436..08e1488 100644 --- a/tablestore/search/group_by_field.go +++ b/tablestore/search/group_by_field.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/group_by_filter.go b/tablestore/search/group_by_filter.go index 4b10381..483e6c1 100644 --- a/tablestore/search/group_by_filter.go +++ b/tablestore/search/group_by_filter.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/group_by_geo_distance.go b/tablestore/search/group_by_geo_distance.go index b5cad78..6f8e347 100644 --- a/tablestore/search/group_by_geo_distance.go +++ b/tablestore/search/group_by_geo_distance.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/group_by_range.go b/tablestore/search/group_by_range.go index 2c13e20..e4f288c 100644 --- a/tablestore/search/group_by_range.go +++ b/tablestore/search/group_by_range.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/group_by_results.go b/tablestore/search/group_by_results.go index 9a5ace4..f01fdb7 100644 --- a/tablestore/search/group_by_results.go +++ b/tablestore/search/group_by_results.go @@ -3,7 +3,7 @@ package search import ( "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/group_by_results_test.go b/tablestore/search/group_by_results_test.go index 5b9e1bc..2db76d4 100644 --- a/tablestore/search/group_by_results_test.go +++ b/tablestore/search/group_by_results_test.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "math" diff --git a/tablestore/search/group_by_sort.go b/tablestore/search/group_by_sort.go index 6ea1ed5..644ab87 100644 --- a/tablestore/search/group_by_sort.go +++ b/tablestore/search/group_by_sort.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" ) //interface of each child 'group by sorter' diff --git a/tablestore/search/group_by_sort_group_key.go b/tablestore/search/group_by_sort_group_key.go index 2a038f3..aecc4b3 100644 --- a/tablestore/search/group_by_sort_group_key.go +++ b/tablestore/search/group_by_sort_group_key.go @@ -1,6 +1,6 @@ package search -import "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" +import "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" type GroupKeyGroupBySort struct { Order *SortOrder diff --git a/tablestore/search/group_by_sort_row_count.go b/tablestore/search/group_by_sort_row_count.go index 39b05fc..24c20c7 100644 --- a/tablestore/search/group_by_sort_row_count.go +++ b/tablestore/search/group_by_sort_row_count.go @@ -1,6 +1,6 @@ package search -import "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" +import "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" type RowCountGroupBySort struct { Order *SortOrder diff --git a/tablestore/search/group_by_sort_sub_agg.go b/tablestore/search/group_by_sort_sub_agg.go index b2bbbd6..e4d5415 100644 --- a/tablestore/search/group_by_sort_sub_agg.go +++ b/tablestore/search/group_by_sort_sub_agg.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" ) type SubAggGroupBySort struct { diff --git a/tablestore/search/group_by_test.go b/tablestore/search/group_by_test.go index 63bfcbf..0361c40 100644 --- a/tablestore/search/group_by_test.go +++ b/tablestore/search/group_by_test.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/stretchr/testify/assert" "testing" ) diff --git a/tablestore/search/query.go b/tablestore/search/query.go index 3612c2c..13c69b9 100644 --- a/tablestore/search/query.go +++ b/tablestore/search/query.go @@ -1,6 +1,6 @@ package search -import "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" +import "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" type QueryType int diff --git a/tablestore/search/query_bool.go b/tablestore/search/query_bool.go index 230d2e0..5374504 100644 --- a/tablestore/search/query_bool.go +++ b/tablestore/search/query_bool.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_const_score.go b/tablestore/search/query_const_score.go index 124d826..cad5164 100644 --- a/tablestore/search/query_const_score.go +++ b/tablestore/search/query_const_score.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_exists.go b/tablestore/search/query_exists.go index 7710e41..62f8ccb 100644 --- a/tablestore/search/query_exists.go +++ b/tablestore/search/query_exists.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_exists_test.go b/tablestore/search/query_exists_test.go index f601d34..53f8020 100644 --- a/tablestore/search/query_exists_test.go +++ b/tablestore/search/query_exists_test.go @@ -2,7 +2,7 @@ package search import ( "bytes" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "testing" ) diff --git a/tablestore/search/query_function_score.go b/tablestore/search/query_function_score.go index c111530..0654f52 100644 --- a/tablestore/search/query_function_score.go +++ b/tablestore/search/query_function_score.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_geo_bounding_box.go b/tablestore/search/query_geo_bounding_box.go index 9dcbfe8..624df9a 100644 --- a/tablestore/search/query_geo_bounding_box.go +++ b/tablestore/search/query_geo_bounding_box.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_geo_distance.go b/tablestore/search/query_geo_distance.go index 5906cb6..ea4ea6e 100644 --- a/tablestore/search/query_geo_distance.go +++ b/tablestore/search/query_geo_distance.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_geo_polygon.go b/tablestore/search/query_geo_polygon.go index f38efe7..9cbda17 100644 --- a/tablestore/search/query_geo_polygon.go +++ b/tablestore/search/query_geo_polygon.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_match.go b/tablestore/search/query_match.go index d02f85c..e074f38 100644 --- a/tablestore/search/query_match.go +++ b/tablestore/search/query_match.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_match_phrase.go b/tablestore/search/query_match_phrase.go index fc4511b..4c7aa1c 100644 --- a/tablestore/search/query_match_phrase.go +++ b/tablestore/search/query_match_phrase.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_matchall.go b/tablestore/search/query_matchall.go index 778dbec..fa8d9b7 100644 --- a/tablestore/search/query_matchall.go +++ b/tablestore/search/query_matchall.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_nested.go b/tablestore/search/query_nested.go index 15a9bad..26da320 100644 --- a/tablestore/search/query_nested.go +++ b/tablestore/search/query_nested.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_prefix.go b/tablestore/search/query_prefix.go index a94d0cd..7df3133 100644 --- a/tablestore/search/query_prefix.go +++ b/tablestore/search/query_prefix.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_range.go b/tablestore/search/query_range.go index 28e3353..7a84bba 100644 --- a/tablestore/search/query_range.go +++ b/tablestore/search/query_range.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_term.go b/tablestore/search/query_term.go index 1aac718..41150a0 100644 --- a/tablestore/search/query_term.go +++ b/tablestore/search/query_term.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_terms.go b/tablestore/search/query_terms.go index 1401ff4..96780bf 100644 --- a/tablestore/search/query_terms.go +++ b/tablestore/search/query_terms.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/query_wildcard.go b/tablestore/search/query_wildcard.go index f885ca6..6423d90 100644 --- a/tablestore/search/query_wildcard.go +++ b/tablestore/search/query_wildcard.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/range.go b/tablestore/search/range.go index b79b5cc..7b2008d 100644 --- a/tablestore/search/range.go +++ b/tablestore/search/range.go @@ -2,7 +2,7 @@ package search import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "math" ) diff --git a/tablestore/search/search_query.go b/tablestore/search/search_query.go index 3c23f71..ef62811 100644 --- a/tablestore/search/search_query.go +++ b/tablestore/search/search_query.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search/sort.go b/tablestore/search/sort.go index 3b3e4a1..8f6ebdb 100644 --- a/tablestore/search/sort.go +++ b/tablestore/search/sort.go @@ -1,7 +1,7 @@ package search import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" ) type Sorter interface { diff --git a/tablestore/search/sort_field.go b/tablestore/search/sort_field.go index c4272a8..7b605e4 100644 --- a/tablestore/search/sort_field.go +++ b/tablestore/search/sort_field.go @@ -1,6 +1,6 @@ package search -import "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" +import "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" type NestedFilter struct { Path string diff --git a/tablestore/search/sort_geo_distance.go b/tablestore/search/sort_geo_distance.go index de4b07c..cb15efe 100644 --- a/tablestore/search/sort_geo_distance.go +++ b/tablestore/search/sort_geo_distance.go @@ -3,7 +3,7 @@ package search import ( "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" ) type GeoDistanceType int8 diff --git a/tablestore/search/sort_mode.go b/tablestore/search/sort_mode.go index 4b04ac1..44acdc0 100644 --- a/tablestore/search/sort_mode.go +++ b/tablestore/search/sort_mode.go @@ -3,7 +3,7 @@ package search import ( "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" ) type SortMode int8 diff --git a/tablestore/search/sort_order.go b/tablestore/search/sort_order.go index b936bfe..2c61ea6 100644 --- a/tablestore/search/sort_order.go +++ b/tablestore/search/sort_order.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" ) type SortOrder int8 diff --git a/tablestore/search/sort_primary_key.go b/tablestore/search/sort_primary_key.go index 4a54a35..698c4ca 100644 --- a/tablestore/search/sort_primary_key.go +++ b/tablestore/search/sort_primary_key.go @@ -1,6 +1,6 @@ package search -import "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" +import "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" type PrimaryKeySort struct { Order *SortOrder diff --git a/tablestore/search/sort_score.go b/tablestore/search/sort_score.go index 00eef31..f0d9307 100644 --- a/tablestore/search/sort_score.go +++ b/tablestore/search/sort_score.go @@ -1,6 +1,6 @@ package search -import "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" +import "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" type ScoreSort struct { Order *SortOrder diff --git a/tablestore/search_api.go b/tablestore/search_api.go index ab78d11..6fe2ef2 100644 --- a/tablestore/search_api.go +++ b/tablestore/search_api.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/search" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/search" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search_api_test.go b/tablestore/search_api_test.go index d696175..d64afcf 100644 --- a/tablestore/search_api_test.go +++ b/tablestore/search_api_test.go @@ -2,7 +2,7 @@ package tablestore import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/search" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/search" "github.com/golang/protobuf/proto" . "gopkg.in/check.v1" "math" diff --git a/tablestore/search_model.go b/tablestore/search_model.go index 45b4055..8360e4c 100644 --- a/tablestore/search_model.go +++ b/tablestore/search_model.go @@ -4,8 +4,8 @@ import ( "encoding/json" "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/search" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/search" "github.com/golang/protobuf/proto" ) diff --git a/tablestore/search_model_test.go b/tablestore/search_model_test.go index a17f01f..c1f2a7c 100644 --- a/tablestore/search_model_test.go +++ b/tablestore/search_model_test.go @@ -1,7 +1,7 @@ package tablestore import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "testing" diff --git a/tablestore/util.go b/tablestore/util.go index b7fa15c..8f55f0d 100644 --- a/tablestore/util.go +++ b/tablestore/util.go @@ -3,7 +3,7 @@ package tablestore import ( "bytes" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "io" "io/ioutil" diff --git a/timeline/README.md b/timeline/README.md index ea70f50..c8c8f53 100644 --- a/timeline/README.md +++ b/timeline/README.md @@ -41,7 +41,7 @@ $ cd timeline $ go test -bench=. -benchtime=10s -test.cpu=12 goos: linux goarch: amd64 -pkg: github.com/aliyun/aliyun-tablestore-go-sdk/timeline +pkg: github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline BenchmarkTmLine_BatchStore_Concurrent-12 10000 1737993 ns/op BenchmarkTmLine_BatchStore_WriteSpread-12 100 127729883 ns/op BenchmarkTmLine_BatchStore_WriteSpread_IgnoreMessageLost-12 200 80166859 ns/op @@ -55,7 +55,7 @@ $ cd timeline $ go test -bench=. -benchtime=10s -test.cpu=12 goos: linux goarch: amd64 -pkg: github.com/aliyun/aliyun-tablestore-go-sdk/timeline +pkg: github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline BenchmarkTmLine_BatchStore_Concurrent-12 10000 1791522 ns/op BenchmarkTmLine_BatchStore_WriteSpread-12 100 124597783 ns/op BenchmarkTmLine_BatchStore_WriteSpread_IgnoreMessageLost-12 200 83780501 ns/op diff --git a/timeline/column.go b/timeline/column.go index 3f8cf74..ed13cf8 100644 --- a/timeline/column.go +++ b/timeline/column.go @@ -1,7 +1,7 @@ package timeline import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" ) type ColumnMap struct { diff --git a/timeline/message.go b/timeline/message.go index 4a88e3f..18f395f 100644 --- a/timeline/message.go +++ b/timeline/message.go @@ -1,7 +1,7 @@ package timeline import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" "strings" ) diff --git a/timeline/option.go b/timeline/option.go index cb57342..f856991 100644 --- a/timeline/option.go +++ b/timeline/option.go @@ -3,8 +3,8 @@ package timeline import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/writer" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/writer" ) var ( diff --git a/timeline/sample/feed/feed.go b/timeline/sample/feed/feed.go index 3c8788d..c4553a2 100644 --- a/timeline/sample/feed/feed.go +++ b/timeline/sample/feed/feed.go @@ -2,9 +2,9 @@ package main import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/promise" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/writer" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/promise" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/writer" "math" ) diff --git a/timeline/sample/feed/main.go b/timeline/sample/feed/main.go index 99860ec..b0478cf 100644 --- a/timeline/sample/feed/main.go +++ b/timeline/sample/feed/main.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline" "log" "time" ) diff --git a/timeline/sample/im/im.go b/timeline/sample/im/im.go index ac98bf8..0ceec57 100644 --- a/timeline/sample/im/im.go +++ b/timeline/sample/im/im.go @@ -2,9 +2,9 @@ package main import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/promise" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/writer" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/promise" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/writer" "math" ) diff --git a/timeline/sample/im/main.go b/timeline/sample/im/main.go index 082f4b6..b0c6dea 100644 --- a/timeline/sample/im/main.go +++ b/timeline/sample/im/main.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline" "log" "time" ) diff --git a/timeline/scan.go b/timeline/scan.go index 943ec01..a61d8de 100644 --- a/timeline/scan.go +++ b/timeline/scan.go @@ -2,7 +2,7 @@ package timeline import ( "context" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" ) type ScanParameter struct { diff --git a/timeline/store.go b/timeline/store.go index 81f74ca..9c74071 100644 --- a/timeline/store.go +++ b/timeline/store.go @@ -3,9 +3,9 @@ package timeline import ( "strings" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/promise" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/writer" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/promise" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/writer" ) var pkColumns = 2 diff --git a/timeline/timeline.go b/timeline/timeline.go index 622aafa..7bf650c 100644 --- a/timeline/timeline.go +++ b/timeline/timeline.go @@ -2,7 +2,7 @@ package timeline import ( "context" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/promise" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/promise" ) type Api interface { diff --git a/timeline/timeline_test.go b/timeline/timeline_test.go index 9ac4247..ae5245a 100644 --- a/timeline/timeline_test.go +++ b/timeline/timeline_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/promise" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/writer" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/promise" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/writer" ) func BenchmarkTmLine_BatchStore_Concurrent(b *testing.B) { diff --git a/timeline/writer/writer.go b/timeline/writer/writer.go index 5236fb0..925e57e 100644 --- a/timeline/writer/writer.go +++ b/timeline/writer/writer.go @@ -3,8 +3,8 @@ package writer import ( "context" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/promise" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/promise" "net/http" "time" ) diff --git a/timeline/writer/writer_test.go b/timeline/writer/writer_test.go index 6b9ecd6..eb5a828 100644 --- a/timeline/writer/writer_test.go +++ b/timeline/writer/writer_test.go @@ -1,8 +1,8 @@ package writer import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" - "github.com/aliyun/aliyun-tablestore-go-sdk/timeline/promise" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/timeline/promise" "math/rand" "os" "strings" diff --git a/tunnel/Gopkg.lock b/tunnel/Gopkg.lock index 9c72bea..64c4f4f 100644 --- a/tunnel/Gopkg.lock +++ b/tunnel/Gopkg.lock @@ -152,7 +152,7 @@ analyzer-name = "dep" analyzer-version = 1 input-imports = [ - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore", + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore", "github.com/cenkalti/backoff", "github.com/golang/mock/gomock", "github.com/golang/protobuf/proto", diff --git a/tunnel/api.go b/tunnel/api.go index 0f57182..b9aa389 100644 --- a/tunnel/api.go +++ b/tunnel/api.go @@ -7,7 +7,7 @@ import ( "encoding/json" "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" "github.com/cenkalti/backoff" "github.com/golang/protobuf/proto" "github.com/satori/go.uuid" diff --git a/tunnel/api_test.go b/tunnel/api_test.go index f03246e..126c8c9 100644 --- a/tunnel/api_test.go +++ b/tunnel/api_test.go @@ -2,7 +2,7 @@ package tunnel import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "io/ioutil" diff --git a/tunnel/channel.go b/tunnel/channel.go index 427f1b3..1cbe93e 100644 --- a/tunnel/channel.go +++ b/tunnel/channel.go @@ -1,7 +1,7 @@ package tunnel import ( - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" "github.com/cenkalti/backoff" "go.uber.org/zap" "sync" diff --git a/tunnel/channel_test.go b/tunnel/channel_test.go index b031766..4d77e04 100644 --- a/tunnel/channel_test.go +++ b/tunnel/channel_test.go @@ -2,7 +2,7 @@ package tunnel import ( "errors" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" "github.com/golang/mock/gomock" . "github.com/smartystreets/goconvey/convey" "go.uber.org/zap" diff --git a/tunnel/error.go b/tunnel/error.go index 76a7753..8914638 100644 --- a/tunnel/error.go +++ b/tunnel/error.go @@ -2,7 +2,7 @@ package tunnel import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" ) const ( diff --git a/tunnel/model.go b/tunnel/model.go index 1a92848..59a56b8 100644 --- a/tunnel/model.go +++ b/tunnel/model.go @@ -2,7 +2,7 @@ package tunnel import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" "strconv" "strings" "time" diff --git a/tunnel/protocol/plain_buffer.go b/tunnel/protocol/plain_buffer.go index dff6aa2..3c1d049 100644 --- a/tunnel/protocol/plain_buffer.go +++ b/tunnel/protocol/plain_buffer.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/binary" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" "io" "math" ) diff --git a/tunnel/sample/backfillTunnel/main.go b/tunnel/sample/backfillTunnel/main.go index e1f51f3..e95a18b 100644 --- a/tunnel/sample/backfillTunnel/main.go +++ b/tunnel/sample/backfillTunnel/main.go @@ -2,8 +2,8 @@ package main import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" "log" "os" "os/signal" diff --git a/tunnel/sample/createTunnel/main.go b/tunnel/sample/createTunnel/main.go index d08752d..68e7b08 100644 --- a/tunnel/sample/createTunnel/main.go +++ b/tunnel/sample/createTunnel/main.go @@ -6,7 +6,7 @@ import ( "os" "os/signal" "syscall" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel" ) type Config struct { diff --git a/tunnel/sample/exactlyOnce/main.go b/tunnel/sample/exactlyOnce/main.go index 80ae522..5b72361 100644 --- a/tunnel/sample/exactlyOnce/main.go +++ b/tunnel/sample/exactlyOnce/main.go @@ -1,10 +1,10 @@ -package exactlyOnce +package main import ( "encoding/json" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tablestore" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel" "log" "os" "os/signal" diff --git a/tunnel/sample/openTunnel/main.go b/tunnel/sample/openTunnel/main.go index 85c6291..797f3dd 100644 --- a/tunnel/sample/openTunnel/main.go +++ b/tunnel/sample/openTunnel/main.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel" "log" "os" "os/signal" diff --git a/tunnel/sample/schedule/main.go b/tunnel/sample/schedule/main.go index ed463c7..2a76d61 100644 --- a/tunnel/sample/schedule/main.go +++ b/tunnel/sample/schedule/main.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel" "log" ) diff --git a/tunnel/state.go b/tunnel/state.go index 3b29077..ab201a0 100644 --- a/tunnel/state.go +++ b/tunnel/state.go @@ -4,7 +4,7 @@ import ( "errors" "go.uber.org/zap" "sync" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" ) type BatchGetStatusReq struct { diff --git a/tunnel/state_test.go b/tunnel/state_test.go index 47ba735..92f9ec8 100644 --- a/tunnel/state_test.go +++ b/tunnel/state_test.go @@ -3,7 +3,7 @@ package tunnel import ( "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" "github.com/golang/mock/gomock" . "github.com/smartystreets/goconvey/convey" "go.uber.org/zap" diff --git a/tunnel/util.go b/tunnel/util.go index 870a695..76f8d0b 100644 --- a/tunnel/util.go +++ b/tunnel/util.go @@ -5,7 +5,7 @@ import ( "encoding/base64" "errors" "fmt" - "github.com/aliyun/aliyun-tablestore-go-sdk/tunnel/protocol" + "github.com/aliyun/aliyun-tablestore-go-sdk/v5/tunnel/protocol" "github.com/cenkalti/backoff" "github.com/golang/protobuf/proto" "time" From 59c4c910e0313fac9b0e507372f765464f1e6a74 Mon Sep 17 00:00:00 2001 From: "zhoucan.zc" Date: Mon, 20 Jan 2020 17:13:46 +0800 Subject: [PATCH 3/5] fix fmt type issue --- tunnel/model.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tunnel/model.go b/tunnel/model.go index 59a56b8..7adbb00 100644 --- a/tunnel/model.go +++ b/tunnel/model.go @@ -191,9 +191,9 @@ type Record struct { func (r *Record) String() string { return fmt.Sprintf( - "{\"Type\":%s, \"PrimaryKey\":%s, \"Columns\":%s}", + "{\"Type\":%s, \"PrimaryKey\":%v, \"Columns\":%s}", r.Type, - *r.PrimaryKey, + r.PrimaryKey, r.Columns) } From dd51fdf2a61700dd21401d270ad35acdb02aff40 Mon Sep 17 00:00:00 2001 From: "zhoucan.zc" Date: Mon, 20 Jan 2020 17:39:52 +0800 Subject: [PATCH 4/5] update go mod --- go.mod | 2 +- go.sum | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 0dba026..7ac0d9b 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,6 @@ require ( github.com/smartystreets/goconvey v1.6.4 github.com/stretchr/testify v1.4.0 go.uber.org/zap v1.13.0 - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 gopkg.in/natefinch/lumberjack.v2 v2.0.0 ) diff --git a/go.sum b/go.sum index a648786..f11816a 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,7 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aliyun/aliyun-tablestore-go-sdk v4.1.3+incompatible h1:UbBDubZ5xDDaB50NvikAEPxz9dNG4+JVgIvV4y3dvFM= -github.com/aliyun/aliyun-tablestore-go-sdk v4.1.3+incompatible/go.mod h1:LDQHRZylxvcg8H7wBIDfvO5g/cy4/sz1iucBlc2l3Jw= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 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= @@ -67,9 +64,8 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64 golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= From 818d478eefd7e7f39f03a9a88add6f10092ea167 Mon Sep 17 00:00:00 2001 From: "zhoucan.zc" Date: Thu, 30 Jul 2020 15:24:20 +0800 Subject: [PATCH 5/5] support simple matrix in getRange --- tablestore/api.go | 70 +- tablestore/api_test.go | 155 +- tablestore/matrix.go | 254 ++ tablestore/matrix_test.go | 104 + tablestore/model.go | 147 +- tablestore/otsprotocol/ots_filter.pb.go | 294 +- tablestore/otsprotocol/table_store.pb.go | 3412 +++++++++++++++++----- tablestore/otsprotocol/table_store.proto | 14 + tablestore/plain_buffer.go | 1 + 9 files changed, 3516 insertions(+), 935 deletions(-) create mode 100644 tablestore/matrix.go create mode 100644 tablestore/matrix_test.go diff --git a/tablestore/api.go b/tablestore/api.go index 7e6a4db..d6e7292 100644 --- a/tablestore/api.go +++ b/tablestore/api.go @@ -1001,6 +1001,12 @@ func (tableStoreClient *TableStoreClient) GetRange(request *GetRangeRequest) (*G req.EndColumn = request.RangeRowQueryCriteria.EndColumn } + req.DataBlockTypeHint = toPBDataBlockType(request.RangeRowQueryCriteria.DataBlockType) + req.CompressTypeHint = toPBCompressType(request.RangeRowQueryCriteria.CompressType) + if request.RangeRowQueryCriteria.ReturnSpecifiedPkOnly { + req.ReturnEntirePrimaryKeys = proto.Bool(false) + } + req.InclusiveStartPrimaryKey = request.RangeRowQueryCriteria.StartPrimaryKey.Build(false) req.ExclusiveEndPrimaryKey = request.RangeRowQueryCriteria.EndPrimaryKey.Build(false) @@ -1012,6 +1018,11 @@ func (tableStoreClient *TableStoreClient) GetRange(request *GetRangeRequest) (*G response.ConsumedCapacityUnit.Read = *resp.Consumed.CapacityUnit.Read response.ConsumedCapacityUnit.Write = *resp.Consumed.CapacityUnit.Write + compressType, err := parseProtocolCompressType(resp.GetCompressType()) + if err != nil { + return nil, err + } + response.CompressType = compressType if len(resp.NextStartPrimaryKey) != 0 { currentRows, err := readRowsWithHeader(bytes.NewReader(resp.NextStartPrimaryKey)) if err != nil { @@ -1029,13 +1040,58 @@ func (tableStoreClient *TableStoreClient) GetRange(request *GetRangeRequest) (*G return response, nil } - rows, err := readRowsWithHeader(bytes.NewReader(resp.Rows)) + switch resp.GetDataBlockType() { + case otsprotocol.DataBlockType_DBT_PLAIN_BUFFER: + rows, err := parsePlainBufferRows(resp.Rows) + if err != nil { + return nil, err + } + response.Rows = rows + response.DataBlockType = PlainBuffer + case otsprotocol.DataBlockType_DBT_SIMPLE_ROW_MATRIX: + rows, err := parseMatrixRows(resp.Rows) + if err != nil { + return nil, err + } + response.Rows = rows + response.DataBlockType = SimpleRowMatrix + default: + return nil, fmt.Errorf("unknow data block type %d", resp.GetDataBlockType()) + } + return response, nil +} + +func toPBCompressType(compressType CompressType) *otsprotocol.CompressType { + switch compressType { + case None: + return otsprotocol.CompressType_CPT_NONE.Enum() + default: + // return CompressType_CPT_NONE + return otsprotocol.CompressType_CPT_NONE.Enum() + } +} + +func toPBDataBlockType(blockType DataBlockType) *otsprotocol.DataBlockType { + switch blockType { + case PlainBuffer: + return otsprotocol.DataBlockType_DBT_PLAIN_BUFFER.Enum() + case SimpleRowMatrix: + return otsprotocol.DataBlockType_DBT_SIMPLE_ROW_MATRIX.Enum() + default: + // return DataBlockType_DBT_PLAIN_BUFFER + return otsprotocol.DataBlockType_DBT_PLAIN_BUFFER.Enum() + } +} + +func parsePlainBufferRows(rowBytes []byte) ([]*Row, error) { + pbRows, err := readRowsWithHeader(bytes.NewReader(rowBytes)) if err != nil { - return response, err + return nil, err } - for _, row := range rows { - currentRow := &Row{} + rows := make([]*Row, len(pbRows)) + for i, row := range pbRows { + currentRow := new(Row) currentpk := new(PrimaryKey) for _, pk := range row.primaryKey { pkColumn := &PrimaryKeyColumn{ColumnName: string(pk.cellName), Value: pk.cellValue.Value} @@ -1049,11 +1105,9 @@ func (tableStoreClient *TableStoreClient) GetRange(request *GetRangeRequest) (*G currentRow.Columns = append(currentRow.Columns, dataColumn) } - response.Rows = append(response.Rows, currentRow) + rows[i] = currentRow } - - return response, nil - + return rows, nil } func (client *TableStoreClient) ListStream(req *ListStreamRequest) (*ListStreamResponse, error) { diff --git a/tablestore/api_test.go b/tablestore/api_test.go index 113a672..4dfde9d 100644 --- a/tablestore/api_test.go +++ b/tablestore/api_test.go @@ -1,20 +1,25 @@ package tablestore import ( + "encoding/base64" "fmt" . "gopkg.in/check.v1" + "io" "math/rand" "net/http" "os" "runtime" "strconv" "strings" + "syscall" "testing" "time" - "io" - "syscall" ) +func init() { + rand.Seed(time.Now().UnixNano()) +} + // Hook up gocheck into the "go test" runner. func Test(t *testing.T) { TestingT(t) @@ -26,8 +31,16 @@ var tableNamePrefix string var _ = Suite(&TableStoreSuite{}) -var defaultTableName = "defaulttable" -var rangeQueryTableName = "rangetable" +var ( + defaultTableName = "defaulttable" + rangeQueryTableName = "rangetable" + fuzzyTableName = "fuzzytable" + + fuzzyMetaPk1 = "pkStr" + fuzzyMetaPk2 = "pkBlob" + fuzzyMetaPk3 = "pkInt" + fuzzyMetaAttr = []string{"string", "integer", "boolean", "double", "blob"} +) // Todo: use config var client TableStoreApi @@ -46,9 +59,33 @@ func (s *TableStoreSuite) SetUpSuite(c *C) { rangeQueryTableName = tableNamePrefix + rangeQueryTableName PrepareTable(defaultTableName) PrepareTable2(rangeQueryTableName) + err := PrepareFuzzyTable(fuzzyTableName) + c.Assert(err, IsNil) invalidClient = NewClient(endpoint, instanceName, accessKeyId, "invalidsecret") } +func PrepareFuzzyTable(tableName string) error { + client.DeleteTable(&DeleteTableRequest{TableName: tableName}) + time.Sleep(time.Second) + meta := &TableMeta{ + TableName: tableName, + } + meta.AddPrimaryKeyColumn(fuzzyMetaPk1, PrimaryKeyType_STRING) + meta.AddPrimaryKeyColumn(fuzzyMetaPk2, PrimaryKeyType_BINARY) + meta.AddPrimaryKeyColumn(fuzzyMetaPk3, PrimaryKeyType_INTEGER) + req := &CreateTableRequest{ + TableMeta: meta, + TableOption: &TableOption{ + TimeToAlive: -1, + MaxVersion: 1, + }, + ReservedThroughput: &ReservedThroughput{0,0}, + } + _, err := client.CreateTable(req) + time.Sleep(time.Second) + return err +} + func PrepareTable(tableName string) error { createtableRequest := new(CreateTableRequest) tableMeta := new(TableMeta) @@ -937,6 +974,116 @@ func (s *TableStoreSuite) TestBatchWriteRow(c *C) { fmt.Println("TestBatchWriteRow finished") } +func (s *TableStoreSuite) TestFuzzyGetRangeMatrix(c *C) { + fmt.Println("FuzzyGetRangeMatrix") + expect, err := PrepareFuzzyTableData(fuzzyTableName, 1024, 10240, 10000) + c.Assert(err, IsNil) + startPk := new(PrimaryKey) + startPk.AddPrimaryKeyColumnWithMinValue(fuzzyMetaPk1) + startPk.AddPrimaryKeyColumnWithMinValue(fuzzyMetaPk2) + startPk.AddPrimaryKeyColumnWithMinValue(fuzzyMetaPk3) + endPk := new(PrimaryKey) + endPk.AddPrimaryKeyColumnWithMaxValue(fuzzyMetaPk1) + endPk.AddPrimaryKeyColumnWithMaxValue(fuzzyMetaPk2) + endPk.AddPrimaryKeyColumnWithMaxValue(fuzzyMetaPk3) + criteria := &RangeRowQueryCriteria{ + TableName: fuzzyTableName, + StartPrimaryKey: startPk, + EndPrimaryKey: endPk, + ColumnsToGet: fuzzyMetaAttr, + MaxVersion: 1, + Limit: 2000, + DataBlockType: SimpleRowMatrix, + } + for { + resp, err := client.GetRange(&GetRangeRequest{criteria}) + c.Assert(err, IsNil) + c.Assert(resp.DataBlockType, Equals, SimpleRowMatrix) + for _, row := range resp.Rows { + pks := row.PrimaryKey.PrimaryKeys + cpKey := pks[0].Value.(string)+ "-" + base64.StdEncoding.EncodeToString(pks[1].Value.([]byte)) + + "-" +fmt.Sprintf("%d", pks[2].Value.(int64)) + attrs, ok := expect[cpKey] + if !ok { + c.Errorf("got %s", cpKey) + } + for _, column := range row.Columns { + //fmt.Printf("%s %v\n", column.ColumnName, column.Value) + switch column.ColumnName { + case "string": + c.Assert(column.Value, DeepEquals, attrs[column.ColumnName]) + case "blob": + c.Assert(column.Value.([]byte), DeepEquals, attrs[column.ColumnName].([]byte)) + case "boolean": + c.Assert(column.Value, DeepEquals, attrs[column.ColumnName]) + case "integer": + c.Assert(column.Value, DeepEquals, attrs[column.ColumnName]) + case "double": + c.Assert(column.Value, DeepEquals, attrs[column.ColumnName]) + } + } + c.Assert(len(row.Columns), Equals, len(attrs)) + delete(expect, cpKey) + } + if resp.NextStartPrimaryKey != nil { + criteria.StartPrimaryKey = resp.NextStartPrimaryKey + } else { + break + } + } + c.Assert(len(expect), Equals, 0) +} + +func PrepareFuzzyTableData(tableName string, maxStringLen, maxBlobLen int, rowCount int) (map[string]map[string]interface{}, error) { + retMap := make(map[string]map[string]interface{}) + for i:=0;i