mirror of
https://gitee.com/johng/gf.git
synced 2024-11-29 18:57:44 +08:00
feature/v2.3.0 (#2296)
* up * rename function names for package gtcp/gudp; add proxy example for gtcp.Server (#2295) * fix router supported for handler of package ghttp; fix json tag name issue when it contains for package goai * add proxy example for http server * rename function names for package gtcp/gudp; add proxy example for gtcp.Server * move TX from struct to interface for package gdb (#2247) * move TX from struct to interface for package gdb * i updates * up * up * fix comment Co-authored-by: houseme <housemecn@gmail.com> * move `go-redis` implements `Adapter` from package `gredis` to `contrib/nosql/redis`; add redis string operation functions for package `gredis` (#2240) * unify configuration pattern of for package gdb * version updates * improve implements `internal/rwmutex` and `internal/mutex`; add `TablesFields` cache implements in `gdb.Core` instead of `contrib/drivers`; add `ClearTableFields` and `ClearCache` functions for `gdb.Core` (#2128) * add ClearTableFiels/ClearCache for Core of package gdb * improve TableFields for contrib/drivers * fix UT case for contrib/drivers/clickhouse * remove unecessary attribute state for internal/rwmutex and internal/mutex * add ClearTableFieldsAll/ClearCacheAll for gdb.Core * improve clickhouse driver * improve clickhouse driver * fix ut * feat: improve import Co-authored-by: daguang <daguang830@gmail.com> Co-authored-by: houseme <housemecn@gmail.com> * refract builtin rules management mechanism, add `eq/not-eq/gt/gte/lt/lte/before/before-equal/after/after-equal/array/not-regex` rules for for package `gvalid` (#2133) * refract builtin rules management for package gvalid * refract builtin rules management for package gvalid * refract builtin rules management for package gvalid * add valiation rules and implements for package gvalid * UT cases update for package gvalid * improve error message of fields validation for package gvalid * up * add more validation rules for package gvalid * add validation rule foreach for package gvalid (#2136) * add ToSQL/CatchSQL funcions for package gdb (#2137) * add ToSQL/CatchSQL funcions for package gdb * Update gdb_core_underlying.go * fix ci Co-authored-by: houseme <housemecn@gmail.com> * add redis interface for package gredis * up * remove `FilteredLink` function for DB and all driver implements and improve details for package gdb (#2142) * fix: pgsql DoExec Transaction checks (#2101) Co-authored-by: John Guo <john@johng.cn> * improve package gdb * up * up * up * up * up * add DriverWrapper and DriverWarapperDB for package gdb * add DriverWrapper and DriverWarapperDB for package gdb * up Co-authored-by: HaiLaz <739476267@qq.com> * add new database driver `dm` * add drivers dm * upd go version * add gf ci yaml Co-authored-by: Xu <zhenghao.xu> * move go-redis implements from package gredis to contrib/nosql/redis; add redis string operation functions for package gredis * improve `contrib/drivers/dm` (#2144) * improve contrib/drivers/dm * format TODO list info * 1) add config.Name is required 2) The upper layer no longer needs to specify the schema 3) Adjust unit tests Co-authored-by: Xu <zhenghao.xu> Co-authored-by: houseme <housemecn@gmail.com> * move redis adapter related ut case from package gcache/gsession to package contrib/nosql/redis * up * up * up * up * up * improve comment * add implements of `gcfg.Adapter` using kubernetes configmap (#2145) * remove Logger from kubecm.Client * README updates for package kubecm * error message update for package gredis * comment update for package gdb * Feature/v2.2.0 gredis (#2155) * improve package gredis (#2162) * improve package gredis * Update gredis_redis_group_list.go * fix * up Co-authored-by: houseme <housemecn@gmail.com> * up * up * up * up * up * up * add func Test_GroupScript_Eval * ut cases for group string * UT cases update for group script * mv redis operation implements to contrib/nosql/redis from package gredis * test: add redis group list unit test (#2248) * test: add redis group list unit test * improve comment * test: fix redis group list unit test Co-authored-by: houseme <housemecn@gmail.com> * up * add func Test_GroupGeneric_Copy, Test_GroupGeneric_Exists,Test_GroupGeneric_Type,Test_GroupGeneric_Unlink,Test_GroupGeneric_Rename,Test_GroupGeneric_Move,Test_GroupGeneric_Del * add Redis GroupGeneric UnitTest (#2253) add func Test_GroupGeneric_RandomKey,Test_GroupGeneric_DBSize,Test_GroupGeneric_Keys,Test_GroupGeneric_FlushDB,Test_GroupGeneric_FlushAll,Test_GroupGeneric_Expire,Test_GroupGeneric_ExpireAt * hash test case completed (#2260) Co-authored-by: junler <sunjun@bookan.com> * add Redis GroupGeneric Unit Test part2 (#2258) * up * ci updates * ci updates * up * Feature/contrib redis fsprouts (#2274) * Feature/contrib redis starck (#2275) * up * up * fix `/*` router supported for handler of package ghttp; fix json tag name issue when it contains `,` for package goai; add proxy example for http server (#2294) * fix router supported for handler of package ghttp; fix json tag name issue when it contains for package goai * add proxy example for http server * fix: update szenius/set-timezone@v1.1 (#2293) * add Tag* functions to retreive most commonly used tag value from struct field for package gstructs; use description tag as default value if brief is empty for gcmd.Argument (#2299) * fix cache issue in Count/Value functions for gdb.Model (#2300) * add Tag* functions to retreive most commonly used tag value from struct field for package gstructs; use description tag as default value if brief is empty for gcmd.Argument * fix cache issue in Count/Value functions for gdb.Model * add more ut case for package gdb * version updates * add minus of `start` parameter support for `gstr.Substr`, like the `substr` function in `PHP` (#2297) * Make the substr like the substr in PHP Make the substr like the substr in PHP * Update gstr_z_unit_test.go * Update gstr_z_unit_test.go * Make the SubStrRune like the mb_substr in PHP Make the SubStrRune like the mb_substr in PHP * Update gstr_z_unit_test.go * Update gstr_z_unit_test.go * Update gins_z_unit_view_test.go * Update gview_z_unit_test.go * add ut cases for package gcode (#2307) * add ut cases for package gerror (#2304) * add ut cases for package gerror * add ut cases for package gerror * add ut cases for package gtime (#2303) * add ut cases for package gtime * add ut cases for package gtime * add ut cases for package gtime * add ut cases for package glog (#2302) * add ut cases for package glog * add ut cases for package glog * add ut cases for package glog * add ut cases for package glog * add ut cases for package glog * add ut cases for package glog * change result data type of function Count from int to int64 for package gdb (#2298) * feat: modify model count value int64 * fix * fix:modify int64 * fix * feat: cmd gf prebuild suport oracle (#2312) * add ut cases for package g (#2315) * add ut cases for package gdebug (#2313) * add ut cases for package gdebug * add ut cases for package gdebug * add ut cases for package gdebug Co-authored-by: houseme <housemecn@gmail.com> * add zookeeper registry support (#2284) * add ut cases for package glog part2 (#2317) * fix invalid UpdatedAt usage in soft deleting feature for package gdb (#2323) * fix issue in failed installing when there's shortcut between file paths for command install (#2326) * fix issue in failed installing when has shortcut between file paths for command install * version updates * template for command gf updates * improve lru clearing for package gcache (#2327) * add ut cases for package ghttp_middleware and ghttp_request (#2344) * add ut cases for package ghttp_middleware * add ut cases for package ghttp_request * add ut cases for package ghttp_request * add ut cases for package ghttp_response (#2352) * add ut cases for package ghttp_response * add ut cases for package ghttp_response * add ut cases for package ghttp_response * add ut cases for package ghttp_request (#2351) * add ut cases for package ghttp_middleware * add ut cases for package ghttp_request * add ut cases for package ghttp_request * add ut cases for package ghttp_request * add ut cases for package ghttp_request - form * add ut cases for package ghttp_request - query * add ut cases for package ghttp_request - request * add ut cases for package ghttp_request - router * add ut cases for package gcache (#2341) * gTcp Example Function: 1.NewConn 2.NewConnTLS 3.NewConnKeyCrt * gTcp Example Function: 1.Send * add example function ExampleConn_Recv and ExampleConn_RecvWithTimeout * add example function 1. ExampleConn_SendWithTimeout 2. ExampleConn_RecvLine 3. ExampleConn_RecvTill * add example function 1. ExampleConn_SendRecv 2. ExampleConn_SendRecvWithTimeout 3. ExampleConn_SetDeadline 4. ExampleConn_SetReceiveBufferWait * add gtcp test function 1. Test_Package_Option_HeadSize4 2. Test_Package_Option_Error * add gtcp example function 1. ExampleGetFreePorts 2. ExampleSend 3. ExampleSendRecv 4. ExampleSendWithTimeout 5. ExampleSendRecvWithTimeout 6. ExampleMustGetFreePort * add gtcp example function 1. ExampleSendPkg 2. ExampleSendRecvPkg 3. ExampleSendPkgWithTimeout 4. ExampleSendRecvPkgWithTimeout * add gtcp test function 1. Test_Pool_Send 2. Test_Pool_Recv 3. Test_Pool_RecvLine 4. Test_Pool_RecvTill 5. Test_Pool_RecvWithTimeout 6. Test_Pool_SendWithTimeout 7. Test_Pool_SendRecvWithTimeout * fix * add gtcp example function 1. ExampleGetServer 2. ExampleSetAddress 3. ExampleSetHandler 4. ExampleRun_NilHandle * exec CI * exec CI * exec CI * modify test server address * modify and exec CI * modify and exec CI * modify and exec CI * modify and exec CI * modify and exec CI * modify and exec CI * add example funcion ExampleConn_Recv_Once and fix * fix * add some error case in example function * add some error case in example function * 1.add example function ExampleNewServerKeyCrt 2.add function SendRecvPkgWithTimeout unit test * add function Test_Server_NewServerKeyCrt unit test * revert * add function Test_Package_Timeout, Test_Package_Option_HeadSize3, Test_Conn_RecvPkgError unit test * fix * add example function 1.ExampleClient_Clone 2.ExampleLoadKeyCrt * add example function 1.ExampleNewNetConnKeyCrt * fix * add example function 1.ExampleClient_DeleteBytes 2.ExampleClient_HeadBytes 3.ExampleClient_PatchBytes 4.ExampleClient_ConnectBytes 5.ExampleClient_OptionsBytes 6.ExampleClient_TraceBytes 7.ExampleClient_PutBytes * add example function 1.ExampleClient_Prefix 2.ExampleClient_Retry 3.ExampleClient_RedirectLimit * add example function 1.ExampleClient_SetBrowserMode 2.ExampleClient_SetHeader 3.ExampleClient_SetRedirectLimit * add example function 1.ExampleClient_SetTLSKeyCrt 2.ExampleClient_SetTLSConfig modify example funcion 1.ExampleClient_SetProxy 2.ExampleClient_Proxy * add example function 1.ExampleClient_PutContent 2.ExampleClient_DeleteContent 3.ExampleClient_HeadContent 4.ExampleClient_PatchContent 5.ExampleClient_ConnectContent 6.ExampleClient_OptionsContent 7.ExampleClient_TraceContent 8.ExampleClient_RequestContent * add example function 1.ExampleClient_RawRequest * add unit function 1.TestGetFreePorts 2.TestNewConn 3.TestNewConnTLS 4.TestNewConnKeyCrt 5.TestConn_SendWithTimeout * add unit function 1.TestConn_Send 2.TestConn_SendRecv 3.TestConn_SendRecvWithTimeout * modify * modify * add example function 1.TestConn_SetReceiveBufferWait 2.TestNewNetConnKeyCrt 3.TestSend * add example function 1.TestSendRecv 2.TestSendWithTimeout * add unit function 1.TestMustGetFreePort 2.TestSendRecvWithTimeout 3.TestSendPkg * add client recevied server's response content assert * modify * modify * add example function 1.TestSendRecvPkg 2.TestSendPkgWithTimeout 3.TestSendRecvPkgWithTimeout * add GetAddress() function add unit funciton 1.TestNewServer 2.TestGetServer 3.TestServer_SetAddress 4.TestServer_SetHandler 5.TestServer_Run * modify * modify * add unit funciton 1.TestLoadKeyCrt * modify * delete function fromHex * add gclient dump unit test * add example function 1.ExampleClient_Put 2.ExampleClient_Delete 3.ExampleClient_Head 4.ExampleClient_Patch 5.ExampleClient_Connect 6.ExampleClient_Options 7.ExampleClient_Trace * add example function 1.TestClient_DoRequest * add example function 1.ExampleClient_PutVar 2.ExampleClient_DeleteVar 3.ExampleClient_HeadVar 4.ExampleClient_PatchVar 5.ExampleClient_ConnectVar 6.ExampleClient_OptionsVar 7.ExampleClient_TraceVar * modify * modify * add CustomProvider function * modify * add unit funciton 1.Test_NewConn 2.Test_GetFreePorts * add unit funciton 1.Test_Server * garray_normal_any code converage * garray_normal_int code converage * garray_normal_str code converage * garray_sorted_any code converage * garray_sorted_int code converage * garray_sorted_str code converage * glist code converage * gmap, gmap_hash_any_any_map code converage * gmap_hash_int_any_map code converage * gmap_hash_int_any_map code converage * gmap_hash_int_int_map code converage * gmap_hash_int_str_map code converage * gmap_hash_str_any_map code converage * gmap_hash_str_int_map code converage * gmap_hash_str_str_map code converage * gmap_list_map code converage * gmap_list_map code converage * revert gf.yml * add gtest unit test function * add ut cases for package gcache * add ut cases for package gcache * add ut cases for package gcache * add ut cases for package gcache * add ut cases for package gcache * modify Co-authored-by: John Guo <john@johng.cn> * improve ut case for package internal/rwmutex (#2364) * fix issue when only one file was uploaded in batch receiver attribute (#2365) * fix fixed An error occurred when only one file was uploaded in batches and add unit testing(#2092) * fix issue uploading files for ghttp.Server Co-authored-by: yxh <yxh1103@qq.com> * fix issue #2334 when accessing static files with cache time (#2366) * Solve the problem of error when accessing static files with cache time. Error message: 2022-11-29 19:40:11.090 [ERRO] http: superfluous response.WriteHeader call from github.com/gogf/gf/v2/net/ghttp.(*ResponseWriter).Flush (ghttp_response_writer.go:58) Stack: Verification method: curl 'http://127.0.0.1:8000/' -H 'If-Modified-Since: Thu, 08 Dec 2022 03:13:55 GMT' --compressed * Solve the problem of error when accessing static files with cache time. Error message: 2022-11-29 19:40:11.090 [ERRO] http: superfluous response.WriteHeader call from github.com/gogf/gf/v2/net/ghttp.(*ResponseWriter).Flush (ghttp_response_writer.go:58) Stack: Verification method: curl 'http://127.0.0.1:8000/' -H 'If-Modified-Since: Thu, 08 Dec 2022 03:13:55 GMT' --compressed * Solve the problem of error when accessing static files with cache time. Error message: 2022-11-29 19:40:11.090 [ERRO] http: superfluous response.WriteHeader call from github.com/gogf/gf/v2/net/ghttp.(*ResponseWriter).Flush (ghttp_response_writer.go:58) Stack: Verification method: curl 'http://127.0.0.1:8000/' -H 'If-Modified-Since: Thu, 08 Dec 2022 03:13:55 GMT' --compressed * fix issue #2334 when accessing static files with cache time * up Co-authored-by: 曾洪亮 <hongliang.zeng@i-soft.com.cn> Co-authored-by: houseme <housemecn@gmail.com> * fix issue in cycle dumping for g.Dump (#2367) * fix issue in cycle dumping for g.Dump * up * up * up Co-authored-by: houseme <housemecn@gmail.com> * 由于 clickhouse 的 position的初始值为 1,导致gdb_core_utility.HasField 中对 fieldsArray 初始化出错 (#2346) * 由于 clickhouse 的 position的初始值为 1,导致gdb_core_utility.HasField 中对 fieldsArray 初始化出错 * 修复单元测试 * 修复单元测试 * 补充单元测试 * 增加CK防御性代码 Co-authored-by: longl <longlei@dealmap.cloud> Co-authored-by: houseme <housemecn@gmail.com> * fix: ghttp server static path config (#2335) Co-authored-by: daguang <daguang830@gmail.com> Co-authored-by: houseme <housemecn@gmail.com> Co-authored-by: ftl <1139556759@qq.com> Co-authored-by: HaiLaz <739476267@qq.com> Co-authored-by: zhonghuaxunGM <50815786+zhonghuaxunGM@users.noreply.github.com> Co-authored-by: huangqian <huangqian1985@qq.com> Co-authored-by: junler <827640651@qq.com> Co-authored-by: junler <sunjun@bookan.com> Co-authored-by: Starccck <28645972+starccck@users.noreply.github.com> Co-authored-by: Jinhongyu <30454170+cnjinhy@users.noreply.github.com> Co-authored-by: YuanXin Hu <huyuanxin1999@outlook.com> Co-authored-by: yxh <yxh1103@qq.com> Co-authored-by: 曾洪亮 <hongliang.zeng@i-soft.com.cn> Co-authored-by: long <48313408+qq375251855@users.noreply.github.com> Co-authored-by: longl <longlei@dealmap.cloud> Co-authored-by: houseme <housemecn@gmail.com> Co-authored-by: daguang <daguang830@gmail.com> Co-authored-by: ftl <1139556759@qq.com> Co-authored-by: HaiLaz <739476267@qq.com> Co-authored-by: zhonghuaxunGM <50815786+zhonghuaxunGM@users.noreply.github.com> Co-authored-by: huangqian <huangqian1985@qq.com> Co-authored-by: junler <827640651@qq.com> Co-authored-by: junler <sunjun@bookan.com> Co-authored-by: Starccck <28645972+starccck@users.noreply.github.com> Co-authored-by: Jinhongyu <30454170+cnjinhy@users.noreply.github.com> Co-authored-by: YuanXin Hu <huyuanxin1999@outlook.com> Co-authored-by: yxh <yxh1103@qq.com> Co-authored-by: 曾洪亮 <hongliang.zeng@i-soft.com.cn> Co-authored-by: long <48313408+qq375251855@users.noreply.github.com> Co-authored-by: longl <longlei@dealmap.cloud>
This commit is contained in:
parent
4bb88027d8
commit
5e72b03b0a
12
.github/workflows/gf.yml
vendored
12
.github/workflows/gf.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
services:
|
||||
# Redis backend server.
|
||||
redis:
|
||||
image : loads/redis:latest
|
||||
image : loads/redis:7.0
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
@ -77,7 +77,7 @@ jobs:
|
||||
|
||||
# MSSQL backend server.
|
||||
mssql:
|
||||
image: loads/mssqldocker:latest
|
||||
image: loads/mssqldocker:14.0.3391.2
|
||||
env:
|
||||
ACCEPT_EULA: Y
|
||||
SA_PASSWORD: LoremIpsum86
|
||||
@ -94,9 +94,9 @@ jobs:
|
||||
--health-retries 10
|
||||
|
||||
# ClickHouse backend server.
|
||||
# docker run -d --name clickhouse -p 9000:9000 -p 8123:8123 -p 9001:9001 loads/clickhouse-server:latest
|
||||
# docker run -d --name clickhouse -p 9000:9000 -p 8123:8123 -p 9001:9001 loads/clickhouse-server:22.1.3.7
|
||||
clickhouse-server:
|
||||
image: loads/clickhouse-server:latest
|
||||
image: loads/clickhouse-server:22.1.3.7
|
||||
ports:
|
||||
- 9000:9000
|
||||
- 8123:8123
|
||||
@ -104,7 +104,7 @@ jobs:
|
||||
|
||||
# Polaris backend server.
|
||||
polaris:
|
||||
image: loads/polaris-server-standalone:latest
|
||||
image: loads/polaris-server-standalone:1.11.2
|
||||
ports:
|
||||
- 8090:8090
|
||||
- 8091:8091
|
||||
@ -112,7 +112,7 @@ jobs:
|
||||
|
||||
# Oracle 11g server
|
||||
oracle-server:
|
||||
image: loads/oracle-xe-11g-r2:latest
|
||||
image: loads/oracle-xe-11g-r2:11.2.0
|
||||
env:
|
||||
ORACLE_ALLOW_REMOTE: true
|
||||
ORACLE_SID: XE
|
||||
|
@ -15,16 +15,13 @@ require (
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.2.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/clbanning/mxj/v2 v2.5.5 // indirect
|
||||
github.com/denisenkom/go-mssqldb v0.11.0 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/glebarez/go-sqlite v1.17.3 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/go-sql-driver/mysql v1.6.0 // indirect
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
|
@ -1,25 +1,15 @@
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
|
||||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/denisenkom/go-mssqldb v0.11.0 h1:9rHa233rhdOyrz2GcP9NM+gi2psgJZ4GWDpL/7ND8HI=
|
||||
github.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/glebarez/go-sqlite v1.17.3 h1:Rji9ROVSTTfjuWD6j5B+8DtkNvPILoUC3xRhkQzGxvk=
|
||||
@ -29,38 +19,19 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
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.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
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/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk=
|
||||
github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
@ -74,22 +45,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
||||
@ -97,7 +54,6 @@ github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qq
|
||||
github.com/sijms/go-ora/v2 v2.4.20 h1:9e3z7VLBQXRAHGiIda1GEFtRhfxata0LghyMZqvLKew=
|
||||
github.com/sijms/go-ora/v2 v2.4.20/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
@ -118,39 +74,27 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
|
||||
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
|
||||
@ -165,7 +109,6 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE=
|
||||
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
|
||||
@ -173,24 +116,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
@ -68,7 +68,16 @@ func (c cFix) doFix() (err error) {
|
||||
// doFixV23 fixes code when upgrading to GoFrame v2.3.
|
||||
func (c cFix) doFixV23(version string) error {
|
||||
replaceFunc := func(path, content string) string {
|
||||
// gdb.TX from struct to interface.
|
||||
content = gstr.Replace(content, "*gdb.TX", "gdb.TX")
|
||||
// function name changes for package gtcp/gudp.
|
||||
if gstr.Contains(content, "/gf/v2/net/gtcp") || gstr.Contains(content, "/gf/v2/net/gudp") {
|
||||
content = gstr.ReplaceByMap(content, g.MapStrStr{
|
||||
".SetSendDeadline": ".SetDeadlineSend",
|
||||
".SetReceiveDeadline": ".SetDeadlineRecv",
|
||||
".SetReceiveBufferWait": ".SetBufferWaitRecv",
|
||||
})
|
||||
}
|
||||
return content
|
||||
}
|
||||
return gfile.ReplaceDirFunc(replaceFunc, ".", "*.go", true)
|
||||
|
@ -102,7 +102,7 @@ func (dao *{TplTableNameCamelCase}Dao) Ctx(ctx context.Context) *gdb.Model {
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function f
|
||||
// as it is automatically handled by this function.
|
||||
func (dao *{TplTableNameCamelCase}Dao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
|
||||
func (dao *{TplTableNameCamelCase}Dao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
`
|
||||
|
@ -84,6 +84,13 @@ func (p *Pool) Put(value interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MustPut puts an item to pool, it panics if any error occurs.
|
||||
func (p *Pool) MustPut(value interface{}) {
|
||||
if err := p.Put(value); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Clear clears pool, which means it will remove all items from pool.
|
||||
func (p *Pool) Clear() {
|
||||
if p.ExpireFunc != nil {
|
||||
|
@ -61,7 +61,7 @@ func ExamplePool_Put() {
|
||||
// conn.(*DBConn).Conn.QueryContext(context.Background(), "select * from user")
|
||||
|
||||
// put back conn
|
||||
dbConnPool.Put(conn)
|
||||
dbConnPool.MustPut(conn)
|
||||
|
||||
fmt.Println(conn.(*DBConn).Limit)
|
||||
|
||||
@ -88,8 +88,8 @@ func ExamplePool_Clear() {
|
||||
})
|
||||
|
||||
conn, _ := dbConnPool.Get()
|
||||
dbConnPool.Put(conn)
|
||||
dbConnPool.Put(conn)
|
||||
dbConnPool.MustPut(conn)
|
||||
dbConnPool.MustPut(conn)
|
||||
fmt.Println(dbConnPool.Size())
|
||||
dbConnPool.Clear()
|
||||
fmt.Println(dbConnPool.Size())
|
||||
@ -144,8 +144,8 @@ func ExamplePool_Size() {
|
||||
|
||||
conn, _ := dbConnPool.Get()
|
||||
fmt.Println(dbConnPool.Size())
|
||||
dbConnPool.Put(conn)
|
||||
dbConnPool.Put(conn)
|
||||
dbConnPool.MustPut(conn)
|
||||
dbConnPool.MustPut(conn)
|
||||
fmt.Println(dbConnPool.Size())
|
||||
|
||||
// Output:
|
||||
@ -158,21 +158,22 @@ func ExamplePool_Close() {
|
||||
Conn *sql.Conn
|
||||
Limit int
|
||||
}
|
||||
|
||||
dbConnPool := gpool.New(time.Hour,
|
||||
func() (interface{}, error) {
|
||||
var (
|
||||
newFunc = func() (interface{}, error) {
|
||||
dbConn := new(DBConn)
|
||||
dbConn.Limit = 10
|
||||
return dbConn, nil
|
||||
},
|
||||
func(i interface{}) {
|
||||
}
|
||||
closeFunc = func(i interface{}) {
|
||||
fmt.Println("Close The Pool")
|
||||
// sample : close db conn
|
||||
// i.(DBConn).Conn.Close()
|
||||
})
|
||||
}
|
||||
)
|
||||
dbConnPool := gpool.New(time.Hour, newFunc, closeFunc)
|
||||
|
||||
conn, _ := dbConnPool.Get()
|
||||
dbConnPool.Put(conn)
|
||||
dbConnPool.MustPut(conn)
|
||||
|
||||
dbConnPool.Close()
|
||||
|
||||
|
@ -27,13 +27,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
@ -46,14 +40,11 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
@ -66,10 +57,7 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
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/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
@ -80,28 +68,15 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
@ -136,8 +111,6 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
@ -178,24 +151,9 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
@ -238,7 +196,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||
@ -247,7 +204,6 @@ github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU
|
||||
github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
@ -267,7 +223,6 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@ -286,11 +241,9 @@ golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
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=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@ -303,9 +256,6 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
@ -317,12 +267,10 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
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=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@ -333,28 +281,19 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.1-0.20180807135948-17ff2d5776d2/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.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
@ -378,7 +317,6 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
@ -406,33 +344,18 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
|
||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -13,10 +13,8 @@ require (
|
||||
github.com/BurntSushi/toml v1.1.0 // indirect
|
||||
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/clbanning/mxj/v2 v2.5.5 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
@ -25,7 +23,6 @@ require (
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.5 // indirect
|
||||
github.com/go-openapi/swag v0.19.14 // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
|
@ -40,8 +40,6 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
@ -53,8 +51,6 @@ 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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw=
|
||||
github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
@ -64,8 +60,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
@ -86,9 +80,6 @@ github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng=
|
||||
github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
@ -144,7 +135,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
@ -154,9 +144,7 @@ github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
|
||||
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
@ -195,22 +183,9 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
@ -281,7 +256,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
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=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
@ -303,13 +277,11 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
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-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
@ -332,7 +304,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -341,10 +312,7 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -363,12 +331,10 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@ -429,7 +395,6 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@ -522,15 +487,10 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/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/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
@ -5,22 +5,13 @@ github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 h1:zOVTBdCKFd9JbCKz9/nt+FovbjPFm
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk=
|
||||
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
|
||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
|
||||
@ -30,29 +21,11 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A=
|
||||
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.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
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=
|
||||
@ -60,8 +33,6 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
@ -90,23 +61,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLD
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/nacos-group/nacos-sdk-go v1.1.2 h1:lWTpf5SXLetQetS7p31eGic/ncqsnn0Zbau1i3eC25Y=
|
||||
github.com/nacos-group/nacos-sdk-go v1.1.2/go.mod h1:I8Vj4M8ZLpBk7EY2A8RXQE1SbfCA7b56TJBPIFTrUYE=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
@ -126,7 +82,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -145,52 +100,34 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
|
||||
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/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
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/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
@ -202,7 +139,6 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@ -210,31 +146,16 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/ini.v1 v1.42.0 h1:7N3gPTt50s8GuLortA00n8AqRTk75qOP98+mTPpgzRk=
|
||||
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
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/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -68,8 +68,6 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo=
|
||||
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
@ -80,8 +78,6 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
@ -99,10 +95,7 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
@ -163,7 +156,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
@ -183,9 +175,7 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
@ -229,23 +219,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4UpgHp07nNdFX7mqFfM=
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
@ -299,7 +274,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
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/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
@ -363,7 +337,6 @@ 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=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@ -386,14 +359,12 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
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-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
@ -413,12 +384,10 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -429,10 +398,7 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -454,7 +420,6 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -526,7 +491,6 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
@ -627,11 +591,8 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
|
||||
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/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
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/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
@ -297,7 +297,7 @@ func (d *Driver) DoInsert(
|
||||
charL, charR = d.Core.GetChars()
|
||||
keysStr = charL + strings.Join(keys, charR+","+charL) + charR
|
||||
holderStr = strings.Join(valueHolder, ",")
|
||||
tx = &gdb.TX{}
|
||||
tx gdb.TX
|
||||
stdSqlResult sql.Result
|
||||
stmt *gdb.Stmt
|
||||
)
|
||||
@ -427,11 +427,11 @@ func (d *Driver) Replace(ctx context.Context, table string, data interface{}, ba
|
||||
return nil, errUnsupportedReplace
|
||||
}
|
||||
|
||||
func (d *Driver) Begin(ctx context.Context) (tx *gdb.TX, err error) {
|
||||
func (d *Driver) Begin(ctx context.Context) (tx gdb.TX, err error) {
|
||||
return nil, errUnsupportedBegin
|
||||
}
|
||||
|
||||
func (d *Driver) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) error {
|
||||
func (d *Driver) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) error {
|
||||
return errUnsupportedTransaction
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ func TestDriverClickhouse_TableFields_Use_Link(t *testing.T) {
|
||||
func TestDriverClickhouse_Transaction(t *testing.T) {
|
||||
connect := clickhouseConfigDB()
|
||||
defer dropClickhouseTableVisits(connect)
|
||||
gtest.AssertNE(connect.Transaction(context.Background(), func(ctx context.Context, tx *gdb.TX) error {
|
||||
gtest.AssertNE(connect.Transaction(context.Background(), func(ctx context.Context, tx gdb.TX) error {
|
||||
return nil
|
||||
}), nil)
|
||||
}
|
||||
|
@ -4,23 +4,13 @@ github.com/ClickHouse/clickhouse-go v1.5.4 h1:cKjXeYLNWVJIx2J1K6H2CqyRmfwVJVY1OV
|
||||
github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
|
||||
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
|
||||
github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -30,30 +20,14 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/gogf/clickhouse-go/v2 v2.0.15-compatible h1:VYgibtmI/u+hUQmtJpC7zzg1YJsDCXS052R7vCqGpDc=
|
||||
github.com/gogf/clickhouse-go/v2 v2.0.15-compatible/go.mod h1:Z21o82zD8FFqefOQDg93c0XITlxGbTsWQuRm588Azkk=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
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/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
|
||||
@ -62,8 +36,6 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
@ -79,23 +51,8 @@ github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/Qd
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/mkevac/debugcharts v0.0.0-20191222103121-ae1c48aa8615/go.mod h1:Ad7oeElCZqA1Ufj0U9/liOF4BtVepxRcTvr2ey7zTvM=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/paulmach/orb v0.7.1 h1:Zha++Z5OX/l168sqHK3k4z18LDvr+YAO/VjK0ReQ9rU=
|
||||
github.com/paulmach/orb v0.7.1/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
|
||||
github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
|
||||
@ -113,7 +70,6 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR
|
||||
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/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
@ -135,41 +91,29 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191220220014-0732a990476f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32 h1:Js08h5hqB5xyWR789+QqueR6sDE8mk+YvpETZ+F6X9Y=
|
||||
@ -183,7 +127,6 @@ golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@ -191,26 +134,11 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
@ -2,22 +2,12 @@ gitee.com/chunanyong/dm v1.8.6 h1:5UnOCW1f2+LYiSQvuHiloS6OTMnZAtjRQ4woi9i6QY4=
|
||||
gitee.com/chunanyong/dm v1.8.6/go.mod h1:EPRJnuPFgbyOFgJ0TRYCTGzhq+ZT4wdyaj/GW/LLcNg=
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -25,34 +15,14 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
|
||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
@ -62,30 +32,13 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -95,77 +48,41 @@ go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJ
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -1,23 +1,13 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/denisenkom/go-mssqldb v0.11.0 h1:9rHa233rhdOyrz2GcP9NM+gi2psgJZ4GWDpL/7ND8HI=
|
||||
github.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -25,34 +15,14 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
@ -62,30 +32,13 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -95,78 +48,42 @@ go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJ
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -1,21 +1,11 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -23,34 +13,14 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
@ -60,30 +30,13 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -93,76 +46,40 @@ go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJ
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -85,7 +85,7 @@ CREATE TABLE %s (
|
||||
// Initialize the data.
|
||||
var err error
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx gdb.TX) error {
|
||||
r, err := tx.Model(tableUser).Save(EntityUser{
|
||||
Name: "john",
|
||||
})
|
||||
|
@ -2778,7 +2778,7 @@ func Test_Model_Cache(t *testing.T) {
|
||||
t.AssertNil(err)
|
||||
t.Assert(n, 1)
|
||||
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx gdb.TX) error {
|
||||
one, err := tx.Model(table).Cache(gdb.CacheOption{
|
||||
Duration: time.Second,
|
||||
Name: "test3",
|
||||
@ -2818,7 +2818,7 @@ func Test_Model_Cache(t *testing.T) {
|
||||
t.AssertNil(err)
|
||||
t.Assert(n, 1)
|
||||
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx gdb.TX) error {
|
||||
// Cache feature disabled.
|
||||
one, err := tx.Model(table).Cache(gdb.CacheOption{
|
||||
Duration: time.Second,
|
||||
|
@ -715,7 +715,7 @@ func Test_Transaction(t *testing.T) {
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
ctx := context.TODO()
|
||||
err := db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err := db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
if _, err := tx.Ctx(ctx).Replace(table, g.Map{
|
||||
"id": 1,
|
||||
"passport": "USER_1",
|
||||
@ -739,7 +739,7 @@ func Test_Transaction(t *testing.T) {
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
ctx := context.TODO()
|
||||
err := db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err := db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
if _, err := tx.Replace(table, g.Map{
|
||||
"id": 1,
|
||||
"passport": "USER_1",
|
||||
@ -767,7 +767,7 @@ func Test_Transaction_Panic(t *testing.T) {
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
ctx := context.TODO()
|
||||
err := db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err := db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
if _, err := tx.Replace(table, g.Map{
|
||||
"id": 1,
|
||||
"passport": "USER_1",
|
||||
@ -838,13 +838,13 @@ func Test_Transaction_Nested_TX_Transaction_UseTX(t *testing.T) {
|
||||
err error
|
||||
ctx = context.TODO()
|
||||
)
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
// commit
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = tx.Model(table).Data(g.Map{
|
||||
"id": 1,
|
||||
"passport": "USER_1",
|
||||
@ -869,7 +869,7 @@ func Test_Transaction_Nested_TX_Transaction_UseTX(t *testing.T) {
|
||||
})
|
||||
t.AssertNil(err)
|
||||
// rollback
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = tx.Model(table).Data(g.Map{
|
||||
"id": 2,
|
||||
"passport": "USER_2",
|
||||
@ -892,13 +892,13 @@ func Test_Transaction_Nested_TX_Transaction_UseTX(t *testing.T) {
|
||||
t.Assert(all[0]["id"], 1)
|
||||
|
||||
// another record.
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
// commit
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = tx.Model(table).Data(g.Map{
|
||||
"id": 3,
|
||||
"passport": "USER_1",
|
||||
@ -923,7 +923,7 @@ func Test_Transaction_Nested_TX_Transaction_UseTX(t *testing.T) {
|
||||
})
|
||||
t.AssertNil(err)
|
||||
// rollback
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = tx.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = tx.Model(table).Data(g.Map{
|
||||
"id": 4,
|
||||
"passport": "USER_2",
|
||||
@ -960,13 +960,13 @@ func Test_Transaction_Nested_TX_Transaction_UseDB(t *testing.T) {
|
||||
err error
|
||||
ctx = context.TODO()
|
||||
)
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
// commit
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = db.Model(table).Ctx(ctx).Data(g.Map{
|
||||
"id": 1,
|
||||
"passport": "USER_1",
|
||||
@ -992,7 +992,7 @@ func Test_Transaction_Nested_TX_Transaction_UseDB(t *testing.T) {
|
||||
t.AssertNil(err)
|
||||
|
||||
// rollback
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = tx.Model(table).Ctx(ctx).Data(g.Map{
|
||||
"id": 2,
|
||||
"passport": "USER_2",
|
||||
@ -1014,13 +1014,13 @@ func Test_Transaction_Nested_TX_Transaction_UseDB(t *testing.T) {
|
||||
t.Assert(len(all), 1)
|
||||
t.Assert(all[0]["id"], 1)
|
||||
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
// commit
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = db.Model(table).Ctx(ctx).Data(g.Map{
|
||||
"id": 3,
|
||||
"passport": "USER_1",
|
||||
@ -1046,7 +1046,7 @@ func Test_Transaction_Nested_TX_Transaction_UseDB(t *testing.T) {
|
||||
t.AssertNil(err)
|
||||
|
||||
// rollback
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = tx.Model(table).Ctx(ctx).Data(g.Map{
|
||||
"id": 4,
|
||||
"passport": "USER_2",
|
||||
@ -1115,7 +1115,7 @@ func Test_Transaction_Method(t *testing.T) {
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var err error
|
||||
err = db.Transaction(gctx.New(), func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(gctx.New(), func(ctx context.Context, tx gdb.TX) error {
|
||||
_, err = db.Model(table).Ctx(ctx).Data(g.Map{
|
||||
"id": 1,
|
||||
"passport": "t1",
|
||||
|
@ -9,14 +9,11 @@ require (
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.1.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/clbanning/mxj/v2 v2.5.5 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
|
@ -1,21 +1,11 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -23,31 +13,12 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
@ -57,31 +28,15 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/sijms/go-ora/v2 v2.4.20 h1:9e3z7VLBQXRAHGiIda1GEFtRhfxata0LghyMZqvLKew=
|
||||
github.com/sijms/go-ora/v2 v2.4.20/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -91,74 +46,39 @@ go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJ
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -1,21 +1,11 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -23,32 +13,12 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk=
|
||||
github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
@ -60,30 +30,13 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -93,76 +46,40 @@ go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJ
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -1,22 +1,12 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/glebarez/go-sqlite v1.17.3 h1:Rji9ROVSTTfjuWD6j5B+8DtkNvPILoUC3xRhkQzGxvk=
|
||||
@ -26,35 +16,15 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
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/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
@ -66,29 +36,13 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
@ -104,38 +58,26 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@ -148,32 +90,14 @@ golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -2257,7 +2257,7 @@ func Test_Model_Cache(t *testing.T) {
|
||||
t.AssertNil(err)
|
||||
t.Assert(n, 1)
|
||||
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx gdb.TX) error {
|
||||
one, err := tx.Model(table).Cache(gdb.CacheOption{
|
||||
Duration: time.Second,
|
||||
Name: "test3",
|
||||
@ -2297,7 +2297,7 @@ func Test_Model_Cache(t *testing.T) {
|
||||
t.AssertNil(err)
|
||||
t.Assert(n, 1)
|
||||
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
||||
err = db.Transaction(context.TODO(), func(ctx context.Context, tx gdb.TX) error {
|
||||
// Cache feature disabled.
|
||||
one, err := tx.Model(table).Cache(gdb.CacheOption{
|
||||
Duration: time.Second,
|
||||
|
22
contrib/nosql/redis/README.MD
Normal file
22
contrib/nosql/redis/README.MD
Normal file
@ -0,0 +1,22 @@
|
||||
# redis
|
||||
GoFrame `gredis.Adapter` implements using `go-redis`.
|
||||
|
||||
# Installation
|
||||
```
|
||||
go get -u github.com/gogf/gf/contrib/nosql/redis/v2
|
||||
```
|
||||
|
||||
Commonly imported at top of `main.go`:
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "github.com/gogf/gf/contrib/nosql/redis/v2"
|
||||
|
||||
// Other imported packages.
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Main logics.
|
||||
}
|
||||
```
|
12
contrib/nosql/redis/go.mod
Normal file
12
contrib/nosql/redis/go.mod
Normal file
@ -0,0 +1,12 @@
|
||||
module github.com/gogf/gf/contrib/nosql/redis/v2
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/gogf/gf/v2 v2.0.0
|
||||
go.opentelemetry.io/otel v1.7.0
|
||||
go.opentelemetry.io/otel/trace v1.7.0
|
||||
)
|
||||
|
||||
replace github.com/gogf/gf/v2 => ../../../
|
166
contrib/nosql/redis/go.sum
Normal file
166
contrib/nosql/redis/go.sum
Normal file
@ -0,0 +1,166 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-isatty v0.0.12/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-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0=
|
||||
go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU=
|
||||
go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o=
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
@ -4,22 +4,24 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
// Package redis provides gredis.Adapter implements using go-redis.
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
)
|
||||
|
||||
// AdapterGoRedis is an implement of Adapter using go-redis.
|
||||
type AdapterGoRedis struct {
|
||||
// Redis is an implement of Adapter using go-redis.
|
||||
type Redis struct {
|
||||
client redis.UniversalClient
|
||||
config *Config
|
||||
config *gredis.Config
|
||||
}
|
||||
|
||||
const (
|
||||
@ -31,8 +33,14 @@ const (
|
||||
defaultMaxRetries = -1
|
||||
)
|
||||
|
||||
// NewAdapterGoRedis creates and returns a redis adapter using go-redis.
|
||||
func NewAdapterGoRedis(config *Config) *AdapterGoRedis {
|
||||
func init() {
|
||||
gredis.RegisterAdapterFunc(func(config *gredis.Config) gredis.Adapter {
|
||||
return New(config)
|
||||
})
|
||||
}
|
||||
|
||||
// New creates and returns a redis adapter using go-redis.
|
||||
func New(config *gredis.Config) *Redis {
|
||||
fillWithDefaultConfiguration(config)
|
||||
opts := &redis.UniversalOptions{
|
||||
Addrs: gstr.SplitAndTrim(config.Address, ","),
|
||||
@ -62,15 +70,28 @@ func NewAdapterGoRedis(config *Config) *AdapterGoRedis {
|
||||
client = redis.NewClient(opts.Simple())
|
||||
}
|
||||
|
||||
return &AdapterGoRedis{
|
||||
return &Redis{
|
||||
client: client,
|
||||
config: config,
|
||||
}
|
||||
}
|
||||
|
||||
// Do send a command to the server and returns the received reply.
|
||||
// It uses json.Marshal for struct/slice/map type values before committing them to redis.
|
||||
func (r *Redis) Do(ctx context.Context, command string, args ...interface{}) (*gvar.Var, error) {
|
||||
conn, err := r.Conn(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
_ = conn.Close(ctx)
|
||||
}()
|
||||
return conn.Do(ctx, command, args...)
|
||||
}
|
||||
|
||||
// Close closes the redis connection pool, which will release all connections reserved by this pool.
|
||||
// It is commonly not necessary to call Close manually.
|
||||
func (r *AdapterGoRedis) Close(ctx context.Context) (err error) {
|
||||
func (r *Redis) Close(ctx context.Context) (err error) {
|
||||
if err = r.client.Close(); err != nil {
|
||||
err = gerror.Wrap(err, `Redis Client Close failed`)
|
||||
}
|
||||
@ -79,13 +100,13 @@ func (r *AdapterGoRedis) Close(ctx context.Context) (err error) {
|
||||
|
||||
// Conn retrieves and returns a connection object for continuous operations.
|
||||
// Note that you should call Close function manually if you do not use this connection any further.
|
||||
func (r *AdapterGoRedis) Conn(ctx context.Context) (Conn, error) {
|
||||
return &localAdapterGoRedisConn{
|
||||
func (r *Redis) Conn(ctx context.Context) (gredis.Conn, error) {
|
||||
return &Conn{
|
||||
redis: r,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func fillWithDefaultConfiguration(config *Config) {
|
||||
func fillWithDefaultConfiguration(config *gredis.Config) {
|
||||
// The MaxIdle is the most important attribute of the connection pool.
|
||||
// Only if this attribute is set, the created connections from client
|
||||
// can not exceed the limit of the server.
|
276
contrib/nosql/redis/redis_conn.go
Normal file
276
contrib/nosql/redis/redis_conn.go
Normal file
@ -0,0 +1,276 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
"github.com/gogf/gf/v2"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/net/gtrace"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
// Conn manages the connection operations.
|
||||
type Conn struct {
|
||||
ps *redis.PubSub
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// traceItem holds the information for redis trace.
|
||||
type traceItem struct {
|
||||
err error
|
||||
command string
|
||||
args []interface{}
|
||||
costMilli int64
|
||||
}
|
||||
|
||||
const (
|
||||
traceInstrumentName = "github.com/gogf/gf/v2/database/gredis"
|
||||
traceAttrRedisAddress = "redis.address"
|
||||
traceAttrRedisDb = "redis.db"
|
||||
traceEventRedisExecution = "redis.execution"
|
||||
traceEventRedisExecutionCommand = "redis.execution.command"
|
||||
traceEventRedisExecutionCost = "redis.execution.cost"
|
||||
traceEventRedisExecutionArguments = "redis.execution.arguments"
|
||||
)
|
||||
|
||||
// Do send a command to the server and returns the received reply.
|
||||
// It uses json.Marshal for struct/slice/map type values before committing them to redis.
|
||||
func (c *Conn) Do(ctx context.Context, command string, args ...interface{}) (reply *gvar.Var, err error) {
|
||||
if ctx == nil {
|
||||
ctx = context.Background()
|
||||
}
|
||||
for k, v := range args {
|
||||
var (
|
||||
reflectInfo = gutil.OriginTypeAndKind(v)
|
||||
)
|
||||
switch reflectInfo.OriginKind {
|
||||
case
|
||||
reflect.Struct,
|
||||
reflect.Map,
|
||||
reflect.Slice,
|
||||
reflect.Array:
|
||||
// Ignore slice type of: []byte.
|
||||
if _, ok := v.([]byte); !ok {
|
||||
if args[k], err = gjson.Marshal(v); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Trace span start.
|
||||
tr := otel.GetTracerProvider().Tracer(traceInstrumentName, trace.WithInstrumentationVersion(gf.VERSION))
|
||||
_, span := tr.Start(ctx, "Redis."+command, trace.WithSpanKind(trace.SpanKindInternal))
|
||||
defer span.End()
|
||||
|
||||
timestampMilli1 := gtime.TimestampMilli()
|
||||
reply, err = c.doCommand(ctx, command, args...)
|
||||
timestampMilli2 := gtime.TimestampMilli()
|
||||
|
||||
// Trace span end.
|
||||
c.traceSpanEnd(ctx, span, &traceItem{
|
||||
err: err,
|
||||
command: command,
|
||||
args: args,
|
||||
costMilli: timestampMilli2 - timestampMilli1,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// Do send a command to the server and returns the received reply.
|
||||
// It uses json.Marshal for struct/slice/map type values before committing them to redis.
|
||||
func (c *Conn) doCommand(ctx context.Context, command string, args ...interface{}) (reply *gvar.Var, err error) {
|
||||
argStrSlice := gconv.Strings(args)
|
||||
switch gstr.ToLower(command) {
|
||||
case `subscribe`:
|
||||
c.ps = c.redis.client.Subscribe(ctx, argStrSlice...)
|
||||
|
||||
case `psubscribe`:
|
||||
c.ps = c.redis.client.PSubscribe(ctx, argStrSlice...)
|
||||
|
||||
case `unsubscribe`:
|
||||
if c.ps != nil {
|
||||
err = c.ps.Unsubscribe(ctx, argStrSlice...)
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis PubSub Unsubscribe failed with arguments "%v"`, argStrSlice)
|
||||
}
|
||||
}
|
||||
|
||||
case `punsubscribe`:
|
||||
if c.ps != nil {
|
||||
err = c.ps.PUnsubscribe(ctx, argStrSlice...)
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis PubSub PUnsubscribe failed with arguments "%v"`, argStrSlice)
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
arguments := make([]interface{}, len(args)+1)
|
||||
copy(arguments, []interface{}{command})
|
||||
copy(arguments[1:], args)
|
||||
reply, err = c.resultToVar(c.redis.client.Do(ctx, arguments...).Result())
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis Client Do failed with arguments "%v"`, arguments)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// resultToVar converts redis operation result to gvar.Var.
|
||||
func (c *Conn) resultToVar(result interface{}, err error) (*gvar.Var, error) {
|
||||
if err == redis.Nil {
|
||||
err = nil
|
||||
}
|
||||
if err == nil {
|
||||
switch v := result.(type) {
|
||||
case []byte:
|
||||
return gvar.New(string(v)), err
|
||||
|
||||
case []interface{}:
|
||||
return gvar.New(gconv.Strings(v)), err
|
||||
|
||||
case *redis.Message:
|
||||
result = &gredis.Message{
|
||||
Channel: v.Channel,
|
||||
Pattern: v.Pattern,
|
||||
Payload: v.Payload,
|
||||
PayloadSlice: v.PayloadSlice,
|
||||
}
|
||||
|
||||
case *redis.Subscription:
|
||||
result = &gredis.Subscription{
|
||||
Kind: v.Kind,
|
||||
Channel: v.Channel,
|
||||
Count: v.Count,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return gvar.New(result), err
|
||||
}
|
||||
|
||||
// Receive receives a single reply as gvar.Var from the Redis server.
|
||||
func (c *Conn) Receive(ctx context.Context) (*gvar.Var, error) {
|
||||
if c.ps != nil {
|
||||
v, err := c.resultToVar(c.ps.Receive(ctx))
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis PubSub Receive failed`)
|
||||
}
|
||||
return v, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Close closes current PubSub or puts the connection back to connection pool.
|
||||
func (c *Conn) Close(ctx context.Context) (err error) {
|
||||
if c.ps != nil {
|
||||
err = c.ps.Close()
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis PubSub Close failed`)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Subscribe subscribes the client to the specified channels.
|
||||
//
|
||||
// https://redis.io/commands/subscribe/
|
||||
func (c *Conn) Subscribe(ctx context.Context, channel string, channels ...string) ([]*gredis.Subscription, error) {
|
||||
args := append([]interface{}{channel}, gconv.Interfaces(channels)...)
|
||||
_, err := c.Do(ctx, "Subscribe", args...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
subs := make([]*gredis.Subscription, len(args))
|
||||
for i := 0; i < len(subs); i++ {
|
||||
v, err := c.Receive(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
subs[i] = v.Val().(*gredis.Subscription)
|
||||
}
|
||||
return subs, err
|
||||
}
|
||||
|
||||
// PSubscribe subscribes the client to the given patterns.
|
||||
//
|
||||
// Supported glob-style patterns:
|
||||
// - h?llo subscribes to hello, hallo and hxllo
|
||||
// - h*llo subscribes to hllo and heeeello
|
||||
// - h[ae]llo subscribes to hello and hallo, but not hillo
|
||||
//
|
||||
// Use \ to escape special characters if you want to match them verbatim.
|
||||
//
|
||||
// https://redis.io/commands/psubscribe/
|
||||
func (c *Conn) PSubscribe(ctx context.Context, pattern string, patterns ...string) ([]*gredis.Subscription, error) {
|
||||
args := append([]interface{}{pattern}, gconv.Interfaces(patterns)...)
|
||||
_, err := c.Do(ctx, "PSubscribe", args...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
subs := make([]*gredis.Subscription, len(args))
|
||||
for i := 0; i < len(subs); i++ {
|
||||
v, err := c.Receive(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
subs[i] = v.Val().(*gredis.Subscription)
|
||||
}
|
||||
return subs, err
|
||||
}
|
||||
|
||||
// ReceiveMessage receives a single message of subscription from the Redis server.
|
||||
func (c *Conn) ReceiveMessage(ctx context.Context) (*gredis.Message, error) {
|
||||
v, err := c.Receive(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return v.Val().(*gredis.Message), nil
|
||||
}
|
||||
|
||||
// traceSpanEnd checks and adds redis trace information to OpenTelemetry.
|
||||
func (c *Conn) traceSpanEnd(ctx context.Context, span trace.Span, item *traceItem) {
|
||||
if gtrace.IsUsingDefaultProvider() || !gtrace.IsTracingInternal() {
|
||||
return
|
||||
}
|
||||
if ctx == nil {
|
||||
ctx = context.Background()
|
||||
}
|
||||
if item.err != nil {
|
||||
span.SetStatus(codes.Error, fmt.Sprintf(`%+v`, item.err))
|
||||
}
|
||||
|
||||
span.SetAttributes(gtrace.CommonLabels()...)
|
||||
|
||||
span.SetAttributes(
|
||||
attribute.String(traceAttrRedisAddress, c.redis.config.Address),
|
||||
attribute.Int(traceAttrRedisDb, c.redis.config.Db),
|
||||
)
|
||||
|
||||
jsonBytes, _ := gjson.Marshal(item.args)
|
||||
span.AddEvent(traceEventRedisExecution, trace.WithAttributes(
|
||||
attribute.String(traceEventRedisExecutionCommand, item.command),
|
||||
attribute.String(traceEventRedisExecutionCost, fmt.Sprintf(`%d ms`, item.costMilli)),
|
||||
attribute.String(traceEventRedisExecutionArguments, string(jsonBytes)),
|
||||
))
|
||||
}
|
87
contrib/nosql/redis/redis_func.go
Normal file
87
contrib/nosql/redis/redis_func.go
Normal file
@ -0,0 +1,87 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/os/gstructs"
|
||||
)
|
||||
|
||||
func mustMergeOptionToArgs(args []interface{}, option interface{}) []interface{} {
|
||||
if option == nil {
|
||||
return args
|
||||
}
|
||||
var (
|
||||
err error
|
||||
optionArgs []interface{}
|
||||
)
|
||||
optionArgs, err = convertOptionToArgs(option)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return append(args, optionArgs...)
|
||||
}
|
||||
|
||||
func convertOptionToArgs(option interface{}) ([]interface{}, error) {
|
||||
if option == nil {
|
||||
return nil, nil
|
||||
}
|
||||
var (
|
||||
err error
|
||||
args = make([]interface{}, 0)
|
||||
fields []gstructs.Field
|
||||
subFields []gstructs.Field
|
||||
)
|
||||
fields, err = gstructs.Fields(gstructs.FieldsInput{
|
||||
Pointer: option,
|
||||
RecursiveOption: gstructs.RecursiveOptionEmbeddedNoTag,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, field := range fields {
|
||||
switch field.OriginalKind() {
|
||||
// See SetOption
|
||||
case reflect.Bool:
|
||||
if field.Value.Bool() {
|
||||
args = append(args, field.Name())
|
||||
}
|
||||
|
||||
// See ZRangeOption
|
||||
case reflect.Struct:
|
||||
if field.Value.IsNil() {
|
||||
continue
|
||||
}
|
||||
if !field.IsEmbedded() {
|
||||
args = append(args, field.Name())
|
||||
}
|
||||
subFields, err = gstructs.Fields(gstructs.FieldsInput{
|
||||
Pointer: option,
|
||||
RecursiveOption: gstructs.RecursiveOptionEmbeddedNoTag,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, subField := range subFields {
|
||||
args = append(args, subField.Value.Interface())
|
||||
}
|
||||
|
||||
// See TTLOption
|
||||
default:
|
||||
fieldValue := field.Value.Interface()
|
||||
if field.Value.Kind() == reflect.Ptr {
|
||||
if field.Value.IsNil() {
|
||||
continue
|
||||
}
|
||||
fieldValue = field.Value.Elem().Interface()
|
||||
}
|
||||
args = append(args, field.Name(), fieldValue)
|
||||
}
|
||||
}
|
||||
return args, nil
|
||||
}
|
341
contrib/nosql/redis/redis_group_generic.go
Normal file
341
contrib/nosql/redis/redis_group_generic.go
Normal file
@ -0,0 +1,341 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
// GroupGeneric provides generic functions of redis.
|
||||
type GroupGeneric struct {
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// GroupGeneric creates and returns GroupGeneric.
|
||||
func (r *Redis) GroupGeneric() gredis.IGroupGeneric {
|
||||
return GroupGeneric{
|
||||
redis: r,
|
||||
}
|
||||
}
|
||||
|
||||
// Copy copies the value stored at the source key to the destination key.
|
||||
//
|
||||
// By default, the destination key is created in the logical database used by the connection.
|
||||
// The DB option allows specifying an alternative logical database index for the destination key.
|
||||
//
|
||||
// The command returns an error when the destination key already exists.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if source was copied.
|
||||
// - 0 if source was not copied.
|
||||
//
|
||||
// https://redis.io/commands/copy/
|
||||
func (r GroupGeneric) Copy(ctx context.Context, source, destination string, option ...gredis.CopyOption) (int64, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "Copy", mustMergeOptionToArgs(
|
||||
[]interface{}{source, destination}, usedOption,
|
||||
)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Exists returns if key exists.
|
||||
// The user should be aware that if the same existing key is mentioned in the arguments multiple times,
|
||||
// it will be counted multiple times.
|
||||
//
|
||||
// It returns the number of keys that exist from those specified as arguments.
|
||||
//
|
||||
// https://redis.io/commands/exists/
|
||||
func (r GroupGeneric) Exists(ctx context.Context, keys ...string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Exists", gconv.Interfaces(keys)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Type returns the string representation of the type of the value stored at key.
|
||||
// The different types that can be returned are: string, list, set, zset, hash and stream.
|
||||
//
|
||||
// It returns type of key, or none when key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/type/
|
||||
func (r GroupGeneric) Type(ctx context.Context, key string) (string, error) {
|
||||
v, err := r.redis.Do(ctx, "Type", key)
|
||||
return v.String(), err
|
||||
}
|
||||
|
||||
// Unlink is very similar to DEL: it removes the specified keys. Just like DEL a key is ignored if it does not exist.
|
||||
// However, the command performs the actual memory reclaiming in a different thread, so it is not blocking, while DEL is.
|
||||
// This is where the command name comes from: the command just unlinks the keys from the keyspace.
|
||||
// The actual removal will happen later asynchronously.
|
||||
//
|
||||
// It returns the number of keys that were unlinked.
|
||||
//
|
||||
// https://redis.io/commands/unlink/
|
||||
func (r GroupGeneric) Unlink(ctx context.Context, keys ...string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Unlink", gconv.Interfaces(keys)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Rename renames key to newKey. It returns an error when key does not exist.
|
||||
// If newKey already exists it is overwritten, when this happens RENAME executes an implicit DEL operation,
|
||||
// so if the deleted key contains a very big value it may cause high latency even if RENAME itself is usually a constant-time operation.
|
||||
//
|
||||
// In Cluster mode, both key and newKey must be in the same hash slot,
|
||||
// meaning that in practice only keys that have the same hashtag can be reliably renamed in cluster.
|
||||
//
|
||||
// https://redis.io/commands/rename/
|
||||
func (r GroupGeneric) Rename(ctx context.Context, key, newKey string) error {
|
||||
_, err := r.redis.Do(ctx, "Rename", key, newKey)
|
||||
return err
|
||||
}
|
||||
|
||||
// RenameNX renames key to newKey if newKey does not yet exist.
|
||||
// It returns an error when key does not exist.
|
||||
// In Cluster mode, both key and newKey must be in the same hash slot,
|
||||
// meaning that in practice only keys that have the same hashtag can be reliably renamed in cluster.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if key was renamed to newKey.
|
||||
// - 0 if newKey already exists.
|
||||
//
|
||||
// https://redis.io/commands/renamenx/
|
||||
func (r GroupGeneric) RenameNX(ctx context.Context, key, newKey string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "RenameNX", key, newKey)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Move moves key from the currently selected database (see SELECT) to the specified destination database.
|
||||
// When key already exists in the destination database, or it does not exist in the source database,
|
||||
// it does nothing.
|
||||
// It is possible to use MOVE as a locking primitive because of this.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if key was moved.
|
||||
// - 0 if key was not moved.
|
||||
//
|
||||
// https://redis.io/commands/move/
|
||||
func (r GroupGeneric) Move(ctx context.Context, key string, db int) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Move", key, db)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Del removes the specified keys.
|
||||
// a key is ignored if it does not exist.
|
||||
//
|
||||
// It returns the number of keys that were removed.
|
||||
//
|
||||
// https://redis.io/commands/del/
|
||||
func (r GroupGeneric) Del(ctx context.Context, keys ...string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Del", gconv.Interfaces(keys)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// RandomKey return a random key from the currently selected database.
|
||||
//
|
||||
// It returns the random key, or nil when the database is empty.
|
||||
//
|
||||
// https://redis.io/commands/randomkey/
|
||||
func (r GroupGeneric) RandomKey(ctx context.Context) (string, error) {
|
||||
v, err := r.redis.Do(ctx, "RandomKey")
|
||||
return v.String(), err
|
||||
}
|
||||
|
||||
// DBSize return the number of keys in the currently-selected database.
|
||||
//
|
||||
// https://redis.io/commands/dbsize/
|
||||
func (r GroupGeneric) DBSize(ctx context.Context) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "DBSize")
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Keys return all keys matching pattern.
|
||||
//
|
||||
// While the time complexity for this operation is O(N), the constant times are fairly low.
|
||||
// For example, Redis running on an entry level laptop can scan a 1 million key database in 40 milliseconds.
|
||||
//
|
||||
// https://redis.io/commands/keys/
|
||||
func (r GroupGeneric) Keys(ctx context.Context, pattern string) ([]string, error) {
|
||||
v, err := r.redis.Do(ctx, "Keys", pattern)
|
||||
return v.Strings(), err
|
||||
}
|
||||
|
||||
// FlushDB delete all the keys of the currently selected DB. This command never fails.
|
||||
//
|
||||
// https://redis.io/commands/flushdb/
|
||||
func (r GroupGeneric) FlushDB(ctx context.Context, option ...gredis.FlushOp) error {
|
||||
_, err := r.redis.Do(ctx, "FlushDB", gconv.Interfaces(option)...)
|
||||
return err
|
||||
}
|
||||
|
||||
// FlushAll delete all the keys of all the existing databases, not just the currently selected one.
|
||||
// This command never fails.
|
||||
// By default, FlushAll will synchronously flush all the databases.
|
||||
//
|
||||
// It is possible to use one of the following modifiers to dictate the flushing mode explicitly:
|
||||
// ASYNC: flushes the databases asynchronously
|
||||
// SYNC: flushes the databases synchronously
|
||||
//
|
||||
// Note: an asynchronous FlushAll command only deletes keys that were present at the time the command was invoked.
|
||||
// Keys created during an asynchronous flush will be unaffected.
|
||||
//
|
||||
// https://redis.io/commands/flushall/
|
||||
func (r GroupGeneric) FlushAll(ctx context.Context, option ...gredis.FlushOp) error {
|
||||
_, err := r.redis.Do(ctx, "FlushAll", gconv.Interfaces(option)...)
|
||||
return err
|
||||
}
|
||||
|
||||
// Expire sets a timeout on key.
|
||||
// After the timeout has expired, the key will automatically be deleted.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if the timeout was set.
|
||||
// - 0 if the timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
|
||||
//
|
||||
// https://redis.io/commands/expire/
|
||||
func (r GroupGeneric) Expire(ctx context.Context, key string, seconds int64, option ...gredis.ExpireOption) (int64, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "Expire", mustMergeOptionToArgs(
|
||||
[]interface{}{key, seconds}, usedOption,
|
||||
)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ExpireAt has the same effect and semantic as EXPIRE, but instead of specifying the number of
|
||||
// seconds representing the TTL (time to live), it takes an absolute Unix timestamp (seconds since
|
||||
// January 1, 1970).
|
||||
// A timestamp in the past will delete the key immediately.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if the timeout was set.
|
||||
// - 0 if the timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
|
||||
//
|
||||
// https://redis.io/commands/expireat/
|
||||
func (r GroupGeneric) ExpireAt(ctx context.Context, key string, time time.Time, option ...gredis.ExpireOption) (int64, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "ExpireAt", mustMergeOptionToArgs(
|
||||
[]interface{}{key, gtime.New(time).Timestamp()}, usedOption,
|
||||
)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ExpireTime returns the absolute time at which the given key will expire.
|
||||
//
|
||||
// It returns:
|
||||
// - -1 if the key exists but has no associated expiration time.
|
||||
// - -2 if the key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/expiretime/
|
||||
func (r GroupGeneric) ExpireTime(ctx context.Context, key string) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "ExpireTime", key)
|
||||
}
|
||||
|
||||
// TTL returns the remaining time to live of a key that has a timeout.
|
||||
// This introspection capability allows a Redis client to check how many seconds a given key
|
||||
// will continue to be part of the dataset.
|
||||
// In Redis 2.6 or older the command returns -1 if the key does not exist or if the key exist but has
|
||||
// no associated expire.
|
||||
//
|
||||
// Starting with Redis 2.8 the return value in case of error changed:
|
||||
//
|
||||
// The command returns -2 if the key does not exist.
|
||||
// The command returns -1 if the key exists but has no associated expire.
|
||||
// See also the PTTL command that returns the same information with milliseconds resolution
|
||||
// (Only available in Redis 2.6 or greater).
|
||||
//
|
||||
// It returns TTL in seconds, or a negative value in order to signal an error (see the description above).
|
||||
//
|
||||
// https://redis.io/commands/ttl/
|
||||
func (r GroupGeneric) TTL(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "TTL", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Persist removes the existing timeout on key, turning the key from volatile (a key with an expire set)
|
||||
// to persistent (a key that will never expire as no timeout is associated).
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if the timeout was removed.
|
||||
// - 0 if key does not exist or does not have an associated timeout.
|
||||
//
|
||||
// https://redis.io/commands/persist/
|
||||
func (r GroupGeneric) Persist(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Persist", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// PExpire works exactly like EXPIRE but the time to live of the key is specified in milliseconds
|
||||
// instead of seconds.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if the timeout was set.
|
||||
// - 0 if the timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.
|
||||
//
|
||||
// https://redis.io/commands/pexpire/
|
||||
func (r GroupGeneric) PExpire(ctx context.Context, key string, milliseconds int64, option ...gredis.ExpireOption) (int64, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "PExpire", mustMergeOptionToArgs(
|
||||
[]interface{}{key, milliseconds}, usedOption,
|
||||
)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// PExpireAt has the same effect and semantic as ExpireAt, but the Unix time at which the key will
|
||||
// expire is specified in milliseconds instead of seconds.
|
||||
//
|
||||
// https://redis.io/commands/pexpireat/
|
||||
func (r GroupGeneric) PExpireAt(ctx context.Context, key string, time time.Time, option ...gredis.ExpireOption) (int64, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "PExpireAt", mustMergeOptionToArgs(
|
||||
[]interface{}{key, gtime.New(time).TimestampMilli()}, usedOption,
|
||||
)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// PExpireTime returns the expiration time of given `key`.
|
||||
//
|
||||
// It returns:
|
||||
// - -1 if the key exists but has no associated expiration time.
|
||||
// - -2 if the key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/pexpiretime/
|
||||
func (r GroupGeneric) PExpireTime(ctx context.Context, key string) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "PExpireTime", key)
|
||||
}
|
||||
|
||||
// PTTL like TTL this command returns the remaining time to live of a key that has an expired set,
|
||||
// with the sole difference that TTL returns the amount of remaining time in seconds while PTTL
|
||||
// returns it in milliseconds.
|
||||
//
|
||||
// In Redis 2.6 or older the command returns -1 if the key does not exist or if the key exist but has
|
||||
// no associated expire.
|
||||
//
|
||||
// It returns TTL in milliseconds, or a negative value in order to signal an error (see the description above).
|
||||
//
|
||||
// https://redis.io/commands/pttl/
|
||||
func (r GroupGeneric) PTTL(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "PTTL", key)
|
||||
return v.Int64(), err
|
||||
}
|
194
contrib/nosql/redis/redis_group_hash.go
Normal file
194
contrib/nosql/redis/redis_group_hash.go
Normal file
@ -0,0 +1,194 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
// GroupHash is the redis group object for hash operations.
|
||||
type GroupHash struct {
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// GroupHash creates and returns a redis group object for hash operations.
|
||||
func (r *Redis) GroupHash() gredis.IGroupHash {
|
||||
return GroupHash{
|
||||
redis: r,
|
||||
}
|
||||
}
|
||||
|
||||
// HSet sets field in the hash stored at key to value.
|
||||
// If key does not exist, a new key holding a hash is created.
|
||||
// If field already exists in the hash, it is overwritten.
|
||||
//
|
||||
// It returns the number of fields that were added.
|
||||
//
|
||||
// https://redis.io/commands/hset/
|
||||
func (r GroupHash) HSet(ctx context.Context, key string, fields map[string]interface{}) (int64, error) {
|
||||
var s = []interface{}{key}
|
||||
for k, v := range fields {
|
||||
s = append(s, k, v)
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "HSet", s...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// HSetNX sets field in the hash stored at key to value, only if field does not yet exist.
|
||||
// If key does not exist, a new key holding a hash is created.
|
||||
// If field already exists, this operation has no effect.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if field is a new field in the hash and value was set.
|
||||
// - 0 if field already exists in the hash and no operation was performed.
|
||||
//
|
||||
// https://redis.io/commands/hsetnx/
|
||||
func (r GroupHash) HSetNX(ctx context.Context, key, field string, value interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "HSetNX", key, field, value)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// HGet returns the value associated with field in the hash stored at key.
|
||||
//
|
||||
// It returns the value associated with field, or nil when field is not present in the hash or key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/hget/
|
||||
func (r GroupHash) HGet(ctx context.Context, key, field string) (*gvar.Var, error) {
|
||||
v, err := r.redis.Do(ctx, "HGet", key, field)
|
||||
return v, err
|
||||
}
|
||||
|
||||
// HStrLen Returns the string length of the value associated with field in the hash stored at key.
|
||||
// If the key or the field do not exist, 0 is returned.
|
||||
//
|
||||
// It returns the string length of the value associated with field,
|
||||
// or zero when field is not present in the hash or key does not exist at all.
|
||||
//
|
||||
// https://redis.io/commands/hstrlen/
|
||||
func (r GroupHash) HStrLen(ctx context.Context, key, field string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "HSTRLEN", key, field)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// HExists returns if field is an existing field in the hash stored at key.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if the hash contains field.
|
||||
// - 0 if the hash does not contain field, or key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/hexists/
|
||||
func (r GroupHash) HExists(ctx context.Context, key, field string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "HExists", key, field)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// HDel removes the specified fields from the hash stored at key.
|
||||
// Specified fields that do not exist within this hash are ignored.
|
||||
// If key does not exist, it is treated as an empty hash and this command returns 0.
|
||||
//
|
||||
// It returns the number of fields that were removed from the hash, not including specified but non-existing fields.
|
||||
//
|
||||
// https://redis.io/commands/hdel/
|
||||
func (r GroupHash) HDel(ctx context.Context, key string, fields ...string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "HDel", append([]interface{}{key}, gconv.Interfaces(fields)...)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// HLen returns the number of fields contained in the hash stored at key.
|
||||
//
|
||||
// https://redis.io/commands/hlen/
|
||||
func (r GroupHash) HLen(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "HLen", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// HIncrBy increments the number stored at field in the hash stored at key by increment.
|
||||
// If key does not exist, a new key holding a hash is created.
|
||||
// If field does not exist the value is set to 0 before the operation is performed.
|
||||
//
|
||||
// The range of values supported by HIncrBy is limited to 64-bit signed integers.
|
||||
//
|
||||
// https://redis.io/commands/hincrby/
|
||||
func (r GroupHash) HIncrBy(ctx context.Context, key, field string, increment int64) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "HIncrBy", key, field, increment)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// HIncrByFloat increments the specified field of a hash stored at key, and representing a floating
|
||||
// point number, by the specified increment. If the increment value is negative, the result is to
|
||||
// have the hash field value decremented instead of incremented. If the field does not exist, it is
|
||||
// set to 0 before performing the operation.
|
||||
// An error is returned if one of the following conditions occur:
|
||||
//
|
||||
// The field contains a value of the wrong type (not a string).
|
||||
// The current field content or the specified increment are not parsable as a double precision
|
||||
// floating point number.
|
||||
// The exact behavior of this command is identical to the one of the HIncrByFloat command,
|
||||
// please refer to the documentation of HIncrByFloat for further information.
|
||||
//
|
||||
// It returns the value of field after the increment.
|
||||
//
|
||||
// https://redis.io/commands/hincrbyfloat/
|
||||
func (r GroupHash) HIncrByFloat(ctx context.Context, key, field string, increment float64) (float64, error) {
|
||||
v, err := r.redis.Do(ctx, "HIncrByFloat", key, field, increment)
|
||||
return v.Float64(), err
|
||||
}
|
||||
|
||||
// HMSet sets the specified fields to their respective values in the hash stored at key.
|
||||
// This command overwrites any specified fields already existing in the hash.
|
||||
// If key does not exist, a new key holding a hash is created.
|
||||
//
|
||||
// https://redis.io/commands/hmset/
|
||||
func (r GroupHash) HMSet(ctx context.Context, key string, fields map[string]interface{}) error {
|
||||
var s = []interface{}{key}
|
||||
for k, v := range fields {
|
||||
s = append(s, k, v)
|
||||
}
|
||||
_, err := r.redis.Do(ctx, "HMSet", s...)
|
||||
return err
|
||||
}
|
||||
|
||||
// HMGet return the values associated with the specified fields in the hash stored at key.
|
||||
// For every field that does not exist in the hash, a nil value is returned.
|
||||
// Because non-existing keys are treated as empty hashes, running HMGet against a non-existing key
|
||||
// will return a list of nil values.
|
||||
//
|
||||
// https://redis.io/commands/hmget/
|
||||
func (r GroupHash) HMGet(ctx context.Context, key string, fields ...string) ([]*gvar.Var, error) {
|
||||
v, err := r.redis.Do(ctx, "HMGet", append([]interface{}{key}, gconv.Interfaces(fields)...)...)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// HKeys returns all field names in the hash stored at key.
|
||||
//
|
||||
// https://redis.io/commands/hkeys/
|
||||
func (r GroupHash) HKeys(ctx context.Context, key string) ([]string, error) {
|
||||
v, err := r.redis.Do(ctx, "HKeys", key)
|
||||
return v.Strings(), err
|
||||
}
|
||||
|
||||
// HVals return all values in the hash stored at key.
|
||||
//
|
||||
// https://redis.io/commands/hvals/
|
||||
func (r GroupHash) HVals(ctx context.Context, key string) ([]*gvar.Var, error) {
|
||||
v, err := r.redis.Do(ctx, "HVals", key)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// HGetAll returns all fields and values of the hash stored at key.
|
||||
// In the returned value, every field name is followed by its value,
|
||||
// so the length of the reply is twice the size of the hash.
|
||||
//
|
||||
// https://redis.io/commands/hgetall/
|
||||
func (r GroupHash) HGetAll(ctx context.Context, key string) (map[string]*gvar.Var, error) {
|
||||
v, err := r.redis.Do(ctx, "HGetAll", key)
|
||||
return v.MapStrVar(), err
|
||||
}
|
263
contrib/nosql/redis/redis_group_list.go
Normal file
263
contrib/nosql/redis/redis_group_list.go
Normal file
@ -0,0 +1,263 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
// GroupList is the redis group list object.
|
||||
type GroupList struct {
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// GroupList creates and returns a redis group object for list operations.
|
||||
func (r *Redis) GroupList() gredis.IGroupList {
|
||||
return GroupList{
|
||||
redis: r,
|
||||
}
|
||||
}
|
||||
|
||||
// LPush inserts all the specified values at the head of the list stored at key
|
||||
// Insert all the specified values at the head of the list stored at key.
|
||||
// If key does not exist, it is created as empty list before performing the push operations.
|
||||
// When key holds a value that is not a list, an error is returned.
|
||||
//
|
||||
// It returns the length of the list after the push operations.
|
||||
//
|
||||
// https://redis.io/commands/lpush/
|
||||
func (r GroupList) LPush(ctx context.Context, key string, values ...interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "LPush", append([]interface{}{key}, values...)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// LPushX insert value at the head of the list stored at key, only if key exists and holds a list.
|
||||
// Inserts specified values at the head of the list stored at key, only if key already exists and holds a list.
|
||||
// In contrary to LPush, no operation will be performed when key does not yet exist.
|
||||
// Return Integer reply: the length of the list after the push operation.
|
||||
//
|
||||
// It returns the length of the list after the push operations.
|
||||
//
|
||||
// https://redis.io/commands/lpushx
|
||||
func (r GroupList) LPushX(ctx context.Context, key string, element interface{}, elements ...interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "LPushX", append([]interface{}{key, element}, elements...)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// RPush inserts all the specified values at the tail of the list stored at key.
|
||||
// Insert all the specified values at the tail of the list stored at key.
|
||||
// If key does not exist, it is created as empty list before performing the push operation.
|
||||
//
|
||||
// When key holds a value that is not a list, an error is returned.
|
||||
// It is possible to push multiple elements using a single command call just specifying multiple
|
||||
// arguments at the end of the command. Elements are inserted one after the other to the tail of the
|
||||
// list, from the leftmost element to the rightmost element.
|
||||
// So for instance the command RPush mylist a b c will result into a list containing a as first element,
|
||||
// b as second element and c as third element.
|
||||
//
|
||||
// It returns the length of the list after the push operation.
|
||||
//
|
||||
// https://redis.io/commands/rpush
|
||||
func (r GroupList) RPush(ctx context.Context, key string, values ...interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "RPush", append([]interface{}{key}, values...)...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// RPushX inserts value at the tail of the list stored at key, only if key exists and holds a list.
|
||||
// Inserts specified values at the tail of the list stored at key, only if key already exists and
|
||||
// holds a list.
|
||||
//
|
||||
// In contrary to RPush, no operation will be performed when key does not yet exist.
|
||||
//
|
||||
// It returns the length of the list after the push operation.
|
||||
//
|
||||
// https://redis.io/commands/rpushx
|
||||
func (r GroupList) RPushX(ctx context.Context, key string, value interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "RPushX", key, value)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// LPop remove and returns the first element of the list stored at key.
|
||||
// Removes and returns the first elements of the list stored at key.
|
||||
//
|
||||
// Starting with Redis version 6.2.0: Added the count argument.
|
||||
//
|
||||
// By default, the command pops a single element from the beginning of the list.
|
||||
// When provided with the optional count argument, the reply will consist of up to count elements,
|
||||
// depending on the list's length.
|
||||
//
|
||||
// Return When called without the count argument:
|
||||
// Bulk string reply: the value of the first element, or nil when key does not exist.
|
||||
//
|
||||
// When called with the count argument:
|
||||
// Array reply: list of popped elements, or nil when key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/lpop
|
||||
func (r GroupList) LPop(ctx context.Context, key string, count ...int) (*gvar.Var, error) {
|
||||
if len(count) > 0 {
|
||||
return r.redis.Do(ctx, "LPop", key, count[0])
|
||||
}
|
||||
return r.redis.Do(ctx, "LPop", key)
|
||||
}
|
||||
|
||||
// RPop remove and returns the last element of the list stored at key.
|
||||
// Removes and returns the last elements of the list stored at key.
|
||||
//
|
||||
// Starting with Redis version 6.2.0: Added the count argument.
|
||||
//
|
||||
// By default, the command pops a single element from the end of the list.
|
||||
// When provided with the optional count argument, the reply will consist of up to count elements,
|
||||
// depending on the list's length.
|
||||
//
|
||||
// It returns:
|
||||
// - When called without the count argument:
|
||||
// the value of the last element, or nil when key does not exist.
|
||||
// - When called with the count argument:
|
||||
// list of popped elements, or nil when key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/rpop
|
||||
func (r GroupList) RPop(ctx context.Context, key string, count ...int) (*gvar.Var, error) {
|
||||
if len(count) > 0 {
|
||||
return r.redis.Do(ctx, "RPop", key, count[0])
|
||||
}
|
||||
return r.redis.Do(ctx, "RPop", key)
|
||||
}
|
||||
|
||||
// LRem removes the first count occurrences of elements equal to value from the list stored at key.
|
||||
//
|
||||
// It returns the number of removed elements.
|
||||
//
|
||||
// https://redis.io/commands/lrem/
|
||||
func (r GroupList) LRem(ctx context.Context, key string, count int64, value interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "LRem", key, count, value)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// LLen returns the length of the list stored at key.
|
||||
// Returns the length of the list stored at key.
|
||||
// If key does not exist, it is interpreted as an empty list and 0 is returned.
|
||||
// An error is returned when the value stored at key is not a list.
|
||||
//
|
||||
// https://redis.io/commands/llen
|
||||
func (r GroupList) LLen(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "LLen", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// LIndex return the element at index in the list stored at key.
|
||||
// Returns the element at index in the list stored at key.
|
||||
// The index is zero-based, so 0 means the first element, 1 the second element and so on.
|
||||
// Negative indices can be used to designate elements starting at the tail of the list.
|
||||
// Here, -1 means the last element, -2 means the penultimate and so forth.
|
||||
// When the value at key is not a list, an error is returned.
|
||||
//
|
||||
// It returns the requested element, or nil when index is out of range.
|
||||
//
|
||||
// https://redis.io/commands/lindex
|
||||
func (r GroupList) LIndex(ctx context.Context, key string, index int64) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "LIndex", key, index)
|
||||
}
|
||||
|
||||
// LInsert inserts element in the list stored at key either before or after the reference value pivot.
|
||||
// When key does not exist, it is considered an empty list and no operation is performed.
|
||||
// An error is returned when key exists but does not hold a list value.
|
||||
//
|
||||
// It returns the length of the list after the insert operation, or -1 when the value pivot was not found.
|
||||
//
|
||||
// https://redis.io/commands/linsert/
|
||||
func (r GroupList) LInsert(ctx context.Context, key string, op gredis.LInsertOp, pivot, value interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "LInsert", key, string(op), pivot, value)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// LSet sets the list element at index to element.
|
||||
// For more information on the index argument, see LIndex.
|
||||
// An error is returned for out of range indexes.
|
||||
//
|
||||
// https://redis.io/commands/lset/
|
||||
func (r GroupList) LSet(ctx context.Context, key string, index int64, value interface{}) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "LSet", key, index, value)
|
||||
}
|
||||
|
||||
// LRange returns the specified elements of the list stored at key.
|
||||
// The offsets start and stop are zero-based indexes, with 0 being the first element of the list (the
|
||||
// head of the list), 1 being the next element and so on.
|
||||
//
|
||||
// These offsets can also be negative numbers indicating offsets starting at the end of the list.
|
||||
// For example, -1 is the last element of the list, -2 the penultimate, and so on.
|
||||
//
|
||||
// https://redis.io/commands/lrange/
|
||||
func (r GroupList) LRange(ctx context.Context, key string, start, stop int64) ([]*gvar.Var, error) {
|
||||
v, err := r.redis.Do(ctx, "LRange", key, start, stop)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// LTrim trims an existing list so that it will contain only the specified range of elements
|
||||
// specified. Both start and stop are zero-based indexes, where 0 is the first element of the list
|
||||
// (the head), 1 the next element and so on.
|
||||
//
|
||||
// https://redis.io/commands/ltrim/
|
||||
func (r GroupList) LTrim(ctx context.Context, key string, start, stop int64) error {
|
||||
_, err := r.redis.Do(ctx, "LTrim", key, start, stop)
|
||||
return err
|
||||
}
|
||||
|
||||
// BLPop is a blocking list pop primitive.
|
||||
// It is the blocking version of LPop because it blocks the connection when there are no elements to
|
||||
// pop from any of the given lists.
|
||||
// An element is popped from the head of the first list that is non-empty, with the given keys being
|
||||
// checked in the order that they are given.
|
||||
//
|
||||
// The timeout argument is interpreted as a double value specifying the maximum number of seconds to
|
||||
// block. A timeout of zero can be used to block indefinitely.
|
||||
//
|
||||
// https://redis.io/commands/blpop/
|
||||
func (r GroupList) BLPop(ctx context.Context, timeout int64, keys ...string) ([]*gvar.Var, error) {
|
||||
v, err := r.redis.Do(ctx, "BLPop", append(gconv.Interfaces(keys), timeout)...)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// BRPop is a blocking list pop primitive.
|
||||
// It is the blocking version of RPop because it blocks the connection when there are no elements to
|
||||
// pop from any of the given lists. An element is popped from the tail of the first list that is
|
||||
// non-empty, with the given keys being checked in the order that they are given.
|
||||
//
|
||||
// The timeout argument is interpreted as a double value specifying the maximum number of seconds to
|
||||
// block. A timeout of zero can be used to block indefinitely.
|
||||
//
|
||||
// https://redis.io/commands/brpop/
|
||||
func (r GroupList) BRPop(ctx context.Context, timeout int64, keys ...string) ([]*gvar.Var, error) {
|
||||
v, err := r.redis.Do(ctx, "BRPop", append(gconv.Interfaces(keys), timeout)...)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// RPopLPush remove the last element in list source, appends it to the front of list destination and
|
||||
// returns it.
|
||||
//
|
||||
// https://redis.io/commands/rpoplpush/
|
||||
func (r GroupList) RPopLPush(ctx context.Context, source, destination string) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "RPopLPush", source, destination)
|
||||
}
|
||||
|
||||
// BRPopLPush is the blocking variant of RPopLPush.
|
||||
// When source contains elements, this command behaves exactly like RPopLPush. When used inside a
|
||||
// MULTI/EXEC block,
|
||||
// this command behaves exactly like RPopLPush. When source is empty, Redis will block the connection
|
||||
// until another // client pushes to it or until timeout is reached.
|
||||
// A timeout of zero can be used to block indefinitely.
|
||||
//
|
||||
// It returns the element being popped from source and pushed to destination.
|
||||
// If timeout is reached, a Null reply is returned.
|
||||
//
|
||||
// https://redis.io/commands/brpoplpush/
|
||||
func (r GroupList) BRPopLPush(ctx context.Context, source, destination string, timeout int64) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "BRPopLPush", source, destination, timeout)
|
||||
}
|
82
contrib/nosql/redis/redis_group_pubsub.go
Normal file
82
contrib/nosql/redis/redis_group_pubsub.go
Normal file
@ -0,0 +1,82 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
)
|
||||
|
||||
// GroupPubSub provides pub/sub functions for redis.
|
||||
type GroupPubSub struct {
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// GroupPubSub creates and returns GroupPubSub.
|
||||
func (r *Redis) GroupPubSub() gredis.IGroupPubSub {
|
||||
return GroupPubSub{
|
||||
redis: r,
|
||||
}
|
||||
}
|
||||
|
||||
// Publish posts a message to the given channel.
|
||||
//
|
||||
// In a Redis Cluster clients can publish to every node. The cluster makes sure that published
|
||||
// messages are forwarded as needed, so clients can subscribe to any channel by connecting to any one
|
||||
// of the nodes.
|
||||
//
|
||||
// It returns the number of clients that received the message.
|
||||
// Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client
|
||||
// are included in the count.
|
||||
//
|
||||
// https://redis.io/commands/publish/
|
||||
func (r GroupPubSub) Publish(ctx context.Context, channel string, message interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Publish", channel, message)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Subscribe subscribes the client to the specified channels.
|
||||
//
|
||||
// https://redis.io/commands/subscribe/
|
||||
func (r GroupPubSub) Subscribe(
|
||||
ctx context.Context, channel string, channels ...string,
|
||||
) (gredis.Conn, []*gredis.Subscription, error) {
|
||||
conn, err := r.redis.Conn(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
subs, err := conn.Subscribe(ctx, channel, channels...)
|
||||
if err != nil {
|
||||
return conn, nil, err
|
||||
}
|
||||
return conn, subs, nil
|
||||
}
|
||||
|
||||
// PSubscribe subscribes the client to the given patterns.
|
||||
//
|
||||
// Supported glob-style patterns:
|
||||
// - h?llo subscribes to hello, hallo and hxllo
|
||||
// - h*llo subscribes to hllo and heeeello
|
||||
// - h[ae]llo subscribes to hello and hallo, but not hillo
|
||||
//
|
||||
// Use \ to escape special characters if you want to match them verbatim.
|
||||
//
|
||||
// https://redis.io/commands/psubscribe/
|
||||
func (r GroupPubSub) PSubscribe(
|
||||
ctx context.Context, pattern string, patterns ...string,
|
||||
) (gredis.Conn, []*gredis.Subscription, error) {
|
||||
conn, err := r.redis.Conn(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
subs, err := conn.PSubscribe(ctx, pattern, patterns...)
|
||||
if err != nil {
|
||||
return conn, nil, err
|
||||
}
|
||||
return conn, subs, nil
|
||||
}
|
113
contrib/nosql/redis/redis_group_script.go
Normal file
113
contrib/nosql/redis/redis_group_script.go
Normal file
@ -0,0 +1,113 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
// GroupScript provides script functions for redis.
|
||||
type GroupScript struct {
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// GroupScript creates and returns GroupScript.
|
||||
func (r *Redis) GroupScript() gredis.IGroupScript {
|
||||
return GroupScript{
|
||||
redis: r,
|
||||
}
|
||||
}
|
||||
|
||||
// Eval invokes the execution of a server-side Lua script.
|
||||
//
|
||||
// https://redis.io/commands/eval/
|
||||
func (r GroupScript) Eval(ctx context.Context, script string, numKeys int64, keys []string, args []interface{}) (*gvar.Var, error) {
|
||||
var s = []interface{}{script, numKeys}
|
||||
s = append(s, gconv.Interfaces(keys)...)
|
||||
s = append(s, args...)
|
||||
v, err := r.redis.Do(ctx, "Eval", s...)
|
||||
return v, err
|
||||
}
|
||||
|
||||
// EvalSha evaluates a script from the server's cache by its SHA1 digest.
|
||||
//
|
||||
// The server caches scripts by using the SCRIPT LOAD command.
|
||||
// The command is otherwise identical to EVAL.
|
||||
//
|
||||
// https://redis.io/commands/evalsha/
|
||||
func (r GroupScript) EvalSha(ctx context.Context, sha1 string, numKeys int64, keys []string, args []interface{}) (*gvar.Var, error) {
|
||||
var s = []interface{}{sha1, numKeys}
|
||||
s = append(s, gconv.Interfaces(keys)...)
|
||||
s = append(s, args...)
|
||||
v, err := r.redis.Do(ctx, "EvalSha", s...)
|
||||
return v, err
|
||||
}
|
||||
|
||||
// ScriptLoad loads a script into the scripts cache, without executing it.
|
||||
//
|
||||
// It returns the SHA1 digest of the script added into the script cache.
|
||||
//
|
||||
// https://redis.io/commands/script-load/
|
||||
func (r GroupScript) ScriptLoad(ctx context.Context, script string) (string, error) {
|
||||
v, err := r.redis.Do(ctx, "Script", "Load", script)
|
||||
return v.String(), err
|
||||
}
|
||||
|
||||
// ScriptExists returns information about the existence of the scripts in the script cache.
|
||||
//
|
||||
// It returns an array of integers that correspond to the specified SHA1 digest arguments.
|
||||
// For every corresponding SHA1 digest of a script that actually exists in the script cache,
|
||||
// a 1 is returned, otherwise 0 is returned.
|
||||
//
|
||||
// https://redis.io/commands/script-exists/
|
||||
func (r GroupScript) ScriptExists(ctx context.Context, sha1 string, sha1s ...string) (map[string]bool, error) {
|
||||
var (
|
||||
s []interface{}
|
||||
sha1Array = append([]interface{}{sha1}, gconv.Interfaces(sha1s)...)
|
||||
)
|
||||
s = append(s, "Exists")
|
||||
s = append(s, sha1Array...)
|
||||
result, err := r.redis.Do(ctx, "Script", s...)
|
||||
var (
|
||||
m = make(map[string]bool)
|
||||
resultArray = result.Vars()
|
||||
)
|
||||
for i := 0; i < len(sha1Array); i++ {
|
||||
m[gconv.String(sha1Array[i])] = resultArray[i].Bool()
|
||||
}
|
||||
return m, err
|
||||
}
|
||||
|
||||
// ScriptFlush flush the Lua scripts cache.
|
||||
//
|
||||
// https://redis.io/commands/script-flush/
|
||||
func (r GroupScript) ScriptFlush(ctx context.Context, option ...gredis.ScriptFlushOption) error {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
var s []interface{}
|
||||
s = append(s, "Flush")
|
||||
s = append(s, mustMergeOptionToArgs(
|
||||
[]interface{}{}, usedOption,
|
||||
)...)
|
||||
_, err := r.redis.Do(ctx, "Script", s...)
|
||||
return err
|
||||
}
|
||||
|
||||
// ScriptKill kills the currently executing EVAL script, assuming no write operation was yet performed
|
||||
// by the script.
|
||||
//
|
||||
// https://redis.io/commands/script-kill/
|
||||
func (r GroupScript) ScriptKill(ctx context.Context) error {
|
||||
_, err := r.redis.Do(ctx, "Script", "Kill")
|
||||
return err
|
||||
}
|
252
contrib/nosql/redis/redis_group_set.go
Normal file
252
contrib/nosql/redis/redis_group_set.go
Normal file
@ -0,0 +1,252 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
// GroupSet provides set functions for redis.
|
||||
type GroupSet struct {
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// GroupSet creates and returns GroupSet.
|
||||
func (r *Redis) GroupSet() gredis.IGroupSet {
|
||||
return GroupSet{
|
||||
redis: r,
|
||||
}
|
||||
}
|
||||
|
||||
// SAdd adds the specified members to the set stored at key.
|
||||
// Specified members that are already a member of this set are ignored.
|
||||
// If key does not exist, a new set is created before adding the specified members.
|
||||
//
|
||||
// An error is returned when the value stored at key is not a set.
|
||||
//
|
||||
// It returns the number of elements that were added to the set,
|
||||
// not including all the elements already present in the set.
|
||||
//
|
||||
// https://redis.io/commands/sadd/
|
||||
func (r GroupSet) SAdd(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error) {
|
||||
var s = []interface{}{key}
|
||||
s = append(s, member)
|
||||
s = append(s, members...)
|
||||
v, err := r.redis.Do(ctx, "SAdd", s...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// SIsMember returns if member is a member of the set stored at key.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if the element is a member of the set.
|
||||
// - 0 if the element is not a member of the set, or if key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/sismember/
|
||||
func (r GroupSet) SIsMember(ctx context.Context, key string, member interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "SIsMember", key, member)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// SPop removes and returns one or more random members from the set value store at key.
|
||||
//
|
||||
// This operation is similar to SRandMember, that returns one or more random elements from a set but
|
||||
// does not remove it.
|
||||
// By default, the command pops a single member from the set. When provided with the optional count
|
||||
// argument, the reply will consist of up to count members, depending on the set's cardinality.
|
||||
//
|
||||
// It returns:
|
||||
// - When called without the count argument:
|
||||
// Bulk string reply: the removed member, or nil when key does not exist.
|
||||
// - When called with the count argument:
|
||||
// Array reply: the removed members, or an empty array when key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/spop/
|
||||
func (r GroupSet) SPop(ctx context.Context, key string, count ...int) (*gvar.Var, error) {
|
||||
var s = []interface{}{key}
|
||||
s = append(s, gconv.Interfaces(count)...)
|
||||
v, err := r.redis.Do(ctx, "SPop", s...)
|
||||
return v, err
|
||||
}
|
||||
|
||||
// SRandMember called with just the key argument, return a random element from the set value stored
|
||||
// at key.
|
||||
// If the provided count argument is positive, return an array of distinct elements.
|
||||
// The array's length is either count or the set's cardinality (SCard), whichever is lower.
|
||||
// If called with a negative count, the behavior changes and the command is allowed to return the
|
||||
// same element multiple times. In this case, the number of returned elements is the absolute value
|
||||
// of the specified count.
|
||||
//
|
||||
// It returns:
|
||||
// - Bulk string reply: without the additional count argument, the command returns a Bulk Reply with the
|
||||
// randomly selected element, or nil when key does not exist.
|
||||
// - Array reply: when the additional count argument is passed, the command returns an array of elements,
|
||||
// or an empty array when key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/srandmember/
|
||||
func (r GroupSet) SRandMember(ctx context.Context, key string, count ...int) (*gvar.Var, error) {
|
||||
var s = []interface{}{key}
|
||||
s = append(s, gconv.Interfaces(count)...)
|
||||
v, err := r.redis.Do(ctx, "SRandMember", s...)
|
||||
return v, err
|
||||
}
|
||||
|
||||
// SRem removes the specified members from the set stored at key.
|
||||
// Specified members that are not a member of this set are ignored.
|
||||
// If key does not exist, it is treated as an empty set and this command returns 0.
|
||||
//
|
||||
// An error is returned when the value stored at key is not a set.
|
||||
//
|
||||
// It returns the number of members that were removed from the set, not including non existing members.
|
||||
//
|
||||
// https://redis.io/commands/srem/
|
||||
func (r GroupSet) SRem(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error) {
|
||||
var s = []interface{}{key}
|
||||
s = append(s, member)
|
||||
s = append(s, members...)
|
||||
v, err := r.redis.Do(ctx, "SRem", s...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// SMove moves member from the set at source to the set at destination.
|
||||
// This operation is atomic. In every given moment the element will appear to be a member of source or
|
||||
// destination for other clients.
|
||||
// If the source set does not exist or does not contain the specified element, no operation is performed and 0
|
||||
// is returned. Otherwise, the element is removed from the source set and added to the destination set.
|
||||
// When the specified element already exists in the destination set, it is only removed from the source set.
|
||||
//
|
||||
// An error is returned if source or destination does not hold a set value.
|
||||
//
|
||||
// It returns:
|
||||
// - 1 if the element is moved.
|
||||
// - 0 if the element is not a member of source and no operation was performed.
|
||||
//
|
||||
// https://redis.io/commands/smove/
|
||||
func (r GroupSet) SMove(ctx context.Context, source, destination string, member interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "SMove", source, destination, member)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// SCard returns the set cardinality (number of elements) of the set stored at key.
|
||||
//
|
||||
// It returns the cardinality (number of elements) of the set, or 0 if key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/scard/
|
||||
func (r GroupSet) SCard(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "SCard", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// SMembers returns all the members of the set value stored at key.
|
||||
// This has the same effect as running SINTER with one argument key.
|
||||
//
|
||||
// It returns all elements of the set.
|
||||
//
|
||||
// https://redis.io/commands/smembers/
|
||||
func (r GroupSet) SMembers(ctx context.Context, key string) ([]*gvar.Var, error) {
|
||||
v, err := r.redis.Do(ctx, "SMembers", key)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// SMIsMember returns whether each member is a member of the set stored at key.
|
||||
//
|
||||
// For every member, 1 is returned if the value is a member of the set, or 0 if the element is not a member of
|
||||
// the set or if key does not exist.
|
||||
//
|
||||
// It returns list representing the membership of the given elements, in the same order as they are requested.
|
||||
//
|
||||
// https://redis.io/commands/smismember/
|
||||
func (r GroupSet) SMIsMember(ctx context.Context, key, member interface{}, members ...interface{}) ([]int, error) {
|
||||
var s = []interface{}{key, member}
|
||||
s = append(s, members...)
|
||||
v, err := r.redis.Do(ctx, "SMIsMember", s...)
|
||||
return v.Ints(), err
|
||||
}
|
||||
|
||||
// SInter returns the members of the set resulting from the intersection of all the given sets.
|
||||
//
|
||||
// It returns list with members of the resulting set.
|
||||
//
|
||||
// https://redis.io/commands/sinter/
|
||||
func (r GroupSet) SInter(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error) {
|
||||
var s = []interface{}{key}
|
||||
s = append(s, gconv.Interfaces(keys)...)
|
||||
v, err := r.redis.Do(ctx, "SInter", s...)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// SInterStore is equal to SInter, but instead of returning the resulting set, it is stored in
|
||||
// destination.
|
||||
//
|
||||
// If destination already exists, it is overwritten.
|
||||
//
|
||||
// It returns the number of elements in the resulting set.
|
||||
//
|
||||
// https://redis.io/commands/sinterstore/
|
||||
func (r GroupSet) SInterStore(ctx context.Context, destination string, key string, keys ...string) (int64, error) {
|
||||
var s = []interface{}{destination, key}
|
||||
s = append(s, gconv.Interfaces(keys)...)
|
||||
v, err := r.redis.Do(ctx, "SInterStore", s...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// SUnion returns the members of the set resulting from the union of all the given sets.
|
||||
//
|
||||
// It returns list with members of the resulting set.
|
||||
//
|
||||
// https://redis.io/commands/sunion/
|
||||
func (r GroupSet) SUnion(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error) {
|
||||
var s = []interface{}{key}
|
||||
s = append(s, gconv.Interfaces(keys)...)
|
||||
v, err := r.redis.Do(ctx, "SUnion", s...)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// SUnionStore is equal to SUnion, but instead of returning the resulting set, it is stored in destination.
|
||||
//
|
||||
// If destination already exists, it is overwritten.
|
||||
//
|
||||
// It returns the number of elements in the resulting set.
|
||||
//
|
||||
// https://redis.io/commands/sunionstore/
|
||||
func (r GroupSet) SUnionStore(ctx context.Context, destination, key string, keys ...string) (int64, error) {
|
||||
var s = []interface{}{destination, key}
|
||||
s = append(s, gconv.Interfaces(keys)...)
|
||||
v, err := r.redis.Do(ctx, "SUnionStore", s...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// SDiff returns the members of the set resulting from the difference between the first set and all the
|
||||
// successive sets.
|
||||
//
|
||||
// It returns list with members of the resulting set.
|
||||
//
|
||||
// https://redis.io/commands/sdiff/
|
||||
func (r GroupSet) SDiff(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error) {
|
||||
var s = []interface{}{key}
|
||||
s = append(s, gconv.Interfaces(keys)...)
|
||||
v, err := r.redis.Do(ctx, "SDiff", s...)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// SDiffStore is equal to SDiff, but instead of returning the resulting set, it is stored in destination.
|
||||
//
|
||||
// If destination already exists, it is overwritten.
|
||||
//
|
||||
// It returns the number of elements in the resulting set.
|
||||
//
|
||||
// https://redis.io/commands/sdiffstore/
|
||||
func (r GroupSet) SDiffStore(ctx context.Context, destination string, key string, keys ...string) (int64, error) {
|
||||
var s = []interface{}{destination, key}
|
||||
s = append(s, gconv.Interfaces(keys)...)
|
||||
v, err := r.redis.Do(ctx, "SDiffStore", s...)
|
||||
return v.Int64(), err
|
||||
}
|
254
contrib/nosql/redis/redis_group_sorted_set.go
Normal file
254
contrib/nosql/redis/redis_group_sorted_set.go
Normal file
@ -0,0 +1,254 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
)
|
||||
|
||||
// GroupSortedSet provides sorted set functions for redis.
|
||||
type GroupSortedSet struct {
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// GroupSortedSet creates and returns GroupSortedSet.
|
||||
func (r *Redis) GroupSortedSet() gredis.IGroupSortedSet {
|
||||
return GroupSortedSet{
|
||||
redis: r,
|
||||
}
|
||||
}
|
||||
|
||||
// ZAdd adds all the specified members with the specified scores to the sorted set stored at key.
|
||||
// It is possible to specify multiple score / member pairs.
|
||||
// If a specified member is already a member of the sorted set, the score is updated and the element reinserted
|
||||
// at the right position to ensure the correct ordering.
|
||||
//
|
||||
// If key does not exist, a new sorted set with the specified members as sole members is created, like if the
|
||||
// sorted set was empty. If the key exists but does not hold a sorted set, an error is returned.
|
||||
//
|
||||
// The score values should be the string representation of a double precision floating point number. +inf and
|
||||
// -inf values are valid values as well.
|
||||
//
|
||||
// It returns:
|
||||
// - When used without optional arguments, the number of elements added to the sorted set (excluding score updates).
|
||||
// - If the CH option is specified, the number of elements that were changed (added or updated).
|
||||
//
|
||||
// If the INCR option is specified, the return value will be Bulk string reply:
|
||||
// - The new score of member (a double precision floating point number) represented as string, or nil if the operation
|
||||
// was aborted (when called with either the XX or the NX option).
|
||||
//
|
||||
// https://redis.io/commands/zadd/
|
||||
func (r GroupSortedSet) ZAdd(
|
||||
ctx context.Context, key string, option *gredis.ZAddOption, member gredis.ZAddMember, members ...gredis.ZAddMember,
|
||||
) (*gvar.Var, error) {
|
||||
s := mustMergeOptionToArgs(
|
||||
[]interface{}{key}, option,
|
||||
)
|
||||
s = append(s, member.Score, member.Member)
|
||||
for _, item := range members {
|
||||
s = append(s, item.Score, item.Member)
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "ZAdd", s...)
|
||||
return v, err
|
||||
}
|
||||
|
||||
// ZScore Returns the score of member in the sorted set at key.
|
||||
//
|
||||
// If member does not exist in the sorted set, or key does not exist, nil is returned.
|
||||
//
|
||||
// It returns the score of member (a double precision floating point number), represented as string.
|
||||
//
|
||||
// https://redis.io/commands/zscore/
|
||||
func (r GroupSortedSet) ZScore(ctx context.Context, key string, member interface{}) (float64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZScore", key, member)
|
||||
return v.Float64(), err
|
||||
}
|
||||
|
||||
// ZIncrBy increments the score of member in the sorted set stored at key by increment.
|
||||
// If member does not exist in the sorted set, it is added with increment as its score (as if its previous score
|
||||
// was 0.0). If key does not exist, a new sorted set with the specified member as its sole member is created.
|
||||
//
|
||||
// An error is returned when key exists but does not hold a sorted set.
|
||||
//
|
||||
// The score value should be the string representation of a numeric value, and accepts double precision floating
|
||||
// point numbers. It is possible to provide a negative value to decrement the score.
|
||||
//
|
||||
// It returns the new score of member (a double precision floating point number).
|
||||
//
|
||||
// https://redis.io/commands/zincrby/
|
||||
func (r GroupSortedSet) ZIncrBy(ctx context.Context, key string, increment float64, member interface{}) (float64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZIncrBy", key, increment, member)
|
||||
return v.Float64(), err
|
||||
}
|
||||
|
||||
// ZCard returns the sorted set cardinality (number of elements) of the sorted set stored at key.
|
||||
//
|
||||
// It returns the cardinality (number of elements) of the sorted set, or 0 if key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/zcard/
|
||||
func (r GroupSortedSet) ZCard(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZCard", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ZCount returns the number of elements in the sorted set at key with a score between min and max.
|
||||
//
|
||||
// The min and max arguments have the same semantic as described for ZRangeByScore.
|
||||
//
|
||||
// Note: the command has a complexity of just O(log(N)) because it uses elements ranks (see ZRANK) to get an
|
||||
// idea of the range. Because of this there is no need to do a work proportional to the size of the range.
|
||||
//
|
||||
// It returns the number of elements in the specified score range.
|
||||
//
|
||||
// https://redis.io/commands/zcount/
|
||||
func (r GroupSortedSet) ZCount(ctx context.Context, key string, min, max string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZCount", key, min, max)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ZRange return the specified range of elements in the sorted set stored at <key>.
|
||||
//
|
||||
// ZRange can perform different types of range queries: by index (rank), by the score, or by lexicographical
|
||||
// order.
|
||||
//
|
||||
// https://redis.io/commands/zrange/
|
||||
func (r GroupSortedSet) ZRange(ctx context.Context, key string, start, stop int64, option ...gredis.ZRangeOption) ([]*gvar.Var, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "ZRange", mustMergeOptionToArgs(
|
||||
[]interface{}{key, start, stop}, usedOption,
|
||||
)...)
|
||||
return v.Vars(), err
|
||||
}
|
||||
|
||||
// ZRevRange returns the specified range of elements in the sorted set stored at key.
|
||||
// The elements are considered to be ordered from the highest to the lowest score.
|
||||
// Descending lexicographical order is used for elements with equal score.
|
||||
//
|
||||
// Apart from the reversed ordering, ZRevRange is similar to ZRange.
|
||||
//
|
||||
// It returns list of elements in the specified range (optionally with their scores).
|
||||
//
|
||||
// https://redis.io/commands/zrevrange/
|
||||
func (r GroupSortedSet) ZRevRange(ctx context.Context, key string, start, stop int64, option ...gredis.ZRevRangeOption) (*gvar.Var, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
return r.redis.Do(ctx, "ZRevRange", mustMergeOptionToArgs(
|
||||
[]interface{}{key, start, stop}, usedOption,
|
||||
)...)
|
||||
}
|
||||
|
||||
// ZRank returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.
|
||||
// The rank (or index) is 0-based, which means that the member with the lowest score has rank 0.
|
||||
//
|
||||
// Use ZRevRank to get the rank of an element with the scores ordered from high to low.
|
||||
//
|
||||
// It returns:
|
||||
// - If member exists in the sorted set, Integer reply: the rank of member.
|
||||
// - If member does not exist in the sorted set or key does not exist, Bulk string reply: nil.
|
||||
//
|
||||
// https://redis.io/commands/zrank/
|
||||
func (r GroupSortedSet) ZRank(ctx context.Context, key string, member interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZRank", key, member)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ZRevRank returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.
|
||||
// The rank (or index) is 0-based, which means that the member with the highest score has rank 0.
|
||||
//
|
||||
// Use ZRank to get the rank of an element with the scores ordered from low to high.
|
||||
//
|
||||
// It returns:
|
||||
// - If member exists in the sorted set, Integer reply: the rank of member.
|
||||
// - If member does not exist in the sorted set or key does not exist, Bulk string reply: nil.
|
||||
//
|
||||
// https://redis.io/commands/zrevrank/
|
||||
func (r GroupSortedSet) ZRevRank(ctx context.Context, key string, member interface{}) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZRevRank", key, member)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ZRem remove the specified members from the sorted set stored at key.
|
||||
// Non-existing members are ignored.
|
||||
//
|
||||
// An error is returned when key exists and does not hold a sorted set.
|
||||
//
|
||||
// It returns the number of members removed from the sorted set, not including non existing members.
|
||||
//
|
||||
// https://redis.io/commands/zrem/
|
||||
func (r GroupSortedSet) ZRem(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error) {
|
||||
var s = []interface{}{key}
|
||||
s = append(s, member)
|
||||
s = append(s, members...)
|
||||
v, err := r.redis.Do(ctx, "ZRem", s...)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ZRemRangeByRank removes all elements in the sorted set stored at key with rank between start and stop.
|
||||
// Both start and stop are 0 -based indexes with 0 being the element with the lowest score.
|
||||
//
|
||||
// These indexes can be negative numbers, where they indicate offsets starting at the element with the highest
|
||||
// score. For example: -1 is the element with the highest score, -2 the element with the second-highest score
|
||||
// and so forth.
|
||||
//
|
||||
// It returns the number of elements removed.
|
||||
//
|
||||
// https://redis.io/commands/zremrangebyrank/
|
||||
func (r GroupSortedSet) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZRemRangeByRank", key, start, stop)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ZRemRangeByScore removes all elements in the sorted set stored at key with a score between min and max
|
||||
// (inclusive).
|
||||
//
|
||||
// It returns the number of elements removed.
|
||||
//
|
||||
// https://redis.io/commands/zremrangebyscore/
|
||||
func (r GroupSortedSet) ZRemRangeByScore(ctx context.Context, key string, min, max string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZRemRangeByScore", key, min, max)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ZRemRangeByLex removes all elements in the sorted set stored at key between the
|
||||
// lexicographical range specified by min and max.
|
||||
//
|
||||
// The meaning of min and max are the same of the ZRangeByLex command.
|
||||
// Similarly, this command actually removes the same elements that ZRangeByLex would return if called with the
|
||||
// same min and max arguments.
|
||||
//
|
||||
// It returns the number of elements removed.
|
||||
//
|
||||
// https://redis.io/commands/zremrangebylex/
|
||||
func (r GroupSortedSet) ZRemRangeByLex(ctx context.Context, key string, min, max string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZRemRangeByLex", key, min, max)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// ZLexCount all the elements in a sorted set are inserted with the same score,
|
||||
// in order to force lexicographical ordering, this command returns the number of elements in the sorted
|
||||
// set at key with a value between min and max.
|
||||
//
|
||||
// The min and max arguments have the same meaning as described for ZRangeByLex.
|
||||
//
|
||||
// Note: the command has a complexity of just O(log(N)) because it uses elements ranks (see ZRank) to get an
|
||||
// idea of the range. Because of this there is no need to do a work proportional to the size of the range.
|
||||
//
|
||||
// It returns the number of elements in the specified score range.
|
||||
//
|
||||
// https://redis.io/commands/zlexcount/
|
||||
func (r GroupSortedSet) ZLexCount(ctx context.Context, key, min, max string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "ZLexCount", key, min, max)
|
||||
return v.Int64(), err
|
||||
}
|
253
contrib/nosql/redis/redis_group_string.go
Normal file
253
contrib/nosql/redis/redis_group_string.go
Normal file
@ -0,0 +1,253 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
// GroupString is the function group manager for string operations.
|
||||
type GroupString struct {
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// GroupString is the redis group object for string operations.
|
||||
func (r *Redis) GroupString() gredis.IGroupString {
|
||||
return GroupString{
|
||||
redis: r,
|
||||
}
|
||||
}
|
||||
|
||||
// Set key to hold the string value. If key already holds a value, it is overwritten,
|
||||
// regardless of its type.
|
||||
// Any previous time to live associated with the key is discarded on successful SET operation.
|
||||
//
|
||||
// https://redis.io/commands/set/
|
||||
func (r GroupString) Set(ctx context.Context, key string, value interface{}, option ...gredis.SetOption) (*gvar.Var, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
return r.redis.Do(ctx, "Set", mustMergeOptionToArgs(
|
||||
[]interface{}{key, value}, usedOption,
|
||||
)...)
|
||||
}
|
||||
|
||||
// SetNX sets key to hold string value if key does not exist.
|
||||
// In that case, it is equal to SET.
|
||||
// When key already holds a value, no operation is performed.
|
||||
// SetNX is short for "SET if Not exists".
|
||||
//
|
||||
// It returns:
|
||||
// true: if the all the keys were set.
|
||||
// false: if no key was set (at least one key already existed).
|
||||
//
|
||||
// https://redis.io/commands/setnx/
|
||||
func (r GroupString) SetNX(ctx context.Context, key string, value interface{}) (bool, error) {
|
||||
v, err := r.redis.Do(ctx, "SetNX", key, value)
|
||||
return v.Bool(), err
|
||||
}
|
||||
|
||||
// SetEX sets key to hold the string value and set key to timeout after a given number of seconds.
|
||||
// This command is equivalent to executing the following commands:
|
||||
//
|
||||
// SET myKey value
|
||||
// EXPIRE myKey seconds
|
||||
//
|
||||
// SetEX is atomic, and can be reproduced by using the previous two commands inside an MULTI / EXEC block.
|
||||
// It is provided as a faster alternative to the given sequence of operations, because this operation is very
|
||||
// common when Redis is used as a cache.
|
||||
//
|
||||
// An error is returned when seconds invalid.
|
||||
//
|
||||
// https://redis.io/commands/setex/
|
||||
func (r GroupString) SetEX(ctx context.Context, key string, value interface{}, ttlInSeconds int64) error {
|
||||
_, err := r.redis.Do(ctx, "SetEX", key, ttlInSeconds, value)
|
||||
return err
|
||||
}
|
||||
|
||||
// Get the value of key. If the key does not exist the special value nil is returned.
|
||||
// An error is returned if the value stored at key is not a string, because GET only handles string values.
|
||||
//
|
||||
// https://redis.io/commands/get/
|
||||
func (r GroupString) Get(ctx context.Context, key string) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "Get", key)
|
||||
}
|
||||
|
||||
// GetDel gets the value of key and delete the key.
|
||||
// This command is similar to GET, except for the fact that it also deletes the key on success
|
||||
// (if and only if the key's value type is a string).
|
||||
//
|
||||
// https://redis.io/commands/getdel/
|
||||
func (r GroupString) GetDel(ctx context.Context, key string) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "GetDel", key)
|
||||
}
|
||||
|
||||
// GetEX is similar to GET, but is a write command with additional options.
|
||||
//
|
||||
// https://redis.io/commands/getex/
|
||||
func (r GroupString) GetEX(ctx context.Context, key string, option ...gredis.GetEXOption) (*gvar.Var, error) {
|
||||
var usedOption interface{}
|
||||
if len(option) > 0 {
|
||||
usedOption = option[0]
|
||||
}
|
||||
return r.redis.Do(ctx, "GetEX", mustMergeOptionToArgs(
|
||||
[]interface{}{key}, usedOption,
|
||||
)...)
|
||||
}
|
||||
|
||||
// GetSet atomically sets key to value and returns the old value stored at key.
|
||||
// Returns an error when key exists but does not hold a string value. Any previous time to live associated with
|
||||
// the key is discarded on successful SET operation.
|
||||
//
|
||||
// https://redis.io/commands/getset/
|
||||
func (r GroupString) GetSet(ctx context.Context, key string, value interface{}) (*gvar.Var, error) {
|
||||
return r.redis.Do(ctx, "GetSet", key, value)
|
||||
}
|
||||
|
||||
// StrLen returns the length of the string value stored at key.
|
||||
// An error is returned when key holds a non-string value.
|
||||
//
|
||||
// It returns the length of the string at key, or 0 when key does not exist.
|
||||
//
|
||||
// https://redis.io/commands/strlen/
|
||||
func (r GroupString) StrLen(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "StrLen", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// Append appends the value at the end of the string, if key already exists and is a string.
|
||||
// If key does not exist it is created and set as an empty string,
|
||||
// so APPEND will be similar to SET in this special case.
|
||||
//
|
||||
// https://redis.io/commands/append/
|
||||
func (r GroupString) Append(ctx context.Context, key string, value string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Append", key, value)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// SetRange overwrites part of the string stored at key, starting at the specified offset, for the entire length
|
||||
// of value. If the offset is larger than the current length of the string at key, the string is padded with
|
||||
// zero-bytes to make offset fit. Non-existing keys are considered as empty strings, so this command will
|
||||
// make sure it holds a string large enough to be able to set value at offset.
|
||||
//
|
||||
// It returns the length of the string after it was modified by the command.
|
||||
//
|
||||
// https://redis.io/commands/setrange/
|
||||
func (r GroupString) SetRange(ctx context.Context, key string, offset int64, value string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "SetRange", key, offset, value)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// GetRange returns the substring of the string value stored at key,
|
||||
// determined by the offsets start and end (both are inclusive). Negative offsets can be used in order to provide
|
||||
// an offset starting from the end of the string. So -1 means the last character, -2 the penultimate and so forth.
|
||||
//
|
||||
// The function handles out of range requests by limiting the resulting range to the actual length of the string.
|
||||
//
|
||||
// https://redis.io/commands/getrange/
|
||||
func (r GroupString) GetRange(ctx context.Context, key string, start, end int64) (string, error) {
|
||||
v, err := r.redis.Do(ctx, "GetRange", key, start, end)
|
||||
return v.String(), err
|
||||
}
|
||||
|
||||
// Incr increments the number stored at key by one.
|
||||
// If the key does not exist, it is set to 0 before performing the operation.
|
||||
// An error is returned if the key contains a value of the wrong type or contains a string that can not be
|
||||
// represented as integer. This operation is limited to 64 bits signed integers.
|
||||
//
|
||||
// https://redis.io/commands/incr/
|
||||
func (r GroupString) Incr(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Incr", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// IncrBy increments the number stored at key by increment. If the key does not exist, it is set to 0 before
|
||||
// performing the operation.
|
||||
//
|
||||
// An error is returned if the key contains a value of the wrong type or contains a
|
||||
// string that can not be represented as integer. This operation is limited to 64 bits signed integers.
|
||||
//
|
||||
// https://redis.io/commands/incrby/
|
||||
func (r GroupString) IncrBy(ctx context.Context, key string, increment int64) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "IncrBy", key, increment)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// IncrByFloat increments the string representing a floating point number stored at key by the specified increment.
|
||||
//
|
||||
// https://redis.io/commands/incrbyfloat/
|
||||
func (r GroupString) IncrByFloat(ctx context.Context, key string, increment float64) (float64, error) {
|
||||
v, err := r.redis.Do(ctx, "IncrByFloat", key, increment)
|
||||
return v.Float64(), err
|
||||
}
|
||||
|
||||
// Decr decrements the number stored at key by one.
|
||||
//
|
||||
// https://redis.io/commands/decr/
|
||||
func (r GroupString) Decr(ctx context.Context, key string) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "Decr", key)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// DecrBy decrements the number stored at key by decrement.
|
||||
//
|
||||
// https://redis.io/commands/decrby/
|
||||
func (r GroupString) DecrBy(ctx context.Context, key string, decrement int64) (int64, error) {
|
||||
v, err := r.redis.Do(ctx, "DecrBy", key, decrement)
|
||||
return v.Int64(), err
|
||||
}
|
||||
|
||||
// MSet sets the given keys to their respective values.
|
||||
// MSet replaces existing values with new values, just as regular SET.
|
||||
// See MSetNX if you don't want to overwrite existing values.
|
||||
//
|
||||
// MSet is atomic, so all given keys are set at once. It is not possible for clients to see that some keys
|
||||
// were updated while others are unchanged.
|
||||
//
|
||||
// https://redis.io/commands/mset/
|
||||
func (r GroupString) MSet(ctx context.Context, keyValueMap map[string]interface{}) error {
|
||||
var args []interface{}
|
||||
for k, v := range keyValueMap {
|
||||
args = append(args, k, v)
|
||||
}
|
||||
_, err := r.redis.Do(ctx, "MSet", args...)
|
||||
return err
|
||||
}
|
||||
|
||||
// MSetNX sets the given keys to their respective values.
|
||||
//
|
||||
// It returns:
|
||||
// true: if the all the keys were set.
|
||||
// false: if no key was set (at least one key already existed).
|
||||
func (r GroupString) MSetNX(ctx context.Context, keyValueMap map[string]interface{}) (bool, error) {
|
||||
var args []interface{}
|
||||
for k, v := range keyValueMap {
|
||||
args = append(args, k, v)
|
||||
}
|
||||
v, err := r.redis.Do(ctx, "MSetNX", args...)
|
||||
return v.Bool(), err
|
||||
}
|
||||
|
||||
// MGet returns the values of all specified keys.
|
||||
//
|
||||
// https://redis.io/commands/mget/
|
||||
func (r GroupString) MGet(ctx context.Context, keys ...string) (map[string]*gvar.Var, error) {
|
||||
var result = make(map[string]*gvar.Var)
|
||||
v, err := r.redis.Do(ctx, "MGet", gconv.Interfaces(keys)...)
|
||||
if err == nil {
|
||||
values := v.Vars()
|
||||
for i, key := range keys {
|
||||
result[key] = values[i]
|
||||
}
|
||||
}
|
||||
return result, err
|
||||
}
|
@ -4,12 +4,18 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
package redis_test
|
||||
|
||||
// Message received as result of a PUBLISH command issued by another client.
|
||||
type Message struct {
|
||||
Channel string
|
||||
Pattern string
|
||||
Payload string
|
||||
PayloadSlice []string
|
||||
}
|
||||
import (
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
)
|
||||
|
||||
var (
|
||||
ctx = gctx.GetInitCtx()
|
||||
config = &gredis.Config{
|
||||
Address: `:6379`,
|
||||
Db: 1,
|
||||
}
|
||||
redis, _ = gredis.New(config)
|
||||
)
|
@ -4,7 +4,7 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis_test
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"context"
|
37
contrib/nosql/redis/redis_z_func_test.go
Normal file
37
contrib/nosql/redis/redis_z_func_test.go
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
func Test_mustMergeOptionToArgs(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var args []interface{}
|
||||
newArgs := mustMergeOptionToArgs(args, gredis.SetOption{
|
||||
NX: true,
|
||||
Get: true,
|
||||
})
|
||||
t.Assert(newArgs, []interface{}{"NX", "Get"})
|
||||
})
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var args []interface{}
|
||||
newArgs := mustMergeOptionToArgs(args, gredis.SetOption{
|
||||
NX: true,
|
||||
Get: true,
|
||||
TTLOption: gredis.TTLOption{
|
||||
EX: gconv.PtrInt64(60),
|
||||
},
|
||||
})
|
||||
t.Assert(newArgs, []interface{}{"EX", 60, "NX", "Get"})
|
||||
})
|
||||
}
|
528
contrib/nosql/redis/redis_z_group_generic_test.go
Normal file
528
contrib/nosql/redis/redis_z_group_generic_test.go
Normal file
@ -0,0 +1,528 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/guid"
|
||||
)
|
||||
|
||||
var (
|
||||
TestKey = "mykey"
|
||||
TestValue = "hello"
|
||||
)
|
||||
|
||||
func Test_GroupGeneric_Copy(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
v1 = guid.S()
|
||||
k2 = guid.S()
|
||||
result int64
|
||||
err error
|
||||
)
|
||||
_, err = redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
result, err = redis.GroupGeneric().Copy(ctx, k1, k2)
|
||||
t.AssertEQ(result, int64(1))
|
||||
t.AssertNil(err)
|
||||
v2, err := redis.GroupString().Get(ctx, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v2.String(), v1)
|
||||
})
|
||||
// With Option.
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
v1 = guid.S()
|
||||
k2 = guid.S()
|
||||
result int64
|
||||
err error
|
||||
)
|
||||
_, err = redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
result, err = redis.GroupGeneric().Copy(ctx, k1, k2, gredis.CopyOption{
|
||||
DB: 1,
|
||||
REPLACE: true,
|
||||
})
|
||||
t.AssertEQ(result, int64(1))
|
||||
t.AssertNil(err)
|
||||
v2, err := redis.GroupString().Get(ctx, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v2.String(), v1)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Exists(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
k2 = "k2"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().Exists(ctx, k1)
|
||||
t.AssertEQ(result, int64(1))
|
||||
t.AssertNil(err)
|
||||
result, err = redis.GroupGeneric().Exists(ctx, "nosuchkey")
|
||||
t.AssertEQ(result, int64(0))
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, k2, v2)
|
||||
t.AssertNil(err)
|
||||
result, err = redis.GroupGeneric().Exists(ctx, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(result, int64(2))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Type(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
_, err := redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupList().LPush(ctx, "k2", "v2")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupSet().SAdd(ctx, "k3", "v3")
|
||||
t.AssertNil(err)
|
||||
|
||||
t1, err := redis.GroupGeneric().Type(ctx, "k1")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(t1, "string")
|
||||
t2, err := redis.GroupGeneric().Type(ctx, "k2")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(t2, "list")
|
||||
t3, err := redis.GroupGeneric().Type(ctx, "k3")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(t3, "set")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Unlink(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
_, err := redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, "k2", "v2")
|
||||
t.AssertNil(err)
|
||||
|
||||
result, err := redis.GroupGeneric().Unlink(ctx, "k1", "k2", "k3")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(2))
|
||||
v1, err := redis.GroupString().Get(ctx, "k1")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(v1.String(), "")
|
||||
v2, err := redis.GroupString().Get(ctx, "k2")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(v2.String(), "")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Rename(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
_, err := redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
err = redis.GroupGeneric().Rename(ctx, "k1", "k2")
|
||||
t.AssertNil(err)
|
||||
v1, err := redis.GroupString().Get(ctx, "k1")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(v1.String(), "")
|
||||
v2, err := redis.GroupString().Get(ctx, "k2")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(v2.String(), "v1")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_RenameNX(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
_, err := redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, "k2", "v2")
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().RenameNX(ctx, "k1", "k2")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(0))
|
||||
result, err = redis.GroupGeneric().RenameNX(ctx, "k1", "k3")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
v2, err := redis.GroupString().Get(ctx, "k2")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(v2.String(), "v2")
|
||||
v3, err := redis.GroupString().Get(ctx, "k3")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(v3.String(), "v1")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Move(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
_, err := redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().Move(ctx, "k1", 0)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Del(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
_, err := redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, "k2", "v2")
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().Del(ctx, "k1", "k2", "k3")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(2))
|
||||
v1, err := redis.GroupString().Get(ctx, "k1")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(v1.String(), "")
|
||||
v2, err := redis.GroupString().Get(ctx, "k2")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(v2.String(), "")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_RandomKey(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
key, err := redis.GroupGeneric().RandomKey(ctx)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(key, "")
|
||||
|
||||
_, err = redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, "k2", "v2")
|
||||
t.AssertNil(err)
|
||||
|
||||
key, err = redis.GroupGeneric().RandomKey(ctx)
|
||||
t.AssertNil(err)
|
||||
t.AssertIN(key, []string{"k1", "k2"})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_DBSize(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
dbSize, err := redis.GroupGeneric().DBSize(ctx)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(dbSize, int64(0))
|
||||
|
||||
_, err = redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, "k2", "v2")
|
||||
t.AssertNil(err)
|
||||
|
||||
dbSize, err = redis.GroupGeneric().DBSize(ctx)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(dbSize, int64(2))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Keys(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
err := redis.GroupString().MSet(ctx, map[string]interface{}{
|
||||
"firstname": "Jack",
|
||||
"lastname": "Stuntman",
|
||||
"age": 35,
|
||||
})
|
||||
t.AssertNil(err)
|
||||
keys, err := redis.GroupGeneric().Keys(ctx, "*name*")
|
||||
t.AssertNil(err)
|
||||
t.AssertIN(keys, []string{"lastname", "firstname"})
|
||||
keys, err = redis.GroupGeneric().Keys(ctx, "a??")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(keys, []string{"age"})
|
||||
keys, err = redis.GroupGeneric().Keys(ctx, "*")
|
||||
t.AssertNil(err)
|
||||
t.AssertIN(keys, []string{"lastname", "firstname", "age"})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_FlushDB(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, "k2", "v2")
|
||||
t.AssertNil(err)
|
||||
|
||||
dbSize, err := redis.GroupGeneric().DBSize(ctx)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(dbSize, int64(2))
|
||||
|
||||
err = redis.GroupGeneric().FlushDB(ctx)
|
||||
t.AssertNil(err)
|
||||
|
||||
dbSize, err = redis.GroupGeneric().DBSize(ctx)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(dbSize, int64(0))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_FlushAll(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, "k1", "v1")
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, "k2", "v2")
|
||||
t.AssertNil(err)
|
||||
|
||||
dbSize, err := redis.GroupGeneric().DBSize(ctx)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(dbSize, int64(2))
|
||||
|
||||
err = redis.GroupGeneric().FlushAll(ctx)
|
||||
t.AssertNil(err)
|
||||
|
||||
dbSize, err = redis.GroupGeneric().DBSize(ctx)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(dbSize, int64(0))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Expire(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().Expire(ctx, TestKey, 1)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
ttl, err := redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(ttl, int64(1))
|
||||
})
|
||||
// With Option.
|
||||
// Starting with Redis version 7.0.0: Added options: NX, XX, GT and LT.
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
ttl, err := redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(ttl, int64(-1))
|
||||
result, err := redis.GroupGeneric().Expire(ctx, TestKey, 1, gredis.ExpireOption{XX: true})
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(0))
|
||||
ttl, err = redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(ttl, int64(-1))
|
||||
result, err = redis.GroupGeneric().Expire(ctx, TestKey, 1, gredis.ExpireOption{NX: true})
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
ttl, err = redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(ttl, int64(1))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_ExpireAt(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().Exists(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
result, err = redis.GroupGeneric().ExpireAt(ctx, TestKey, time.Now().Add(time.Millisecond*100))
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
result, err = redis.GroupGeneric().Exists(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(0))
|
||||
})
|
||||
// With Option.
|
||||
// Starting with Redis version 7.0.0: Added options: NX, XX, GT and LT.
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
ttl, err := redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(ttl, int64(-1))
|
||||
result, err := redis.GroupGeneric().ExpireAt(ctx, TestKey, time.Now().Add(time.Millisecond*100), gredis.ExpireOption{XX: true})
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(0))
|
||||
result, err = redis.GroupGeneric().ExpireAt(ctx, TestKey, time.Now().Add(time.Minute), gredis.ExpireOption{NX: true})
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
ttl, err = redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertGT(ttl, int64(0))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_ExpireTime(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
expireTime := time.Now().Add(time.Minute)
|
||||
result, err := redis.GroupGeneric().ExpireAt(ctx, TestKey, expireTime)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
resultTime, err := redis.GroupGeneric().ExpireTime(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(resultTime.Int64(), expireTime.Unix())
|
||||
|
||||
_, err = redis.GroupString().Set(ctx, "noExpireKey", TestValue)
|
||||
t.AssertNil(err)
|
||||
resultTime, err = redis.GroupGeneric().ExpireTime(ctx, "noExpireKey")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(resultTime.Int64(), int64(-1))
|
||||
|
||||
resultTime, err = redis.GroupGeneric().ExpireTime(ctx, "noExistKey")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(resultTime.Int64(), int64(-2))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_TTL(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().Expire(ctx, TestKey, 10)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
result, err = redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(10))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_Persist(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().Expire(ctx, TestKey, 10)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
result, err = redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(10))
|
||||
result, err = redis.GroupGeneric().Persist(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
result, err = redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(-1))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_PExpire(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().PExpire(ctx, TestKey, 2500)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
result, err = redis.GroupGeneric().PTTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertLE(result, int64(2500))
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().PExpire(ctx, TestKey, 2500, gredis.ExpireOption{
|
||||
NX: true,
|
||||
})
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
|
||||
result, err = redis.GroupGeneric().PExpire(ctx, TestKey, 2500, gredis.ExpireOption{
|
||||
NX: true,
|
||||
})
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(0))
|
||||
|
||||
result, err = redis.GroupGeneric().PTTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertLE(result, int64(2500))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_PExpireAt(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().PExpireAt(ctx, TestKey, time.Now().Add(-time.Hour))
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
result, err = redis.GroupGeneric().TTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(-2))
|
||||
result, err = redis.GroupGeneric().PTTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(-2))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_PExpireTime(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
expireTime := time.Now().Add(time.Hour)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().PExpireAt(ctx, TestKey, expireTime)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
resultTime, err := redis.GroupGeneric().PExpireTime(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(resultTime.Int64(), gtime.NewFromTime(expireTime).TimestampMilli())
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupGeneric_PTTL(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
_, err := redis.GroupString().Set(ctx, TestKey, TestValue)
|
||||
t.AssertNil(err)
|
||||
result, err := redis.GroupGeneric().Expire(ctx, TestKey, 1)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(result, int64(1))
|
||||
result, err = redis.GroupGeneric().PTTL(ctx, TestKey)
|
||||
t.AssertNil(err)
|
||||
t.AssertLE(result, int64(1000))
|
||||
})
|
||||
}
|
334
contrib/nosql/redis/redis_z_group_hash_test.go
Normal file
334
contrib/nosql/redis/redis_z_group_hash_test.go
Normal file
@ -0,0 +1,334 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_GroupHash_HSet(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
field1 = "field1"
|
||||
field1Value = "Hello"
|
||||
fields = map[string]interface{}{
|
||||
field1: field1Value,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HGet(ctx, key, field1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), field1Value)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HSetNX(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
field1 = "field1"
|
||||
field1Value = "Hello"
|
||||
key = "myhash"
|
||||
)
|
||||
r1, err := redis.HSetNX(ctx, key, field1, field1Value)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, 1)
|
||||
|
||||
r2, err := redis.HSetNX(ctx, key, field1, "World")
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, 0)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HStrLen(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
field1 = "field1"
|
||||
field1Value = "Hello"
|
||||
field2 = "field2"
|
||||
field2Value = "Hello World"
|
||||
fields = map[string]interface{}{
|
||||
field1: field1Value,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
fieldValueLen, err := redis.HStrLen(ctx, key, field1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(5, fieldValueLen)
|
||||
|
||||
fields[field2] = field2Value
|
||||
_, err = redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
fieldValueLen, err = redis.HStrLen(ctx, key, field2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(11, fieldValueLen)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HExists(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
field1 = "field1"
|
||||
field1Value = "Hello"
|
||||
fields = map[string]interface{}{
|
||||
field1: field1Value,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HExists(ctx, key, field1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(1, r1)
|
||||
|
||||
r2, err := redis.HExists(ctx, key, "name")
|
||||
t.AssertNil(err)
|
||||
t.Assert(0, r2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HDel(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
k2 = "k2"
|
||||
v2 = "v2"
|
||||
k3 = "k3"
|
||||
v3 = "v3"
|
||||
fields = map[string]interface{}{
|
||||
k1: v1,
|
||||
k2: v2,
|
||||
k3: v3,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HDel(ctx, key, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(1, r1)
|
||||
|
||||
r2, err := redis.HDel(ctx, key, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(0, r2)
|
||||
|
||||
r3, err := redis.HDel(ctx, key, k2, k3)
|
||||
t.AssertNil(err)
|
||||
t.Assert(2, r3)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HLen(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
field1 = "field1"
|
||||
field1Value = "Hello"
|
||||
fields = map[string]interface{}{
|
||||
field1: field1Value,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
fieldLen, err := redis.HLen(ctx, key)
|
||||
t.AssertNil(err)
|
||||
t.Assert(1, fieldLen)
|
||||
|
||||
fields = map[string]interface{}{
|
||||
"k1": "v1",
|
||||
"k2": "v2",
|
||||
}
|
||||
fieldLen, err = redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
t.Assert(2, fieldLen)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HIncrBy(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
field1 = "field1"
|
||||
field1Value = 1
|
||||
fields = map[string]interface{}{
|
||||
field1: field1Value,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HIncrBy(ctx, key, field1, 2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(3, r1)
|
||||
|
||||
r2, err := redis.HGet(ctx, key, field1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(3, r2.Int64())
|
||||
|
||||
r3, err := redis.HIncrBy(ctx, key, field1, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(2, r3)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HIncrByFloat(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
field1 = "field1"
|
||||
field1Value = 10.50
|
||||
fields = map[string]interface{}{
|
||||
field1: field1Value,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HIncrByFloat(ctx, key, field1, 0.1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(10.60, r1)
|
||||
|
||||
r2, err := redis.HGet(ctx, key, field1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(10.60, r2.Float64())
|
||||
|
||||
r3, err := redis.HIncrByFloat(ctx, key, field1, -5)
|
||||
t.AssertNil(err)
|
||||
t.Assert(5.60, r3)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HMSet(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
k2 = "k2"
|
||||
v2 = "v2"
|
||||
fields = map[string]interface{}{
|
||||
k1: v1,
|
||||
k2: v2,
|
||||
}
|
||||
)
|
||||
err := redis.HMSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HGet(ctx, key, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
|
||||
r2, err := redis.HGet(ctx, key, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), v2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HMGet(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
k2 = "k2"
|
||||
v2 = "v2"
|
||||
fields = map[string]interface{}{
|
||||
k1: v1,
|
||||
k2: v2,
|
||||
}
|
||||
)
|
||||
err := redis.HMSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HMGet(ctx, key, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v1, v2})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HKeys(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
fields = map[string]interface{}{
|
||||
k1: v1,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HKeys(ctx, key)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{k1})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HVals(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
fields = map[string]interface{}{
|
||||
k1: v1,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HVals(ctx, key)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v1})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupHash_HGetAll(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
var (
|
||||
key = "myhash"
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
k2 = "k2"
|
||||
v2 = "v2"
|
||||
fields = map[string]interface{}{
|
||||
k1: v1,
|
||||
k2: v2,
|
||||
}
|
||||
)
|
||||
_, err := redis.HSet(ctx, key, fields)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.HGetAll(ctx, key)
|
||||
t.Assert(r1, fields)
|
||||
})
|
||||
}
|
695
contrib/nosql/redis/redis_z_group_list_test.go
Normal file
695
contrib/nosql/redis/redis_z_group_list_test.go
Normal file
@ -0,0 +1,695 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
)
|
||||
|
||||
func Test_GroupList_LPush(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupList().LPush(ctx, k1, v2)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v2, v1})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v2, v1})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_LPushX(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().LPushX(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupList().LPush(ctx, k1, v2)
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupList().LPushX(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v1, v2})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_RPush(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().RPush(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupList().RPush(ctx, k1, v2)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v1, v2})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().RPush(ctx, k1, v1, v2)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v1, v2})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_RPushX(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().RPushX(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupList().RPush(ctx, k1, v2)
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupList().RPushX(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v2, v1})
|
||||
})
|
||||
}
|
||||
|
||||
func InfoServerMap() map[string]string {
|
||||
v, err := redis.Do(ctx, "INFO", "server")
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
server := make(map[string]string)
|
||||
list := strings.Split(v.String(), "\r\n")
|
||||
for _, v := range list {
|
||||
if strings.Contains(v, ":") {
|
||||
kv := strings.Split(v, ":")
|
||||
if len(kv) == 2 {
|
||||
server[kv[0]] = kv[1]
|
||||
}
|
||||
}
|
||||
}
|
||||
return server
|
||||
}
|
||||
|
||||
func GetRedisVersion() string {
|
||||
svr := InfoServerMap()
|
||||
if svr != nil {
|
||||
return svr["redis_version"]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func Test_GroupList_LPop(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LPop(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, v3)
|
||||
|
||||
r3, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r3, []string{v2, v1})
|
||||
})
|
||||
|
||||
// redis version check
|
||||
if gstr.CompareVersion(GetRedisVersion(), "6.2.0") > 0 {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LPop(ctx, k1, 2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v3, v2})
|
||||
|
||||
r3, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r3, []string{v1})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_GroupList_RPop(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().RPop(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, v1)
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v3, v2})
|
||||
})
|
||||
|
||||
// redis version check
|
||||
if gstr.CompareVersion(GetRedisVersion(), "6.2.0") > 0 {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().RPop(ctx, k1, 2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v1, v2})
|
||||
|
||||
r3, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r3, []string{v3})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_GroupList_LRem(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRem(ctx, k1, 1, v1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, int64(1))
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v2, v1})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRem(ctx, k1, -1, v1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, int64(1))
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v1, v2})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRem(ctx, k1, 0, v1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, int64(2))
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v2})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_LLen(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LLen(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, int64(3))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_LIndex(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LIndex(ctx, k1, 1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, v2)
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LIndex(ctx, k1, -2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, v2)
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LIndex(ctx, k1, 3)
|
||||
t.AssertNil(err)
|
||||
t.AssertNil(r1)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_LInsert(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LInsert(ctx, k1, gredis.LInsertBefore, v2, v1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, int64(4))
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v3, v1, v2, v1})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LInsert(ctx, k1, gredis.LInsertAfter, v2, v1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, int64(4))
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v3, v2, v1, v1})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_LSet(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LSet(ctx, k1, 1, v1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, "OK")
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v3, v1, v1})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LSet(ctx, k1, -2, v1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, "OK")
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v3, v1, v1})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_LRange(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, 1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v3, v2})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v3, v2, v1})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 0, 100)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v3, v2, v1})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, 10, 100)
|
||||
t.AssertNil(err)
|
||||
t.AssertNil(r1)
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().LRange(ctx, k1, -3, -2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{v3, v2})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_LTrim(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
v4 = "v4"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3, v4)
|
||||
t.AssertNil(err)
|
||||
|
||||
err = redis.GroupList().LTrim(ctx, k1, 1, 2)
|
||||
t.AssertNil(err)
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v3, v2})
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
v4 = "v4"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3, v4)
|
||||
t.AssertNil(err)
|
||||
|
||||
err = redis.GroupList().LTrim(ctx, k1, 5, 10)
|
||||
t.AssertNil(err)
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.AssertNil(r2)
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
v4 = "v4"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3, v4)
|
||||
t.AssertNil(err)
|
||||
|
||||
err = redis.GroupList().LTrim(ctx, k1, -3, -2)
|
||||
t.AssertNil(err)
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v3, v2})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_BLPop(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
k2 = "k2"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
v4 = "v4"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3, v4)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().BLPop(ctx, 1, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{k1, v4})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_BRPop(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
k2 = "k2"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
v4 = "v4"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3, v4)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().BRPop(ctx, 1, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, []string{k1, v1})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_RPopLPush(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
k2 = "k2"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
v4 = "v4"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3, v4)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().RPopLPush(ctx, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, v1)
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v4, v3, v2})
|
||||
|
||||
r3, err := redis.GroupList().LRange(ctx, k2, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r3, []string{v1})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupList_BRPopLPush(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
k2 = "k2"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
v3 = "v3"
|
||||
v4 = "v4"
|
||||
)
|
||||
_, err := redis.GroupList().LPush(ctx, k1, v1, v2, v3, v4)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupList().BRPopLPush(ctx, k1, k2, 1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, v1)
|
||||
|
||||
r2, err := redis.GroupList().LRange(ctx, k1, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2, []string{v4, v3, v2})
|
||||
|
||||
r3, err := redis.GroupList().LRange(ctx, k2, 0, -1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r3, []string{v1})
|
||||
})
|
||||
}
|
76
contrib/nosql/redis/redis_z_group_pubsub_test.go
Normal file
76
contrib/nosql/redis/redis_z_group_pubsub_test.go
Normal file
@ -0,0 +1,76 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
)
|
||||
|
||||
func Test_GroupPubSub_Publish(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
conn, subs, err := redis.Subscribe(ctx, "gf")
|
||||
t.AssertNil(err)
|
||||
t.Assert(subs[0].Channel, "gf")
|
||||
|
||||
defer conn.Close(ctx)
|
||||
|
||||
_, err = redis.Publish(ctx, "gf", "test")
|
||||
t.AssertNil(err)
|
||||
|
||||
msg, err := conn.ReceiveMessage(ctx)
|
||||
t.AssertNil(err)
|
||||
t.Assert(msg.Channel, "gf")
|
||||
t.Assert(msg.Payload, "test")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupPubSub_Subscribe(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
conn, subs, err := redis.Subscribe(ctx, "aa", "bb", "gf")
|
||||
t.AssertNil(err)
|
||||
t.Assert(len(subs), 3)
|
||||
t.Assert(subs[0].Channel, "aa")
|
||||
t.Assert(subs[1].Channel, "bb")
|
||||
t.Assert(subs[2].Channel, "gf")
|
||||
|
||||
defer conn.Close(ctx)
|
||||
|
||||
_, err = redis.Publish(ctx, "gf", "test")
|
||||
t.AssertNil(err)
|
||||
|
||||
msg, err := conn.ReceiveMessage(ctx)
|
||||
t.AssertNil(err)
|
||||
t.Assert(msg.Channel, "gf")
|
||||
t.Assert(msg.Payload, "test")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupPubSub_PSubscribe(t *testing.T) {
|
||||
defer redis.FlushAll(ctx)
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
conn, subs, err := redis.PSubscribe(ctx, "aa", "bb", "g?")
|
||||
t.AssertNil(err)
|
||||
t.Assert(len(subs), 3)
|
||||
t.Assert(subs[0].Channel, "aa")
|
||||
t.Assert(subs[1].Channel, "bb")
|
||||
t.Assert(subs[2].Channel, "g?")
|
||||
|
||||
defer conn.Close(ctx)
|
||||
|
||||
_, err = redis.Publish(ctx, "gf", "test")
|
||||
t.AssertNil(err)
|
||||
|
||||
msg, err := conn.ReceiveMessage(ctx)
|
||||
t.AssertNil(err)
|
||||
t.Assert(msg.Channel, "gf")
|
||||
t.Assert(msg.Payload, "test")
|
||||
})
|
||||
}
|
121
contrib/nosql/redis/redis_z_group_script_test.go
Normal file
121
contrib/nosql/redis/redis_z_group_script_test.go
Normal file
@ -0,0 +1,121 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/crypto/gsha1"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
)
|
||||
|
||||
func Test_GroupScript_Eval(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
script = `return ARGV[1]`
|
||||
numKeys int64
|
||||
keys = []string{"hello"}
|
||||
args = []interface{}(nil)
|
||||
)
|
||||
v, err := redis.GroupScript().Eval(ctx, script, numKeys, keys, args)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.String(), "hello")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupScript_EvalSha(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
script = gsha1.Encrypt(`return ARGV[1]`)
|
||||
numKeys int64
|
||||
keys = []string{"hello"}
|
||||
args = []interface{}(nil)
|
||||
)
|
||||
v, err := redis.GroupScript().EvalSha(ctx, script, numKeys, keys, args)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.String(), "hello")
|
||||
})
|
||||
}
|
||||
|
||||
// https://redis.io/docs/manual/programmability/eval-intro/
|
||||
func Test_GroupScript_ScriptLoad(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
script = "return 'Immabe a cached script'"
|
||||
scriptSha1 = gsha1.Encrypt(script)
|
||||
)
|
||||
_, err := redis.GroupScript().ScriptLoad(ctx, script)
|
||||
t.AssertNil(err)
|
||||
|
||||
v, err := redis.GroupScript().EvalSha(ctx, scriptSha1, 0, nil, nil)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.String(), "Immabe a cached script")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupScript_ScriptExists(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
script = "return 'Immabe a cached script'"
|
||||
scriptSha1 = gsha1.Encrypt(script)
|
||||
scriptSha2 = gsha1.Encrypt("none")
|
||||
)
|
||||
_, err := redis.GroupScript().ScriptLoad(ctx, script)
|
||||
t.AssertNil(err)
|
||||
|
||||
v, err := redis.GroupScript().ScriptExists(ctx, scriptSha1, scriptSha2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v, g.MapStrBool{
|
||||
scriptSha1: true,
|
||||
scriptSha2: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupScript_ScriptFlush(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
script = "return 'Immabe a cached script'"
|
||||
scriptSha1 = gsha1.Encrypt(script)
|
||||
scriptSha2 = gsha1.Encrypt("none")
|
||||
)
|
||||
_, err := redis.GroupScript().ScriptLoad(ctx, script)
|
||||
t.AssertNil(err)
|
||||
|
||||
v, err := redis.GroupScript().ScriptExists(ctx, scriptSha1, scriptSha2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v, g.MapStrBool{
|
||||
scriptSha1: true,
|
||||
scriptSha2: false,
|
||||
})
|
||||
|
||||
err = redis.GroupScript().ScriptFlush(ctx, gredis.ScriptFlushOption{SYNC: true})
|
||||
t.AssertNil(err)
|
||||
|
||||
v, err = redis.GroupScript().ScriptExists(ctx, scriptSha1, scriptSha2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v, g.MapStrBool{
|
||||
scriptSha1: false,
|
||||
scriptSha2: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupScript_ScriptKill(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
err := redis.GroupScript().ScriptKill(ctx)
|
||||
t.Assert(err.Error(), `Redis Client Do failed with arguments "[Script Kill]": NOTBUSY No scripts in execution right now.`)
|
||||
})
|
||||
}
|
396
contrib/nosql/redis/redis_z_group_set_test.go
Normal file
396
contrib/nosql/redis/redis_z_group_set_test.go
Normal file
@ -0,0 +1,396 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/guid"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_GroupSet_SAdd(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
)
|
||||
num, err := redis.GroupSet().SAdd(ctx, k1, "v1", members...)
|
||||
t.Assert(num, 3)
|
||||
t.AssertNil(err)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SIsMember(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members...)
|
||||
t.AssertNil(err)
|
||||
|
||||
num, err := redis.GroupSet().SIsMember(ctx, k1, "v1")
|
||||
t.AssertNil(err)
|
||||
t.Assert(1, num)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SPop(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members...)
|
||||
t.AssertNil(err)
|
||||
|
||||
m1, err := redis.GroupSet().SPop(ctx, k1, 2)
|
||||
t.AssertNil(err)
|
||||
t.AssertIN(m1, []string{"v1", "v2", "v3"})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SRandMember(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members...)
|
||||
t.AssertNil(err)
|
||||
|
||||
r, err := redis.GroupSet().SRandMember(ctx, k1, 1)
|
||||
t.AssertNil(err)
|
||||
t.AssertIN(r, []string{"v1", "v2", "v3"})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SRem(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members...)
|
||||
t.AssertNil(err)
|
||||
|
||||
n, err := redis.GroupSet().SRem(ctx, k1, "v1")
|
||||
t.AssertNil(err)
|
||||
t.Assert(n, 1)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SMove(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
k2 = guid.S()
|
||||
members2 = []interface{}{
|
||||
"v5",
|
||||
"v6",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SAdd(ctx, k2, "v4", members2...)
|
||||
t.AssertNil(err)
|
||||
|
||||
n, err := redis.GroupSet().SMove(ctx, k1, k2, "v2")
|
||||
t.AssertNil(err)
|
||||
t.Assert(n, 1)
|
||||
|
||||
m1s, err := redis.GroupSet().SMembers(ctx, k1)
|
||||
t.Assert(2, len(m1s))
|
||||
|
||||
m2s, err := redis.GroupSet().SMembers(ctx, k2)
|
||||
t.Assert(4, len(m2s))
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SCard(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
n, err := redis.GroupSet().SCard(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(n, 3)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SMembers(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupSet().SMembers(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.AssertIN(r1, []string{"v1", "v2", "v3"})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SMIsMember(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SMIsMember(ctx, k1, "v1")
|
||||
t.AssertNil(err)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SInter(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
|
||||
k2 = guid.S()
|
||||
members2 = []interface{}{
|
||||
"v3",
|
||||
"v6",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SAdd(ctx, k2, "v4", members2...)
|
||||
t.AssertNil(err)
|
||||
|
||||
n, err := redis.GroupSet().SInter(ctx, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.AssertIN("v3", n)
|
||||
t.AssertNI("v4", n)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SInterStore(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
|
||||
k2 = guid.S()
|
||||
members2 = []interface{}{
|
||||
"v4",
|
||||
"v6",
|
||||
}
|
||||
|
||||
k3 = guid.S()
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SAdd(ctx, k2, "v3", members2...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SInterStore(ctx, k3, k1, k2)
|
||||
t.AssertNil(err)
|
||||
|
||||
member3, err := redis.GroupSet().SMembers(ctx, k3)
|
||||
t.AssertNil(err)
|
||||
t.AssertIN("v3", member3)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SUnion(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
|
||||
k2 = guid.S()
|
||||
members2 = []interface{}{
|
||||
"v5",
|
||||
"v6",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SAdd(ctx, k2, "v3", members2...)
|
||||
t.AssertNil(err)
|
||||
|
||||
union, err := redis.GroupSet().SUnion(ctx, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(len(union), 5)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SUnionStore(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
|
||||
k2 = guid.S()
|
||||
members2 = []interface{}{
|
||||
"v5",
|
||||
"v6",
|
||||
}
|
||||
|
||||
k3 = guid.S()
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SAdd(ctx, k2, "v3", members2...)
|
||||
t.AssertNil(err)
|
||||
|
||||
union, err := redis.GroupSet().SUnionStore(ctx, k3, k1, k2)
|
||||
t.AssertNil(err)
|
||||
|
||||
member3, err := redis.GroupSet().SMembers(ctx, k3)
|
||||
t.AssertNil(err)
|
||||
t.Assert(len(member3), union)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SDiff(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
|
||||
k2 = guid.S()
|
||||
members2 = []interface{}{
|
||||
"v5",
|
||||
"v6",
|
||||
}
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SAdd(ctx, k2, "v3", members2...)
|
||||
t.AssertNil(err)
|
||||
|
||||
diff, err := redis.GroupSet().SDiff(ctx, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(len(diff), 2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSet_SDiffStore(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
members1 = []interface{}{
|
||||
"v2",
|
||||
"v3",
|
||||
}
|
||||
|
||||
k2 = guid.S()
|
||||
members2 = []interface{}{
|
||||
"v5",
|
||||
"v6",
|
||||
}
|
||||
|
||||
k3 = guid.S()
|
||||
)
|
||||
|
||||
_, err := redis.GroupSet().SAdd(ctx, k1, "v1", members1...)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSet().SAdd(ctx, k2, "v3", members2...)
|
||||
t.AssertNil(err)
|
||||
|
||||
diffStore, err := redis.GroupSet().SDiffStore(ctx, k3, k1, k2)
|
||||
t.AssertNil(err)
|
||||
|
||||
members3, err := redis.GroupSet().SMembers(ctx, k3)
|
||||
t.AssertNil(err)
|
||||
t.Assert(len(members3), diffStore)
|
||||
|
||||
})
|
||||
}
|
809
contrib/nosql/redis/redis_z_group_sorted_set_test.go
Normal file
809
contrib/nosql/redis/redis_z_group_sorted_set_test.go
Normal file
@ -0,0 +1,809 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"github.com/gogf/gf/v2/util/guid"
|
||||
)
|
||||
|
||||
func Test_GroupSortedSet_ZADD(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
maxn int = 100000000
|
||||
k1 = guid.S()
|
||||
k1m1 = guid.S()
|
||||
k1m2 = guid.S()
|
||||
|
||||
option gredis.ZAddOption
|
||||
member1 gredis.ZAddMember
|
||||
member2 gredis.ZAddMember
|
||||
)
|
||||
|
||||
member1 = gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: k1m1,
|
||||
}
|
||||
|
||||
_, err := redis.GroupSortedSet().ZAdd(ctx, k1, &option, member1)
|
||||
t.AssertNil(err)
|
||||
|
||||
member2 = gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(1000000)),
|
||||
Member: k1m2,
|
||||
}
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, &option, member2)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSortedSet().ZScore(ctx, k1, k1m1)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupSortedSet().ZScore(ctx, k1, k1m2)
|
||||
t.AssertNil(err)
|
||||
|
||||
var (
|
||||
k2 string = guid.S()
|
||||
k2m1 string = guid.S()
|
||||
k2m2 string = guid.S()
|
||||
k2m3 int = grand.Intn(maxn)
|
||||
)
|
||||
|
||||
member3 := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: k2m1,
|
||||
}
|
||||
|
||||
member4 := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: k2m2,
|
||||
}
|
||||
|
||||
member5 := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: k2m3,
|
||||
}
|
||||
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k2, &option, member3, member4, member5)
|
||||
})
|
||||
|
||||
// with option
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
maxn int = 100000000
|
||||
k1 = guid.S()
|
||||
k1m1 = guid.S()
|
||||
)
|
||||
|
||||
member1 := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: k1m1,
|
||||
}
|
||||
|
||||
option := gredis.ZAddOption{}
|
||||
_, err := redis.GroupSortedSet().ZAdd(ctx, k1, &option, member1)
|
||||
t.AssertNil(err)
|
||||
|
||||
// option XX
|
||||
optionXX := &gredis.ZAddOption{
|
||||
XX: true,
|
||||
}
|
||||
memberXX := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: k1m1,
|
||||
}
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionXX, memberXX)
|
||||
t.AssertNil(err)
|
||||
|
||||
scoreXX, err := redis.GroupSortedSet().ZScore(ctx, k1, memberXX.Member)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(scoreXX, memberXX.Score)
|
||||
|
||||
// option NX
|
||||
optionNX := &gredis.ZAddOption{
|
||||
NX: true,
|
||||
}
|
||||
memberNX := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: guid.S(),
|
||||
}
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionNX, memberNX)
|
||||
t.AssertNil(err)
|
||||
|
||||
scoreNXOrigin := memberNX.Score
|
||||
memberNX.Score = float64(grand.Intn(maxn))
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionNX, memberNX)
|
||||
t.AssertNil(err)
|
||||
|
||||
score, err := redis.GroupSortedSet().ZScore(ctx, k1, memberNX.Member)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, scoreNXOrigin)
|
||||
|
||||
// option LT
|
||||
optionLT := &gredis.ZAddOption{
|
||||
LT: true,
|
||||
}
|
||||
memberLT := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: guid.S(),
|
||||
}
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionLT, memberLT)
|
||||
t.AssertNil(err)
|
||||
|
||||
memberLT.Score += 1
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionLT, memberLT)
|
||||
t.AssertNil(err)
|
||||
scoreLT, err := redis.GroupSortedSet().ZScore(ctx, k1, memberLT.Member)
|
||||
t.AssertLT(scoreLT, memberLT.Score)
|
||||
|
||||
memberLT.Score -= 3
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionLT, memberLT)
|
||||
t.AssertNil(err)
|
||||
scoreLT, err = redis.GroupSortedSet().ZScore(ctx, k1, memberLT.Member)
|
||||
t.AssertEQ(scoreLT, memberLT.Score)
|
||||
|
||||
// option GT
|
||||
optionGT := &gredis.ZAddOption{
|
||||
GT: true,
|
||||
}
|
||||
memberGT := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: guid.S(),
|
||||
}
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionGT, memberGT)
|
||||
t.AssertNil(err)
|
||||
|
||||
memberLT.Score -= 1
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionGT, memberGT)
|
||||
t.AssertNil(err)
|
||||
scoreGT, err := redis.GroupSortedSet().ZScore(ctx, k1, memberLT.Member)
|
||||
t.AssertGT(scoreGT, memberLT.Score)
|
||||
|
||||
memberLT.Score += 3
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionGT, memberGT)
|
||||
t.AssertNil(err)
|
||||
scoreGT, err = redis.GroupSortedSet().ZScore(ctx, k1, memberGT.Member)
|
||||
t.AssertEQ(scoreGT, memberGT.Score)
|
||||
|
||||
// option CH
|
||||
optionCH := &gredis.ZAddOption{
|
||||
CH: true,
|
||||
}
|
||||
memberCH := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: guid.S(),
|
||||
}
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionCH, memberCH)
|
||||
t.AssertNil(err)
|
||||
|
||||
changed, err := redis.GroupSortedSet().ZAdd(ctx, k1, optionCH, memberCH)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(changed.Val(), int64(0))
|
||||
|
||||
memberCH.Score += 1
|
||||
changed, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionCH, memberCH)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(changed.Val(), int64(1))
|
||||
|
||||
memberCH.Member = guid.S()
|
||||
changed, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionCH, memberCH)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(changed.Val(), int64(1))
|
||||
|
||||
// option INCR
|
||||
optionINCR := &gredis.ZAddOption{
|
||||
INCR: true,
|
||||
}
|
||||
memberINCR := gredis.ZAddMember{
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
Member: guid.S(),
|
||||
}
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionINCR, memberINCR)
|
||||
t.AssertNil(err)
|
||||
|
||||
scoreIncrOrigin := memberINCR.Score
|
||||
memberINCR.Score += 1
|
||||
_, err = redis.GroupSortedSet().ZAdd(ctx, k1, optionINCR, memberINCR)
|
||||
t.AssertNil(err)
|
||||
|
||||
scoreINCR, err := redis.GroupSortedSet().ZScore(ctx, k1, memberINCR.Member)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(scoreINCR, memberINCR.Score+scoreIncrOrigin)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZScore(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k1 string = guid.S()
|
||||
m1 string = guid.S()
|
||||
maxn int = 1000000
|
||||
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
member := gredis.ZAddMember{
|
||||
Member: m1,
|
||||
Score: float64(grand.Intn(maxn)),
|
||||
}
|
||||
|
||||
_, err := redis.GroupSortedSet().ZAdd(ctx, k1, option, member)
|
||||
t.AssertNil(err)
|
||||
|
||||
score, err := redis.GroupSortedSet().ZScore(ctx, k1, m1)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, member.Score)
|
||||
|
||||
m2 := guid.S()
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k1, m2)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
k2 := guid.S()
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k2, m2)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZIncrBy(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
k := guid.S()
|
||||
m := guid.S()
|
||||
|
||||
var incr float64 = 6
|
||||
_, err := redis.GroupSortedSet().ZIncrBy(ctx, k, incr, m)
|
||||
t.AssertNil(err)
|
||||
|
||||
incr2 := float64(3)
|
||||
incredScore, err := redis.GroupSortedSet().ZIncrBy(ctx, k, incr2, m)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(incredScore, incr+incr2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZCard(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
rand := grand.N(10, 20)
|
||||
for i := 1; i <= rand; i++ {
|
||||
_, err := redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(i),
|
||||
})
|
||||
t.AssertNil(err)
|
||||
|
||||
cnt, err := redis.GroupSortedSet().ZCard(ctx, k)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(i))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZCount(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k string = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
min, max := "5", "378"
|
||||
memSlice := []int{-6, 3, 7, 9, 100, 500, 666}
|
||||
|
||||
for i := 0; i < len(memSlice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: memSlice[i],
|
||||
Score: float64(memSlice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
cnt, err := redis.GroupSortedSet().ZCount(ctx, k, min, max)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(3))
|
||||
|
||||
cnt, err = redis.GroupSortedSet().ZCount(ctx, k, "-inf", max)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(5))
|
||||
|
||||
cnt, err = redis.GroupSortedSet().ZCount(ctx, k, "-inf", "+inf")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(len(memSlice)))
|
||||
|
||||
cnt, err = redis.GroupSortedSet().ZCount(ctx, k, "(500", "(567")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(0))
|
||||
|
||||
cnt, err = redis.GroupSortedSet().ZCount(ctx, k, "(500", "+inf")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(1))
|
||||
|
||||
cnt, err = redis.GroupSortedSet().ZCount(ctx, k, "(3", "(567")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(4))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZRange(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []string{"one", "two", "three"}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: slice[i],
|
||||
Score: float64(i + 1),
|
||||
})
|
||||
}
|
||||
|
||||
ret, err := redis.GroupSortedSet().ZRange(ctx, k, 0, -1)
|
||||
t.AssertNil(err)
|
||||
expected := []string{"one", "two", "three"}
|
||||
for i := 0; i < len(ret); i++ {
|
||||
t.AssertEQ(ret[i].String(), expected[i])
|
||||
}
|
||||
|
||||
ret, err = redis.GroupSortedSet().ZRange(ctx, k, 2, 3)
|
||||
t.AssertNil(err)
|
||||
expected = []string{"three"}
|
||||
for i := 0; i < len(ret); i++ {
|
||||
t.AssertEQ(ret[i].String(), expected[i])
|
||||
}
|
||||
|
||||
// ret, err = redis.GroupSortedSet().ZRange(ctx, k, 0, -1,
|
||||
// gredis.ZRangeOption{WithScores: true})
|
||||
// t.AssertNil(err)
|
||||
// expectedScore := []interface{}{1, "one", 2, "two", 3, "three"}
|
||||
// for i := 0; i < len(ret); i++ {
|
||||
// t.AssertEQ(ret[i].String(), expectedScore[i])
|
||||
// }
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZRevRange(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []string{"one", "two", "three"}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: slice[i],
|
||||
Score: float64(i + 1),
|
||||
})
|
||||
}
|
||||
|
||||
ret, err := redis.GroupSortedSet().ZRevRange(ctx, k, 0, -1)
|
||||
t.AssertNil(err)
|
||||
expected := []interface{}{"three", "two", "one"}
|
||||
t.AssertEQ(ret.Slice(), expected)
|
||||
|
||||
ret, err = redis.GroupSortedSet().ZRevRange(ctx, k, 0, 1)
|
||||
t.AssertNil(err)
|
||||
expected = []interface{}{"three", "two"}
|
||||
t.AssertEQ(ret.Slice(), expected)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZRank(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rank, err := redis.ZRank(ctx, k, 0)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rank, int64(0))
|
||||
|
||||
rank, err = redis.ZRank(ctx, k, 3)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rank, int64(3))
|
||||
|
||||
rank, err = redis.ZRank(ctx, k, 6)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rank, int64(0))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZRevRank(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rank, err := redis.ZRevRank(ctx, k, 0)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rank, int64(4))
|
||||
|
||||
rank, err = redis.ZRevRank(ctx, k, 3)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rank, int64(1))
|
||||
|
||||
rank, err = redis.ZRevRank(ctx, k, 9)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rank, int64(0))
|
||||
|
||||
rank, err = redis.ZRevRank(ctx, k, 6)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rank, int64(0))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZRem(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
m = guid.S()
|
||||
option = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
cnt, err := redis.ZRem(ctx, k, m)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(0))
|
||||
|
||||
member := gredis.ZAddMember{
|
||||
Member: m,
|
||||
Score: 123,
|
||||
}
|
||||
redis.ZAdd(ctx, k, option, member)
|
||||
|
||||
cnt, err = redis.ZRem(ctx, k, m)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(1))
|
||||
|
||||
member2 := gredis.ZAddMember{
|
||||
Member: guid.S(),
|
||||
Score: 456,
|
||||
}
|
||||
_, err = redis.ZAdd(ctx, k, option, member, member2)
|
||||
t.AssertNil(err)
|
||||
|
||||
cnt, err = redis.ZRem(ctx, k, m, "non_exists")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(1))
|
||||
|
||||
_, err = redis.ZAdd(ctx, k, option, member, member2)
|
||||
t.AssertNil(err)
|
||||
|
||||
cnt, err = redis.ZRem(ctx, k, m, member2.Member)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(2))
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupSortedSet_ZRemRangeByRank(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rmd, err := redis.GroupSortedSet().ZRemRangeByRank(ctx, k, 0, 2)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rmd, int64(3))
|
||||
|
||||
score, err := redis.GroupSortedSet().ZScore(ctx, k, 0)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 1)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 2)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 3)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(7))
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rmd, err := redis.GroupSortedSet().ZRemRangeByRank(ctx, k, -3, -2)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rmd, int64(2))
|
||||
|
||||
score, err := redis.GroupSortedSet().ZScore(ctx, k, 2)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 3)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 4)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(9))
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rmd, err := redis.GroupSortedSet().ZRemRangeByRank(ctx, k, 3, -1)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rmd, int64(2))
|
||||
|
||||
score, err := redis.GroupSortedSet().ZScore(ctx, k, 3)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 4)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 1)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(3))
|
||||
})
|
||||
}
|
||||
func Test_GroupSortedSet_ZRemRangeByScore(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rmd, err := redis.GroupSortedSet().ZRemRangeByScore(ctx, k, "(3", "9")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rmd, int64(3))
|
||||
|
||||
score, err := redis.GroupSortedSet().ZScore(ctx, k, 3)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 4)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 5)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 1)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(3))
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rmd, err := redis.GroupSortedSet().ZRemRangeByScore(ctx, k, "3", "(9")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rmd, int64(3))
|
||||
|
||||
score, err := redis.GroupSortedSet().ZScore(ctx, k, 1)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 2)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 3)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(0))
|
||||
|
||||
score, err = redis.GroupSortedSet().ZScore(ctx, k, 4)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(score, float64(9))
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rmd, err := redis.GroupSortedSet().ZRemRangeByScore(ctx, k, "-inf", "9")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rmd, int64(5))
|
||||
|
||||
cnt, err := redis.GroupSortedSet().ZCard(ctx, k)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(0))
|
||||
})
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []int64{1, 3, 5, 7, 9}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: i,
|
||||
Score: float64(slice[i]),
|
||||
})
|
||||
}
|
||||
|
||||
rmd, err := redis.GroupSortedSet().ZRemRangeByScore(ctx, k, "-inf", "+inf")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(rmd, int64(5))
|
||||
|
||||
cnt, err := redis.GroupSortedSet().ZCard(ctx, k)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(0))
|
||||
})
|
||||
}
|
||||
func Test_GroupSortedSet_ZRemRangeByLex(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []string{"aaaa", "b", "c", "d", "e", "foo", "zap", "zip", "ALPHA", "alpha"}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: slice[i],
|
||||
Score: float64(0),
|
||||
})
|
||||
}
|
||||
|
||||
cnt, err := redis.GroupSortedSet().ZRemRangeByLex(ctx, k, "[alpha", "[omega")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(6))
|
||||
|
||||
cnt, err = redis.GroupSortedSet().ZCard(ctx, k)
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(4))
|
||||
})
|
||||
}
|
||||
func Test_GroupSortedSet_ZLexCount(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
|
||||
var (
|
||||
k = guid.S()
|
||||
option *gredis.ZAddOption = new(gredis.ZAddOption)
|
||||
)
|
||||
|
||||
slice := []string{"a", "b", "c", "d", "e", "f", "g"}
|
||||
for i := 0; i < len(slice); i++ {
|
||||
redis.GroupSortedSet().ZAdd(ctx, k, option, gredis.ZAddMember{
|
||||
Member: slice[i],
|
||||
Score: float64(0),
|
||||
})
|
||||
}
|
||||
|
||||
cnt, err := redis.GroupSortedSet().ZLexCount(ctx, k, "-", "+")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(7))
|
||||
|
||||
cnt, err = redis.GroupSortedSet().ZLexCount(ctx, k, "[b", "[f")
|
||||
t.AssertNil(err)
|
||||
t.AssertEQ(cnt, int64(5))
|
||||
|
||||
})
|
||||
}
|
425
contrib/nosql/redis/redis_z_group_string_test.go
Normal file
425
contrib/nosql/redis/redis_z_group_string_test.go
Normal file
@ -0,0 +1,425 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/guid"
|
||||
)
|
||||
|
||||
func Test_GroupString_Set(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
v1 = guid.S()
|
||||
k2 = guid.S()
|
||||
v2 = guid.S()
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
_, err = redis.GroupString().Set(ctx, k2, v2)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
r2, err := redis.GroupString().Get(ctx, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), v2)
|
||||
})
|
||||
// With Option.
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupString().Set(ctx, k1, v2, gredis.SetOption{
|
||||
NX: true,
|
||||
TTLOption: gredis.TTLOption{
|
||||
EX: gconv.PtrInt64(60),
|
||||
},
|
||||
})
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
|
||||
_, err = redis.GroupString().Set(ctx, k1, v2, gredis.SetOption{
|
||||
XX: true,
|
||||
TTLOption: gredis.TTLOption{
|
||||
EX: gconv.PtrInt64(60),
|
||||
},
|
||||
})
|
||||
t.AssertNil(err)
|
||||
|
||||
r2, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), v2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_SetNX(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.GroupString().SetNX(ctx, k1, v2)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_SetEX(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
)
|
||||
err := redis.GroupString().SetEX(ctx, k1, v1, 1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
|
||||
time.Sleep(time.Second * 2)
|
||||
|
||||
r2, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), "")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_GetDel(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().GetDel(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
|
||||
r2, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), "")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_GetEX(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
)
|
||||
err := redis.GroupString().SetEX(ctx, k1, v1, 1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().GetEX(ctx, k1, gredis.GetEXOption{
|
||||
Persist: true,
|
||||
})
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
|
||||
r2, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), v1)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_GetSet(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
k2 = "k2"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
|
||||
r2, err := redis.GroupString().GetSet(ctx, k1, v2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), v1)
|
||||
|
||||
r3, err := redis.GroupString().GetSet(ctx, k2, v2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r3.String(), "")
|
||||
|
||||
r4, err := redis.GroupString().GetSet(ctx, k2, v2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r4.String(), v2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_StrLen(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().StrLen(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, 2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_Append(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Append(ctx, k1, v2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, len(v1+v2))
|
||||
|
||||
r2, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), v1+v2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_SetRange(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "v1"
|
||||
v2 = "v2"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().SetRange(ctx, k1, 2, v2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, len(v1+v2))
|
||||
|
||||
r2, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), v1+v2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_GetRange(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = "hello gf"
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().GetRange(ctx, k1, 6, 8)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, "gf")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_Incr(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = 1
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Incr(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, 2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_IncrBy(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = 1
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().IncrBy(ctx, k1, 10)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, 11)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_IncrByFloat(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = 1
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().IncrByFloat(ctx, k1, 1.01)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, 2.01)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_Decr(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = 10
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Decr(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, 9)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_DecrBy(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = "k1"
|
||||
v1 = 10
|
||||
)
|
||||
_, err := redis.GroupString().Set(ctx, k1, v1)
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().DecrBy(ctx, k1, 3)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1, 7)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_MSet(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
v1 = guid.S()
|
||||
k2 = guid.S()
|
||||
v2 = guid.S()
|
||||
)
|
||||
err := redis.GroupString().MSet(ctx, map[string]interface{}{
|
||||
k1: v1,
|
||||
k2: v2,
|
||||
})
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
|
||||
r2, err := redis.GroupString().Get(ctx, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), v2)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_MSetNX(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
v1 = guid.S()
|
||||
k2 = guid.S()
|
||||
v2 = guid.S()
|
||||
)
|
||||
ok, err := redis.GroupString().MSetNX(ctx, map[string]interface{}{
|
||||
k1: v1,
|
||||
})
|
||||
t.AssertNil(err)
|
||||
t.Assert(ok, true)
|
||||
|
||||
ok, err = redis.GroupString().MSetNX(ctx, map[string]interface{}{
|
||||
k1: v1,
|
||||
k2: v2,
|
||||
})
|
||||
t.AssertNil(err)
|
||||
t.Assert(ok, false)
|
||||
|
||||
r1, err := redis.GroupString().Get(ctx, k1)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r1.String(), v1)
|
||||
|
||||
r2, err := redis.GroupString().Get(ctx, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(r2.String(), "")
|
||||
})
|
||||
}
|
||||
|
||||
func Test_GroupString_MGet(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
defer redis.FlushDB(ctx)
|
||||
var (
|
||||
k1 = guid.S()
|
||||
v1 = guid.S()
|
||||
k2 = guid.S()
|
||||
v2 = guid.S()
|
||||
)
|
||||
err := redis.GroupString().MSet(ctx, map[string]interface{}{
|
||||
k1: v1,
|
||||
k2: v2,
|
||||
})
|
||||
t.AssertNil(err)
|
||||
|
||||
r1, err := redis.GroupString().MGet(ctx, k1, k2)
|
||||
t.AssertNil(err)
|
||||
t.Assert(len(r1), 2)
|
||||
t.Assert(r1[k1].String(), v1)
|
||||
t.Assert(r1[k2].String(), v2)
|
||||
})
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis_test
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"testing"
|
@ -4,7 +4,7 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis_test
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"context"
|
@ -4,27 +4,16 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis_test
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
)
|
||||
|
||||
var (
|
||||
ctx = context.TODO()
|
||||
)
|
||||
|
||||
func TestConn_DoWithTimeout(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
redis, err := gredis.New(config)
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(redis, nil)
|
||||
defer redis.Close(ctx)
|
||||
|
||||
conn, err := redis.Conn(ctx)
|
||||
t.AssertNil(err)
|
||||
defer conn.Close(ctx)
|
||||
@ -41,28 +30,20 @@ func TestConn_DoWithTimeout(t *testing.T) {
|
||||
|
||||
func TestConn_ReceiveVarWithTimeout(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
redis, err := gredis.New(config)
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(redis, nil)
|
||||
defer redis.Close(ctx)
|
||||
|
||||
conn, err := redis.Conn(ctx)
|
||||
t.AssertNil(err)
|
||||
defer conn.Close(ctx)
|
||||
|
||||
_, err = conn.Do(ctx, "Subscribe", "gf")
|
||||
sub, err := conn.Subscribe(ctx, "gf")
|
||||
t.AssertNil(err)
|
||||
t.Assert(sub[0].Channel, "gf")
|
||||
|
||||
_, err = redis.Publish(ctx, "gf", "test")
|
||||
t.AssertNil(err)
|
||||
|
||||
v, err := redis.Do(ctx, "PUBLISH", "gf", "test")
|
||||
|
||||
v, err = conn.Receive(ctx)
|
||||
msg, err := conn.ReceiveMessage(ctx)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.Val().(*gredis.Subscription).Channel, "gf")
|
||||
|
||||
v, err = conn.Receive(ctx)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.Val().(*gredis.Message).Channel, "gf")
|
||||
t.Assert(v.Val().(*gredis.Message).Payload, "test")
|
||||
|
||||
t.Assert(msg.Channel, "gf")
|
||||
t.Assert(msg.Payload, "test")
|
||||
})
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gcache_test
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"context"
|
@ -4,7 +4,7 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gins_test
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
@ -17,7 +17,7 @@ import (
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
)
|
||||
|
||||
func Test_Redis(t *testing.T) {
|
||||
func Test_GINS_Redis(t *testing.T) {
|
||||
redisContent := gfile.GetContents(
|
||||
gtest.DataPath("redis", "config.toml"),
|
||||
)
|
@ -4,7 +4,7 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis_test
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
@ -20,13 +20,6 @@ import (
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
)
|
||||
|
||||
var (
|
||||
config = &gredis.Config{
|
||||
Address: `:6379`,
|
||||
Db: 1,
|
||||
}
|
||||
)
|
||||
|
||||
func Test_NewClose(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
redis, err := gredis.New(config)
|
||||
@ -40,12 +33,7 @@ func Test_NewClose(t *testing.T) {
|
||||
|
||||
func Test_Do(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
redis, err := gredis.New(config)
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(redis, nil)
|
||||
defer redis.Close(ctx)
|
||||
|
||||
_, err = redis.Do(ctx, "SET", "k", "v")
|
||||
_, err := redis.Do(ctx, "SET", "k", "v")
|
||||
t.AssertNil(err)
|
||||
|
||||
r, err := redis.Do(ctx, "GET", "k")
|
||||
@ -62,11 +50,6 @@ func Test_Do(t *testing.T) {
|
||||
|
||||
func Test_Conn(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
redis, err := gredis.New(config)
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(redis, nil)
|
||||
defer redis.Close(ctx)
|
||||
|
||||
conn, err := redis.Conn(ctx)
|
||||
t.AssertNil(err)
|
||||
defer conn.Close(ctx)
|
||||
@ -123,84 +106,58 @@ func Test_Error(t *testing.T) {
|
||||
Db: 1,
|
||||
DialTimeout: time.Second,
|
||||
}
|
||||
redis, err := gredis.New(config1)
|
||||
r, err := gredis.New(config1)
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(redis, nil)
|
||||
defer redis.Close(ctx)
|
||||
t.AssertNE(r, nil)
|
||||
defer r.Close(ctx)
|
||||
|
||||
_, err = redis.Do(ctx, "info")
|
||||
_, err = r.Do(ctx, "info")
|
||||
t.AssertNE(err, nil)
|
||||
|
||||
config1 = &gredis.Config{
|
||||
Address: "127.0.0.1:6379",
|
||||
Db: 100,
|
||||
}
|
||||
redis, err = gredis.New(config1)
|
||||
r, err = gredis.New(config1)
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(redis, nil)
|
||||
defer redis.Close(ctx)
|
||||
t.AssertNE(r, nil)
|
||||
defer r.Close(ctx)
|
||||
|
||||
_, err = redis.Do(ctx, "info")
|
||||
_, err = r.Do(ctx, "info")
|
||||
t.AssertNE(err, nil)
|
||||
|
||||
redis = gredis.Instance("gf")
|
||||
t.Assert(redis == nil, true)
|
||||
r = gredis.Instance("gf")
|
||||
t.Assert(r == nil, true)
|
||||
gredis.ClearConfig()
|
||||
|
||||
redis, err = gredis.New(config)
|
||||
r, err = gredis.New(config)
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(redis, nil)
|
||||
defer redis.Close(ctx)
|
||||
t.AssertNE(r, nil)
|
||||
defer r.Close(ctx)
|
||||
|
||||
_, err = redis.Do(ctx, "SET", "k", "v")
|
||||
_, err = r.Do(ctx, "SET", "k", "v")
|
||||
t.AssertNil(err)
|
||||
|
||||
v, err := redis.Do(ctx, "GET", "k")
|
||||
v, err := r.Do(ctx, "GET", "k")
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.String(), "v")
|
||||
|
||||
conn, err := redis.Conn(ctx)
|
||||
conn, err := r.Conn(ctx)
|
||||
t.AssertNil(err)
|
||||
defer conn.Close(ctx)
|
||||
_, err = conn.Do(ctx, "SET", "k", "v")
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = conn.Do(ctx, "Subscribe", "gf")
|
||||
t.AssertNil(err)
|
||||
|
||||
time.Sleep(time.Second)
|
||||
|
||||
_, err = redis.Do(ctx, "PUBLISH", "gf", "test")
|
||||
t.AssertNil(err)
|
||||
|
||||
time.Sleep(time.Second)
|
||||
|
||||
v, err = conn.Receive(ctx)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.Val().(*gredis.Subscription).Channel, "gf")
|
||||
|
||||
v, err = conn.Receive(ctx)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.Val().(*gredis.Message).Channel, "gf")
|
||||
t.Assert(v.Val().(*gredis.Message).Payload, "test")
|
||||
|
||||
time.Sleep(time.Second)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_Bool(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
redis, err := gredis.New(config)
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(redis, nil)
|
||||
defer redis.Close(ctx)
|
||||
|
||||
defer func() {
|
||||
redis.Do(ctx, "DEL", "key-true")
|
||||
redis.Do(ctx, "DEL", "key-false")
|
||||
}()
|
||||
|
||||
_, err = redis.Do(ctx, "SET", "key-true", true)
|
||||
_, err := redis.Do(ctx, "SET", "key-true", true)
|
||||
t.AssertNil(err)
|
||||
|
||||
_, err = redis.Do(ctx, "SET", "key-false", false)
|
43
contrib/nosql/redis/testdata/redis/config.toml
vendored
Normal file
43
contrib/nosql/redis/testdata/redis/config.toml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# 模板引擎目录
|
||||
viewpath = "/home/www/templates/"
|
||||
test = "v=3"
|
||||
# MySQL数据库配置
|
||||
[database]
|
||||
[[database.default]]
|
||||
host = "127.0.0.1"
|
||||
port = "3306"
|
||||
user = "root"
|
||||
pass = ""
|
||||
# pass = "12345678"
|
||||
name = "test"
|
||||
type = "mysql"
|
||||
role = "master"
|
||||
charset = "utf8"
|
||||
priority = "1"
|
||||
[[database.test]]
|
||||
host = "127.0.0.1"
|
||||
port = "3306"
|
||||
user = "root"
|
||||
pass = ""
|
||||
# pass = "12345678"
|
||||
name = "test"
|
||||
type = "mysql"
|
||||
role = "master"
|
||||
charset = "utf8"
|
||||
priority = "1"
|
||||
# Redis数据库配置
|
||||
[redis]
|
||||
[redis.default]
|
||||
address = "127.0.0.1:6379"
|
||||
db = 7
|
||||
[redis.cache]
|
||||
address = "127.0.0.1:6379"
|
||||
db = 8
|
||||
[redis.disk]
|
||||
address = "127.0.0.1:6379"
|
||||
db = 9
|
||||
maxIdle = 1
|
||||
maxActive = 10
|
||||
idleTimeout = "10s"
|
||||
maxConnLifetime = "10s"
|
||||
|
@ -14,11 +14,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
@ -31,8 +26,6 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
@ -41,8 +34,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
@ -57,10 +48,7 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
@ -92,7 +80,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
@ -100,8 +87,6 @@ github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
@ -134,23 +119,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
@ -222,7 +192,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
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=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@ -231,12 +200,10 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
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-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
@ -253,15 +220,10 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -270,7 +232,6 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -280,7 +241,6 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/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-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
@ -299,7 +259,6 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
@ -339,9 +298,6 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
@ -68,8 +68,6 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo=
|
||||
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
@ -80,8 +78,6 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
@ -99,10 +95,7 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
@ -163,7 +156,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
@ -183,9 +175,7 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
@ -229,23 +219,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4UpgHp07nNdFX7mqFfM=
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
@ -299,7 +274,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
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/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
@ -363,7 +337,6 @@ 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=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@ -386,14 +359,12 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
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-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
@ -413,12 +384,10 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -429,10 +398,7 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -454,7 +420,6 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -526,7 +491,6 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
@ -627,11 +591,8 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
|
||||
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/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
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/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
@ -8,4 +8,4 @@ require (
|
||||
golang.org/x/sync v0.1.0
|
||||
)
|
||||
|
||||
replace github.com/gogf/gf/v2 => ../../../
|
||||
replace github.com/gogf/gf/v2 => ../../../
|
||||
|
@ -1,21 +1,11 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -23,36 +13,14 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg=
|
||||
github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
|
||||
github.com/gogf/gf/v2 v2.2.2 h1:ew4k/VSr/gcPdMZcI8/HZYBYPjB0KOk6bQqA61M8bYE=
|
||||
github.com/gogf/gf/v2 v2.2.2/go.mod h1:thvkyb43RWUu/m05sRm4CbH9r7t7/FrW2M56L9Ystwk=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
@ -62,30 +30,13 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -95,78 +46,42 @@ go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJ
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -1,21 +1,11 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -23,32 +13,12 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
@ -58,31 +28,14 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -94,76 +47,40 @@ go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJ
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -141,8 +141,8 @@ type DB interface {
|
||||
// Transaction.
|
||||
// ===========================================================================
|
||||
|
||||
Begin(ctx context.Context) (*TX, error) // See Core.Begin.
|
||||
Transaction(ctx context.Context, f func(ctx context.Context, tx *TX) error) error // See Core.Transaction.
|
||||
Begin(ctx context.Context) (TX, error) // See Core.Begin.
|
||||
Transaction(ctx context.Context, f func(ctx context.Context, tx TX) error) error // See Core.Transaction.
|
||||
|
||||
// ===========================================================================
|
||||
// Configuration methods.
|
||||
@ -177,6 +177,71 @@ type DB interface {
|
||||
CheckLocalTypeForField(ctx context.Context, fieldType string, fieldValue interface{}) (string, error) // See Core.CheckLocalTypeForField
|
||||
}
|
||||
|
||||
// TX defines the interfaces for ORM transaction operations.
|
||||
type TX interface {
|
||||
Ctx(ctx context.Context) TX
|
||||
Raw(rawSql string, args ...interface{}) *Model
|
||||
Model(tableNameQueryOrStruct ...interface{}) *Model
|
||||
With(object interface{}) *Model
|
||||
|
||||
// ===========================================================================
|
||||
// Nested transaction if necessary.
|
||||
// ===========================================================================
|
||||
|
||||
Begin() error
|
||||
Commit() error
|
||||
Rollback() error
|
||||
Transaction(ctx context.Context, f func(ctx context.Context, tx TX) error) (err error)
|
||||
|
||||
// ===========================================================================
|
||||
// Core method.
|
||||
// ===========================================================================
|
||||
|
||||
Query(sql string, args ...interface{}) (result Result, err error)
|
||||
Exec(sql string, args ...interface{}) (sql.Result, error)
|
||||
Prepare(sql string) (*Stmt, error)
|
||||
|
||||
// ===========================================================================
|
||||
// Query.
|
||||
// ===========================================================================
|
||||
|
||||
GetAll(sql string, args ...interface{}) (Result, error)
|
||||
GetOne(sql string, args ...interface{}) (Record, error)
|
||||
GetStruct(obj interface{}, sql string, args ...interface{}) error
|
||||
GetStructs(objPointerSlice interface{}, sql string, args ...interface{}) error
|
||||
GetScan(pointer interface{}, sql string, args ...interface{}) error
|
||||
GetValue(sql string, args ...interface{}) (Value, error)
|
||||
GetCount(sql string, args ...interface{}) (int64, error)
|
||||
|
||||
// ===========================================================================
|
||||
// CURD.
|
||||
// ===========================================================================
|
||||
|
||||
Insert(table string, data interface{}, batch ...int) (sql.Result, error)
|
||||
InsertIgnore(table string, data interface{}, batch ...int) (sql.Result, error)
|
||||
InsertAndGetId(table string, data interface{}, batch ...int) (int64, error)
|
||||
Replace(table string, data interface{}, batch ...int) (sql.Result, error)
|
||||
Save(table string, data interface{}, batch ...int) (sql.Result, error)
|
||||
Update(table string, data interface{}, condition interface{}, args ...interface{}) (sql.Result, error)
|
||||
Delete(table string, condition interface{}, args ...interface{}) (sql.Result, error)
|
||||
|
||||
// ===========================================================================
|
||||
// Utility methods.
|
||||
// ===========================================================================
|
||||
|
||||
GetCtx() context.Context
|
||||
GetDB() DB
|
||||
GetSqlTX() *sql.Tx
|
||||
IsClosed() bool
|
||||
|
||||
// ===========================================================================
|
||||
// Save point feature.
|
||||
// ===========================================================================
|
||||
|
||||
SavePoint(point string) error
|
||||
RollbackTo(point string) error
|
||||
}
|
||||
|
||||
// Core is the base struct for database management.
|
||||
type Core struct {
|
||||
db DB // DB interface object.
|
||||
@ -214,7 +279,7 @@ type DoCommitOutput struct {
|
||||
Result sql.Result // Result is the result of exec statement.
|
||||
Records []Record // Records is the result of query statement.
|
||||
Stmt *Stmt // Stmt is the Statement object result for Prepare.
|
||||
Tx *TX // Tx is the transaction object result for Begin.
|
||||
Tx TX // Tx is the transaction object result for Begin.
|
||||
RawResult interface{} // RawResult is the underlying result, which might be sql.Result/*sql.Rows/*sql.Row.
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
// TX is the struct for transaction management.
|
||||
type TX struct {
|
||||
// TXCore is the struct for transaction management.
|
||||
type TXCore struct {
|
||||
db DB // db is the current gdb database manager.
|
||||
tx *sql.Tx // tx is the raw and underlying transaction manager.
|
||||
ctx context.Context // ctx is the context for this transaction only.
|
||||
@ -42,11 +42,11 @@ var transactionIdGenerator = gtype.NewUint64()
|
||||
// You should call Commit or Rollback functions of the transaction object
|
||||
// if you no longer use the transaction. Commit or Rollback functions will also
|
||||
// close the transaction automatically.
|
||||
func (c *Core) Begin(ctx context.Context) (tx *TX, err error) {
|
||||
func (c *Core) Begin(ctx context.Context) (tx TX, err error) {
|
||||
return c.doBeginCtx(ctx)
|
||||
}
|
||||
|
||||
func (c *Core) doBeginCtx(ctx context.Context) (*TX, error) {
|
||||
func (c *Core) doBeginCtx(ctx context.Context) (TX, error) {
|
||||
master, err := c.db.Master()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -68,13 +68,13 @@ func (c *Core) doBeginCtx(ctx context.Context) (*TX, error) {
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function `f`
|
||||
// as it is automatically handled by this function.
|
||||
func (c *Core) Transaction(ctx context.Context, f func(ctx context.Context, tx *TX) error) (err error) {
|
||||
func (c *Core) Transaction(ctx context.Context, f func(ctx context.Context, tx TX) error) (err error) {
|
||||
if ctx == nil {
|
||||
ctx = c.db.GetCtx()
|
||||
}
|
||||
ctx = c.InjectInternalCtxData(ctx)
|
||||
// Check transaction object from context.
|
||||
var tx *TX
|
||||
var tx TX
|
||||
tx = TXFromCtx(ctx, c.db.GetGroup())
|
||||
if tx != nil {
|
||||
return tx.Transaction(ctx, f)
|
||||
@ -84,7 +84,7 @@ func (c *Core) Transaction(ctx context.Context, f func(ctx context.Context, tx *
|
||||
return err
|
||||
}
|
||||
// Inject transaction object into context.
|
||||
tx.ctx = WithTX(tx.ctx, tx)
|
||||
tx = tx.Ctx(WithTX(tx.GetCtx(), tx))
|
||||
defer func() {
|
||||
if err == nil {
|
||||
if exception := recover(); exception != nil {
|
||||
@ -105,22 +105,22 @@ func (c *Core) Transaction(ctx context.Context, f func(ctx context.Context, tx *
|
||||
}
|
||||
}
|
||||
}()
|
||||
err = f(tx.ctx, tx)
|
||||
err = f(tx.GetCtx(), tx)
|
||||
return
|
||||
}
|
||||
|
||||
// WithTX injects given transaction object into context and returns a new context.
|
||||
func WithTX(ctx context.Context, tx *TX) context.Context {
|
||||
func WithTX(ctx context.Context, tx TX) context.Context {
|
||||
if tx == nil {
|
||||
return ctx
|
||||
}
|
||||
// Check repeat injection from given.
|
||||
group := tx.db.GetGroup()
|
||||
if ctxTx := TXFromCtx(ctx, group); ctxTx != nil && ctxTx.db.GetGroup() == group {
|
||||
group := tx.GetDB().GetGroup()
|
||||
if ctxTx := TXFromCtx(ctx, group); ctxTx != nil && ctxTx.GetDB().GetGroup() == group {
|
||||
return ctx
|
||||
}
|
||||
dbCtx := tx.db.GetCtx()
|
||||
if ctxTx := TXFromCtx(dbCtx, group); ctxTx != nil && ctxTx.db.GetGroup() == group {
|
||||
dbCtx := tx.GetDB().GetCtx()
|
||||
if ctxTx := TXFromCtx(dbCtx, group); ctxTx != nil && ctxTx.GetDB().GetGroup() == group {
|
||||
return dbCtx
|
||||
}
|
||||
// Inject transaction object and id into context.
|
||||
@ -130,17 +130,17 @@ func WithTX(ctx context.Context, tx *TX) context.Context {
|
||||
|
||||
// TXFromCtx retrieves and returns transaction object from context.
|
||||
// It is usually used in nested transaction feature, and it returns nil if it is not set previously.
|
||||
func TXFromCtx(ctx context.Context, group string) *TX {
|
||||
func TXFromCtx(ctx context.Context, group string) TX {
|
||||
if ctx == nil {
|
||||
return nil
|
||||
}
|
||||
v := ctx.Value(transactionKeyForContext(group))
|
||||
if v != nil {
|
||||
tx := v.(*TX)
|
||||
tx := v.(TX)
|
||||
if tx.IsClosed() {
|
||||
return nil
|
||||
}
|
||||
tx.ctx = ctx
|
||||
tx = tx.Ctx(ctx)
|
||||
return tx
|
||||
}
|
||||
return nil
|
||||
@ -152,12 +152,12 @@ func transactionKeyForContext(group string) string {
|
||||
}
|
||||
|
||||
// transactionKeyForNestedPoint forms and returns the transaction key at current save point.
|
||||
func (tx *TX) transactionKeyForNestedPoint() string {
|
||||
func (tx *TXCore) transactionKeyForNestedPoint() string {
|
||||
return tx.db.GetCore().QuoteWord(transactionPointerPrefix + gconv.String(tx.transactionCount))
|
||||
}
|
||||
|
||||
// Ctx sets the context for current transaction.
|
||||
func (tx *TX) Ctx(ctx context.Context) *TX {
|
||||
func (tx *TXCore) Ctx(ctx context.Context) TX {
|
||||
tx.ctx = ctx
|
||||
if tx.ctx != nil {
|
||||
tx.ctx = tx.db.GetCore().InjectInternalCtxData(tx.ctx)
|
||||
@ -165,10 +165,25 @@ func (tx *TX) Ctx(ctx context.Context) *TX {
|
||||
return tx
|
||||
}
|
||||
|
||||
// GetCtx returns the context for current transaction.
|
||||
func (tx *TXCore) GetCtx() context.Context {
|
||||
return tx.ctx
|
||||
}
|
||||
|
||||
// GetDB returns the DB for current transaction.
|
||||
func (tx *TXCore) GetDB() DB {
|
||||
return tx.db
|
||||
}
|
||||
|
||||
// GetSqlTX returns the underlying transaction object for current transaction.
|
||||
func (tx *TXCore) GetSqlTX() *sql.Tx {
|
||||
return tx.tx
|
||||
}
|
||||
|
||||
// Commit commits current transaction.
|
||||
// Note that it releases previous saved transaction point if it's in a nested transaction procedure,
|
||||
// or else it commits the hole transaction.
|
||||
func (tx *TX) Commit() error {
|
||||
func (tx *TXCore) Commit() error {
|
||||
if tx.transactionCount > 0 {
|
||||
tx.transactionCount--
|
||||
_, err := tx.Exec("RELEASE SAVEPOINT " + tx.transactionKeyForNestedPoint())
|
||||
@ -189,7 +204,7 @@ func (tx *TX) Commit() error {
|
||||
// Rollback aborts current transaction.
|
||||
// Note that it aborts current transaction if it's in a nested transaction procedure,
|
||||
// or else it aborts the hole transaction.
|
||||
func (tx *TX) Rollback() error {
|
||||
func (tx *TXCore) Rollback() error {
|
||||
if tx.transactionCount > 0 {
|
||||
tx.transactionCount--
|
||||
_, err := tx.Exec("ROLLBACK TO SAVEPOINT " + tx.transactionKeyForNestedPoint())
|
||||
@ -208,12 +223,12 @@ func (tx *TX) Rollback() error {
|
||||
}
|
||||
|
||||
// IsClosed checks and returns this transaction has already been committed or rolled back.
|
||||
func (tx *TX) IsClosed() bool {
|
||||
func (tx *TXCore) IsClosed() bool {
|
||||
return tx.isClosed
|
||||
}
|
||||
|
||||
// Begin starts a nested transaction procedure.
|
||||
func (tx *TX) Begin() error {
|
||||
func (tx *TXCore) Begin() error {
|
||||
_, err := tx.Exec("SAVEPOINT " + tx.transactionKeyForNestedPoint())
|
||||
if err != nil {
|
||||
return err
|
||||
@ -224,14 +239,14 @@ func (tx *TX) Begin() error {
|
||||
|
||||
// SavePoint performs `SAVEPOINT xxx` SQL statement that saves transaction at current point.
|
||||
// The parameter `point` specifies the point name that will be saved to server.
|
||||
func (tx *TX) SavePoint(point string) error {
|
||||
func (tx *TXCore) SavePoint(point string) error {
|
||||
_, err := tx.Exec("SAVEPOINT " + tx.db.GetCore().QuoteWord(point))
|
||||
return err
|
||||
}
|
||||
|
||||
// RollbackTo performs `ROLLBACK TO SAVEPOINT xxx` SQL statement that rollbacks to specified saved transaction.
|
||||
// The parameter `point` specifies the point name that was saved previously.
|
||||
func (tx *TX) RollbackTo(point string) error {
|
||||
func (tx *TXCore) RollbackTo(point string) error {
|
||||
_, err := tx.Exec("ROLLBACK TO SAVEPOINT " + tx.db.GetCore().QuoteWord(point))
|
||||
return err
|
||||
}
|
||||
@ -243,7 +258,7 @@ func (tx *TX) RollbackTo(point string) error {
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function `f`
|
||||
// as it is automatically handled by this function.
|
||||
func (tx *TX) Transaction(ctx context.Context, f func(ctx context.Context, tx *TX) error) (err error) {
|
||||
func (tx *TXCore) Transaction(ctx context.Context, f func(ctx context.Context, tx TX) error) (err error) {
|
||||
if ctx != nil {
|
||||
tx.ctx = ctx
|
||||
}
|
||||
@ -282,13 +297,13 @@ func (tx *TX) Transaction(ctx context.Context, f func(ctx context.Context, tx *T
|
||||
|
||||
// Query does query operation on transaction.
|
||||
// See Core.Query.
|
||||
func (tx *TX) Query(sql string, args ...interface{}) (result Result, err error) {
|
||||
func (tx *TXCore) Query(sql string, args ...interface{}) (result Result, err error) {
|
||||
return tx.db.DoQuery(tx.ctx, &txLink{tx.tx}, sql, args...)
|
||||
}
|
||||
|
||||
// Exec does none query operation on transaction.
|
||||
// See Core.Exec.
|
||||
func (tx *TX) Exec(sql string, args ...interface{}) (sql.Result, error) {
|
||||
func (tx *TXCore) Exec(sql string, args ...interface{}) (sql.Result, error) {
|
||||
return tx.db.DoExec(tx.ctx, &txLink{tx.tx}, sql, args...)
|
||||
}
|
||||
|
||||
@ -297,17 +312,17 @@ func (tx *TX) Exec(sql string, args ...interface{}) (sql.Result, error) {
|
||||
// returned statement.
|
||||
// The caller must call the statement's Close method
|
||||
// when the statement is no longer needed.
|
||||
func (tx *TX) Prepare(sql string) (*Stmt, error) {
|
||||
func (tx *TXCore) Prepare(sql string) (*Stmt, error) {
|
||||
return tx.db.DoPrepare(tx.ctx, &txLink{tx.tx}, sql)
|
||||
}
|
||||
|
||||
// GetAll queries and returns data records from database.
|
||||
func (tx *TX) GetAll(sql string, args ...interface{}) (Result, error) {
|
||||
func (tx *TXCore) GetAll(sql string, args ...interface{}) (Result, error) {
|
||||
return tx.Query(sql, args...)
|
||||
}
|
||||
|
||||
// GetOne queries and returns one record from database.
|
||||
func (tx *TX) GetOne(sql string, args ...interface{}) (Record, error) {
|
||||
func (tx *TXCore) GetOne(sql string, args ...interface{}) (Record, error) {
|
||||
list, err := tx.GetAll(sql, args...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -320,7 +335,7 @@ func (tx *TX) GetOne(sql string, args ...interface{}) (Record, error) {
|
||||
|
||||
// GetStruct queries one record from database and converts it to given struct.
|
||||
// The parameter `pointer` should be a pointer to struct.
|
||||
func (tx *TX) GetStruct(obj interface{}, sql string, args ...interface{}) error {
|
||||
func (tx *TXCore) GetStruct(obj interface{}, sql string, args ...interface{}) error {
|
||||
one, err := tx.GetOne(sql, args...)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -330,7 +345,7 @@ func (tx *TX) GetStruct(obj interface{}, sql string, args ...interface{}) error
|
||||
|
||||
// GetStructs queries records from database and converts them to given struct.
|
||||
// The parameter `pointer` should be type of struct slice: []struct/[]*struct.
|
||||
func (tx *TX) GetStructs(objPointerSlice interface{}, sql string, args ...interface{}) error {
|
||||
func (tx *TXCore) GetStructs(objPointerSlice interface{}, sql string, args ...interface{}) error {
|
||||
all, err := tx.GetAll(sql, args...)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -344,7 +359,7 @@ func (tx *TX) GetStructs(objPointerSlice interface{}, sql string, args ...interf
|
||||
// If parameter `pointer` is type of struct pointer, it calls GetStruct internally for
|
||||
// the conversion. If parameter `pointer` is type of slice, it calls GetStructs internally
|
||||
// for conversion.
|
||||
func (tx *TX) GetScan(pointer interface{}, sql string, args ...interface{}) error {
|
||||
func (tx *TXCore) GetScan(pointer interface{}, sql string, args ...interface{}) error {
|
||||
reflectInfo := reflection.OriginTypeAndKind(pointer)
|
||||
if reflectInfo.InputKind != reflect.Ptr {
|
||||
return gerror.NewCodef(
|
||||
@ -370,7 +385,7 @@ func (tx *TX) GetScan(pointer interface{}, sql string, args ...interface{}) erro
|
||||
// GetValue queries and returns the field value from database.
|
||||
// The sql should query only one field from database, or else it returns only one
|
||||
// field of the result.
|
||||
func (tx *TX) GetValue(sql string, args ...interface{}) (Value, error) {
|
||||
func (tx *TXCore) GetValue(sql string, args ...interface{}) (Value, error) {
|
||||
one, err := tx.GetOne(sql, args...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -382,7 +397,7 @@ func (tx *TX) GetValue(sql string, args ...interface{}) (Value, error) {
|
||||
}
|
||||
|
||||
// GetCount queries and returns the count from database.
|
||||
func (tx *TX) GetCount(sql string, args ...interface{}) (int64, error) {
|
||||
func (tx *TXCore) GetCount(sql string, args ...interface{}) (int64, error) {
|
||||
if !gregex.IsMatchString(`(?i)SELECT\s+COUNT\(.+\)\s+FROM`, sql) {
|
||||
sql, _ = gregex.ReplaceString(`(?i)(SELECT)\s+(.+)\s+(FROM)`, `$1 COUNT($2) $3`, sql)
|
||||
}
|
||||
@ -402,7 +417,7 @@ func (tx *TX) GetCount(sql string, args ...interface{}) (int64, error) {
|
||||
// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
|
||||
//
|
||||
// The parameter `batch` specifies the batch operation count when given data is slice.
|
||||
func (tx *TX) Insert(table string, data interface{}, batch ...int) (sql.Result, error) {
|
||||
func (tx *TXCore) Insert(table string, data interface{}, batch ...int) (sql.Result, error) {
|
||||
if len(batch) > 0 {
|
||||
return tx.Model(table).Ctx(tx.ctx).Data(data).Batch(batch[0]).Insert()
|
||||
}
|
||||
@ -418,7 +433,7 @@ func (tx *TX) Insert(table string, data interface{}, batch ...int) (sql.Result,
|
||||
// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
|
||||
//
|
||||
// The parameter `batch` specifies the batch operation count when given data is slice.
|
||||
func (tx *TX) InsertIgnore(table string, data interface{}, batch ...int) (sql.Result, error) {
|
||||
func (tx *TXCore) InsertIgnore(table string, data interface{}, batch ...int) (sql.Result, error) {
|
||||
if len(batch) > 0 {
|
||||
return tx.Model(table).Ctx(tx.ctx).Data(data).Batch(batch[0]).InsertIgnore()
|
||||
}
|
||||
@ -426,7 +441,7 @@ func (tx *TX) InsertIgnore(table string, data interface{}, batch ...int) (sql.Re
|
||||
}
|
||||
|
||||
// InsertAndGetId performs action Insert and returns the last insert id that automatically generated.
|
||||
func (tx *TX) InsertAndGetId(table string, data interface{}, batch ...int) (int64, error) {
|
||||
func (tx *TXCore) InsertAndGetId(table string, data interface{}, batch ...int) (int64, error) {
|
||||
if len(batch) > 0 {
|
||||
return tx.Model(table).Ctx(tx.ctx).Data(data).Batch(batch[0]).InsertAndGetId()
|
||||
}
|
||||
@ -445,7 +460,7 @@ func (tx *TX) InsertAndGetId(table string, data interface{}, batch ...int) (int6
|
||||
// The parameter `data` can be type of map/gmap/struct/*struct/[]map/[]struct, etc.
|
||||
// If given data is type of slice, it then does batch replacing, and the optional parameter
|
||||
// `batch` specifies the batch operation count.
|
||||
func (tx *TX) Replace(table string, data interface{}, batch ...int) (sql.Result, error) {
|
||||
func (tx *TXCore) Replace(table string, data interface{}, batch ...int) (sql.Result, error) {
|
||||
if len(batch) > 0 {
|
||||
return tx.Model(table).Ctx(tx.ctx).Data(data).Batch(batch[0]).Replace()
|
||||
}
|
||||
@ -463,7 +478,7 @@ func (tx *TX) Replace(table string, data interface{}, batch ...int) (sql.Result,
|
||||
//
|
||||
// If given data is type of slice, it then does batch saving, and the optional parameter
|
||||
// `batch` specifies the batch operation count.
|
||||
func (tx *TX) Save(table string, data interface{}, batch ...int) (sql.Result, error) {
|
||||
func (tx *TXCore) Save(table string, data interface{}, batch ...int) (sql.Result, error) {
|
||||
if len(batch) > 0 {
|
||||
return tx.Model(table).Ctx(tx.ctx).Data(data).Batch(batch[0]).Save()
|
||||
}
|
||||
@ -484,7 +499,7 @@ func (tx *TX) Save(table string, data interface{}, batch ...int) (sql.Result, er
|
||||
// "status IN (?)", g.Slice{1,2,3}
|
||||
// "age IN(?,?)", 18, 50
|
||||
// User{ Id : 1, UserName : "john"}.
|
||||
func (tx *TX) Update(table string, data interface{}, condition interface{}, args ...interface{}) (sql.Result, error) {
|
||||
func (tx *TXCore) Update(table string, data interface{}, condition interface{}, args ...interface{}) (sql.Result, error) {
|
||||
return tx.Model(table).Ctx(tx.ctx).Data(data).Where(condition, args...).Update()
|
||||
}
|
||||
|
||||
@ -499,6 +514,6 @@ func (tx *TX) Update(table string, data interface{}, condition interface{}, args
|
||||
// "status IN (?)", g.Slice{1,2,3}
|
||||
// "age IN(?,?)", 18, 50
|
||||
// User{ Id : 1, UserName : "john"}.
|
||||
func (tx *TX) Delete(table string, condition interface{}, args ...interface{}) (sql.Result, error) {
|
||||
func (tx *TXCore) Delete(table string, condition interface{}, args ...interface{}) (sql.Result, error) {
|
||||
return tx.Model(table).Ctx(tx.ctx).Where(condition, args...).Delete()
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ func (c *Core) DoQuery(ctx context.Context, link Link, sql string, args ...inter
|
||||
if link == nil {
|
||||
if tx := TXFromCtx(ctx, c.db.GetGroup()); tx != nil {
|
||||
// Firstly, check and retrieve transaction link from context.
|
||||
link = &txLink{tx.tx}
|
||||
link = &txLink{tx.GetSqlTX()}
|
||||
} else if link, err = c.SlaveLink(); err != nil {
|
||||
// Or else it creates one from master node.
|
||||
return nil, err
|
||||
@ -44,7 +44,7 @@ func (c *Core) DoQuery(ctx context.Context, link Link, sql string, args ...inter
|
||||
} else if !link.IsTransaction() {
|
||||
// If current link is not transaction link, it checks and retrieves transaction from context.
|
||||
if tx := TXFromCtx(ctx, c.db.GetGroup()); tx != nil {
|
||||
link = &txLink{tx.tx}
|
||||
link = &txLink{tx.GetSqlTX()}
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ func (c *Core) DoExec(ctx context.Context, link Link, sql string, args ...interf
|
||||
if link == nil {
|
||||
if tx := TXFromCtx(ctx, c.db.GetGroup()); tx != nil {
|
||||
// Firstly, check and retrieve transaction link from context.
|
||||
link = &txLink{tx.tx}
|
||||
link = &txLink{tx.GetSqlTX()}
|
||||
} else if link, err = c.MasterLink(); err != nil {
|
||||
// Or else it creates one from master node.
|
||||
return nil, err
|
||||
@ -103,7 +103,7 @@ func (c *Core) DoExec(ctx context.Context, link Link, sql string, args ...interf
|
||||
} else if !link.IsTransaction() {
|
||||
// If current link is not transaction link, it checks and retrieves transaction from context.
|
||||
if tx := TXFromCtx(ctx, c.db.GetGroup()); tx != nil {
|
||||
link = &txLink{tx.tx}
|
||||
link = &txLink{tx.GetSqlTX()}
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,14 +177,14 @@ func (c *Core) DoCommit(ctx context.Context, in DoCommitInput) (out DoCommitOutp
|
||||
switch in.Type {
|
||||
case SqlTypeBegin:
|
||||
if sqlTx, err = in.Db.Begin(); err == nil {
|
||||
out.Tx = &TX{
|
||||
out.Tx = &TXCore{
|
||||
db: c.db,
|
||||
tx: sqlTx,
|
||||
ctx: context.WithValue(ctx, transactionIdForLoggerCtx, transactionIdGenerator.Add(1)),
|
||||
master: in.Db,
|
||||
transactionId: guid.S(),
|
||||
}
|
||||
ctx = out.Tx.ctx
|
||||
ctx = out.Tx.GetCtx()
|
||||
}
|
||||
out.RawResult = sqlTx
|
||||
|
||||
@ -319,7 +319,7 @@ func (c *Core) DoPrepare(ctx context.Context, link Link, sql string) (stmt *Stmt
|
||||
if link == nil {
|
||||
if tx := TXFromCtx(ctx, c.db.GetGroup()); tx != nil {
|
||||
// Firstly, check and retrieve transaction link from context.
|
||||
link = &txLink{tx.tx}
|
||||
link = &txLink{tx.GetSqlTX()}
|
||||
} else {
|
||||
// Or else it creates one from master node.
|
||||
var err error
|
||||
@ -330,7 +330,7 @@ func (c *Core) DoPrepare(ctx context.Context, link Link, sql string) (stmt *Stmt
|
||||
} else if !link.IsTransaction() {
|
||||
// If current link is not transaction link, it checks and retrieves transaction from context.
|
||||
if tx := TXFromCtx(ctx, c.db.GetGroup()); tx != nil {
|
||||
link = &txLink{tx.tx}
|
||||
link = &txLink{tx.GetSqlTX()}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ func (c *Core) GetDB() DB {
|
||||
func (c *Core) GetLink(ctx context.Context, master bool, schema string) (Link, error) {
|
||||
tx := TXFromCtx(ctx, c.db.GetGroup())
|
||||
if tx != nil {
|
||||
return &txLink{tx.tx}, nil
|
||||
return &txLink{tx.GetSqlTX()}, nil
|
||||
}
|
||||
if master {
|
||||
link, err := c.db.GetCore().MasterLink(schema)
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
// Model is core struct implementing the DAO for ORM.
|
||||
type Model struct {
|
||||
db DB // Underlying DB interface.
|
||||
tx *TX // Underlying TX interface.
|
||||
tx TX // Underlying TX interface.
|
||||
rawSql string // rawSql is the raw SQL string which marks a raw SQL based Model not a table based Model.
|
||||
schema string // Custom database schema.
|
||||
linkType int // Mark for operation on master or slave.
|
||||
@ -165,7 +165,7 @@ func (m *Model) Raw(rawSql string, args ...interface{}) *Model {
|
||||
return model
|
||||
}
|
||||
|
||||
func (tx *TX) Raw(rawSql string, args ...interface{}) *Model {
|
||||
func (tx *TXCore) Raw(rawSql string, args ...interface{}) *Model {
|
||||
return tx.Model().Raw(rawSql, args...)
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ func (c *Core) With(objects ...interface{}) *Model {
|
||||
|
||||
// Model acts like Core.Model except it operates on transaction.
|
||||
// See Core.Model.
|
||||
func (tx *TX) Model(tableNameQueryOrStruct ...interface{}) *Model {
|
||||
func (tx *TXCore) Model(tableNameQueryOrStruct ...interface{}) *Model {
|
||||
model := tx.db.Model(tableNameQueryOrStruct...)
|
||||
model.db = tx.db
|
||||
model.tx = tx
|
||||
@ -185,7 +185,7 @@ func (tx *TX) Model(tableNameQueryOrStruct ...interface{}) *Model {
|
||||
|
||||
// With acts like Core.With except it operates on transaction.
|
||||
// See Core.With.
|
||||
func (tx *TX) With(object interface{}) *Model {
|
||||
func (tx *TXCore) With(object interface{}) *Model {
|
||||
return tx.Model().With(object)
|
||||
}
|
||||
|
||||
@ -205,8 +205,8 @@ func (m *Model) Ctx(ctx context.Context) *Model {
|
||||
// GetCtx returns the context for current Model.
|
||||
// It returns `context.Background()` is there's no context previously set.
|
||||
func (m *Model) GetCtx() context.Context {
|
||||
if m.tx != nil && m.tx.ctx != nil {
|
||||
return m.tx.ctx
|
||||
if m.tx != nil && m.tx.GetCtx() != nil {
|
||||
return m.tx.GetCtx()
|
||||
}
|
||||
return m.db.GetCtx()
|
||||
}
|
||||
@ -238,9 +238,9 @@ func (m *Model) DB(db DB) *Model {
|
||||
}
|
||||
|
||||
// TX sets/changes the transaction for current operation.
|
||||
func (m *Model) TX(tx *TX) *Model {
|
||||
func (m *Model) TX(tx TX) *Model {
|
||||
model := m.getModel()
|
||||
model.db = tx.db
|
||||
model.db = tx.GetDB()
|
||||
model.tx = tx
|
||||
return model
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
//
|
||||
// Note that, you should not Commit or Rollback the transaction in function `f`
|
||||
// as it is automatically handled by this function.
|
||||
func (m *Model) Transaction(ctx context.Context, f func(ctx context.Context, tx *TX) error) (err error) {
|
||||
func (m *Model) Transaction(ctx context.Context, f func(ctx context.Context, tx TX) error) (err error) {
|
||||
if ctx == nil {
|
||||
ctx = m.GetCtx()
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ func (m *Model) doMappingAndFilterForInsertOrUpdateDataMap(data Map, allowOmitEm
|
||||
// The parameter `master` specifies whether using the master node if master-slave configured.
|
||||
func (m *Model) getLink(master bool) Link {
|
||||
if m.tx != nil {
|
||||
return &txLink{m.tx.tx}
|
||||
return &txLink{m.tx.GetSqlTX()}
|
||||
}
|
||||
linkType := m.linkType
|
||||
if linkType == 0 {
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func Example_transaction() {
|
||||
g.DB().Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
||||
g.DB().Transaction(context.TODO(), func(ctx context.Context, tx gdb.TX) error {
|
||||
// user
|
||||
result, err := tx.Insert("user", g.Map{
|
||||
"passport": "john",
|
||||
|
@ -13,22 +13,66 @@
|
||||
// Redis Chinese Documentation: http://redisdoc.com/
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
)
|
||||
|
||||
// AdapterFunc is the function creating redis adapter.
|
||||
type AdapterFunc func(config *Config) Adapter
|
||||
|
||||
var (
|
||||
// defaultAdapterFunc is the default adapter function creating redis adapter.
|
||||
defaultAdapterFunc AdapterFunc = func(config *Config) Adapter {
|
||||
return nil
|
||||
}
|
||||
)
|
||||
|
||||
// New creates and returns a redis client.
|
||||
// It creates a default redis adapter of go-redis.
|
||||
func New(config ...*Config) (*Redis, error) {
|
||||
var (
|
||||
usedConfig *Config
|
||||
usedAdapter Adapter
|
||||
)
|
||||
if len(config) > 0 && config[0] != nil {
|
||||
// Redis client with go redis implements adapter from given configuration.
|
||||
return &Redis{adapter: NewAdapterGoRedis(config[0])}, nil
|
||||
usedConfig = config[0]
|
||||
usedAdapter = defaultAdapterFunc(config[0])
|
||||
} else if configFromGlobal, ok := GetConfig(); ok {
|
||||
// Redis client with go redis implements adapter from package configuration.
|
||||
usedConfig = configFromGlobal
|
||||
usedAdapter = defaultAdapterFunc(configFromGlobal)
|
||||
}
|
||||
// Redis client with go redis implements adapter from package configuration.
|
||||
if configFromGlobal, ok := GetConfig(); ok {
|
||||
return &Redis{adapter: NewAdapterGoRedis(configFromGlobal)}, nil
|
||||
if usedConfig == nil {
|
||||
return nil, gerror.NewCode(
|
||||
gcode.CodeInvalidConfiguration,
|
||||
`no configuration found for creating Redis client`,
|
||||
)
|
||||
}
|
||||
// Redis client with empty adapter.
|
||||
return &Redis{}, nil
|
||||
if usedAdapter == nil {
|
||||
return nil, gerror.NewCode(
|
||||
gcode.CodeNecessaryPackageNotImport,
|
||||
errorNilAdapter,
|
||||
)
|
||||
}
|
||||
redis := &Redis{
|
||||
config: config[0],
|
||||
localAdapter: defaultAdapterFunc(config[0]),
|
||||
}
|
||||
return redis.initGroup(), nil
|
||||
}
|
||||
|
||||
// NewWithAdapter creates and returns a redis client with given adapter.
|
||||
func NewWithAdapter(adapter Adapter) *Redis {
|
||||
return &Redis{adapter: adapter}
|
||||
func NewWithAdapter(adapter Adapter) (*Redis, error) {
|
||||
if adapter == nil {
|
||||
return nil, gerror.NewCodef(gcode.CodeInvalidParameter, `adapter cannot be nil`)
|
||||
}
|
||||
redis := &Redis{localAdapter: adapter}
|
||||
return redis.initGroup(), nil
|
||||
}
|
||||
|
||||
// RegisterAdapterFunc registers default function creating redis adapter.
|
||||
func RegisterAdapterFunc(adapterFunc AdapterFunc) {
|
||||
defaultAdapterFunc = adapterFunc
|
||||
}
|
||||
|
@ -14,6 +14,12 @@ import (
|
||||
|
||||
// Adapter is an interface for universal redis operations.
|
||||
type Adapter interface {
|
||||
AdapterGroup
|
||||
|
||||
// Do send a command to the server and returns the received reply.
|
||||
// It uses json.Marshal for struct/slice/map type values before committing them to redis.
|
||||
Do(ctx context.Context, command string, args ...interface{}) (*gvar.Var, error)
|
||||
|
||||
// Conn retrieves and returns a connection object for continuous operations.
|
||||
// Note that you should call Close function manually if you do not use this connection any further.
|
||||
Conn(ctx context.Context) (conn Conn, err error)
|
||||
@ -24,13 +30,49 @@ type Adapter interface {
|
||||
|
||||
// Conn is an interface of a connection from universal redis client.
|
||||
type Conn interface {
|
||||
ConnCommand
|
||||
|
||||
// Do send a command to the server and returns the received reply.
|
||||
// It uses json.Marshal for struct/slice/map type values before committing them to redis.
|
||||
Do(ctx context.Context, command string, args ...interface{}) (result *gvar.Var, err error)
|
||||
|
||||
// Receive receives a single reply as gvar.Var from the Redis server.
|
||||
Receive(ctx context.Context) (result *gvar.Var, err error)
|
||||
|
||||
// Close puts the connection back to connection pool.
|
||||
Close(ctx context.Context) (err error)
|
||||
}
|
||||
|
||||
// AdapterGroup is an interface managing group operations for redis.
|
||||
type AdapterGroup interface {
|
||||
GroupGeneric() IGroupGeneric
|
||||
GroupHash() IGroupHash
|
||||
GroupList() IGroupList
|
||||
GroupPubSub() IGroupPubSub
|
||||
GroupScript() IGroupScript
|
||||
GroupSet() IGroupSet
|
||||
GroupSortedSet() IGroupSortedSet
|
||||
GroupString() IGroupString
|
||||
}
|
||||
|
||||
// ConnCommand is an interface managing some operations bound to certain connection.
|
||||
type ConnCommand interface {
|
||||
// Subscribe subscribes the client to the specified channels.
|
||||
// https://redis.io/commands/subscribe/
|
||||
Subscribe(ctx context.Context, channel string, channels ...string) ([]*Subscription, error)
|
||||
|
||||
// PSubscribe subscribes the client to the given patterns.
|
||||
//
|
||||
// Supported glob-style patterns:
|
||||
// - h?llo subscribes to hello, hallo and hxllo
|
||||
// - h*llo subscribes to hllo and heeeello
|
||||
// - h[ae]llo subscribes to hello and hallo, but not hillo
|
||||
//
|
||||
// Use \ to escape special characters if you want to match them verbatim.
|
||||
//
|
||||
// https://redis.io/commands/psubscribe/
|
||||
PSubscribe(ctx context.Context, pattern string, patterns ...string) ([]*Subscription, error)
|
||||
|
||||
// ReceiveMessage receives a single message of subscription from the Redis server.
|
||||
ReceiveMessage(ctx context.Context) (*Message, error)
|
||||
|
||||
// Receive receives a single reply as gvar.Var from the Redis server.
|
||||
Receive(ctx context.Context) (result *gvar.Var, err error)
|
||||
}
|
||||
|
@ -1,118 +0,0 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
type localAdapterGoRedisConn struct {
|
||||
ps *redis.PubSub
|
||||
redis *AdapterGoRedis
|
||||
}
|
||||
|
||||
// Do send a command to the server and returns the received reply.
|
||||
// It uses json.Marshal for struct/slice/map type values before committing them to redis.
|
||||
func (c *localAdapterGoRedisConn) Do(ctx context.Context, command string, args ...interface{}) (reply *gvar.Var, err error) {
|
||||
argStrSlice := gconv.Strings(args)
|
||||
switch gstr.ToLower(command) {
|
||||
case `subscribe`:
|
||||
c.ps = c.redis.client.Subscribe(ctx, argStrSlice...)
|
||||
|
||||
case `psubscribe`:
|
||||
c.ps = c.redis.client.PSubscribe(ctx, argStrSlice...)
|
||||
|
||||
case `unsubscribe`:
|
||||
if c.ps != nil {
|
||||
err = c.ps.Unsubscribe(ctx, argStrSlice...)
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis PubSub Unsubscribe failed with arguments "%v"`, argStrSlice)
|
||||
}
|
||||
}
|
||||
|
||||
case `punsubscribe`:
|
||||
if c.ps != nil {
|
||||
err = c.ps.PUnsubscribe(ctx, argStrSlice...)
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis PubSub PUnsubscribe failed with arguments "%v"`, argStrSlice)
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
arguments := make([]interface{}, len(args)+1)
|
||||
copy(arguments, []interface{}{command})
|
||||
copy(arguments[1:], args)
|
||||
reply, err = c.resultToVar(c.redis.client.Do(ctx, arguments...).Result())
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis Client Do failed with arguments "%v"`, arguments)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// resultToVar converts redis operation result to gvar.Var.
|
||||
func (c *localAdapterGoRedisConn) resultToVar(result interface{}, err error) (*gvar.Var, error) {
|
||||
if err == redis.Nil {
|
||||
err = nil
|
||||
}
|
||||
if err == nil {
|
||||
switch v := result.(type) {
|
||||
case []byte:
|
||||
return gvar.New(string(v)), err
|
||||
|
||||
case []interface{}:
|
||||
return gvar.New(gconv.Strings(v)), err
|
||||
|
||||
case *redis.Message:
|
||||
result = &Message{
|
||||
Channel: v.Channel,
|
||||
Pattern: v.Pattern,
|
||||
Payload: v.Payload,
|
||||
PayloadSlice: v.PayloadSlice,
|
||||
}
|
||||
|
||||
case *redis.Subscription:
|
||||
result = &Subscription{
|
||||
Kind: v.Kind,
|
||||
Channel: v.Channel,
|
||||
Count: v.Count,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return gvar.New(result), err
|
||||
}
|
||||
|
||||
// Receive receives a single reply as gvar.Var from the Redis server.
|
||||
func (c *localAdapterGoRedisConn) Receive(ctx context.Context) (*gvar.Var, error) {
|
||||
if c.ps != nil {
|
||||
v, err := c.resultToVar(c.ps.Receive(ctx))
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis PubSub Receive failed`)
|
||||
}
|
||||
return v, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Close closes current PubSub or puts the connection back to connection pool.
|
||||
func (c *localAdapterGoRedisConn) Close(ctx context.Context) (err error) {
|
||||
if c.ps != nil {
|
||||
err = c.ps.Close()
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `Redis PubSub Close failed`)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
@ -14,6 +14,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// localInstances for instance management of redis client.
|
||||
localInstances = gmap.NewStrAnyMap(true)
|
||||
)
|
||||
|
||||
|
@ -12,24 +12,70 @@ import (
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
)
|
||||
|
||||
// Redis client.
|
||||
type Redis struct {
|
||||
adapter Adapter
|
||||
config *Config
|
||||
localAdapter
|
||||
localGroup
|
||||
}
|
||||
|
||||
type (
|
||||
localGroup struct {
|
||||
localGroupGeneric
|
||||
localGroupHash
|
||||
localGroupList
|
||||
localGroupPubSub
|
||||
localGroupScript
|
||||
localGroupSet
|
||||
localGroupSortedSet
|
||||
localGroupString
|
||||
}
|
||||
localAdapter = Adapter
|
||||
localGroupGeneric = IGroupGeneric
|
||||
localGroupHash = IGroupHash
|
||||
localGroupList = IGroupList
|
||||
localGroupPubSub = IGroupPubSub
|
||||
localGroupScript = IGroupScript
|
||||
localGroupSet = IGroupSet
|
||||
localGroupSortedSet = IGroupSortedSet
|
||||
localGroupString = IGroupString
|
||||
)
|
||||
|
||||
const (
|
||||
errorNilRedis = `the Redis object is nil`
|
||||
)
|
||||
|
||||
// SetAdapter sets custom adapter for current redis client.
|
||||
var (
|
||||
errorNilAdapter = gstr.Trim(gstr.Replace(`
|
||||
redis adapter is not set, missing configuration or adapter register?
|
||||
possible reference: https://github.com/gogf/gf/tree/master/contrib/nosql/redis
|
||||
`, "\n", ""))
|
||||
)
|
||||
|
||||
// initGroup initializes the group object of redis.
|
||||
func (r *Redis) initGroup() *Redis {
|
||||
r.localGroup = localGroup{
|
||||
localGroupGeneric: r.localAdapter.GroupGeneric(),
|
||||
localGroupHash: r.localAdapter.GroupHash(),
|
||||
localGroupList: r.localAdapter.GroupList(),
|
||||
localGroupPubSub: r.localAdapter.GroupPubSub(),
|
||||
localGroupScript: r.localAdapter.GroupScript(),
|
||||
localGroupSet: r.localAdapter.GroupSet(),
|
||||
localGroupSortedSet: r.localAdapter.GroupSortedSet(),
|
||||
localGroupString: r.localAdapter.GroupString(),
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
// SetAdapter changes the underlying adapter with custom adapter for current redis client.
|
||||
func (r *Redis) SetAdapter(adapter Adapter) {
|
||||
if r == nil {
|
||||
return
|
||||
panic(gerror.NewCode(gcode.CodeInvalidParameter, errorNilRedis))
|
||||
}
|
||||
r.adapter = adapter
|
||||
r.localAdapter = adapter
|
||||
}
|
||||
|
||||
// GetAdapter returns the adapter that is set in current redis client.
|
||||
@ -37,29 +83,19 @@ func (r *Redis) GetAdapter() Adapter {
|
||||
if r == nil {
|
||||
return nil
|
||||
}
|
||||
return r.adapter
|
||||
return r.localAdapter
|
||||
}
|
||||
|
||||
// Conn retrieves and returns a connection object for continuous operations.
|
||||
// Note that you should call Close function manually if you do not use this connection any further.
|
||||
func (r *Redis) Conn(ctx context.Context) (*RedisConn, error) {
|
||||
func (r *Redis) Conn(ctx context.Context) (Conn, error) {
|
||||
if r == nil {
|
||||
return nil, gerror.NewCode(gcode.CodeInvalidParameter, errorNilRedis)
|
||||
}
|
||||
if r.adapter == nil {
|
||||
return nil, gerror.NewCodef(
|
||||
gcode.CodeMissingConfiguration,
|
||||
`redis adapter not initialized, missing configuration or adapter register?`,
|
||||
)
|
||||
if r.localAdapter == nil {
|
||||
return nil, gerror.NewCode(gcode.CodeNecessaryPackageNotImport, errorNilAdapter)
|
||||
}
|
||||
conn, err := r.adapter.Conn(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &RedisConn{
|
||||
conn: conn,
|
||||
redis: r,
|
||||
}, nil
|
||||
return r.localAdapter.Conn(ctx)
|
||||
}
|
||||
|
||||
// Do send a command to the server and returns the received reply.
|
||||
@ -68,20 +104,14 @@ func (r *Redis) Do(ctx context.Context, command string, args ...interface{}) (*g
|
||||
if r == nil {
|
||||
return nil, gerror.NewCode(gcode.CodeInvalidParameter, errorNilRedis)
|
||||
}
|
||||
conn, err := r.Conn(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if r.localAdapter == nil {
|
||||
return nil, gerror.NewCodef(gcode.CodeMissingConfiguration, errorNilAdapter)
|
||||
}
|
||||
defer func() {
|
||||
if closeErr := conn.Close(ctx); closeErr != nil {
|
||||
intlog.Errorf(ctx, `%+v`, closeErr)
|
||||
}
|
||||
}()
|
||||
return conn.Do(ctx, command, args...)
|
||||
return r.localAdapter.Do(ctx, command, args...)
|
||||
}
|
||||
|
||||
// MustConn performs as function Conn, but it panics if any error occurs internally.
|
||||
func (r *Redis) MustConn(ctx context.Context) *RedisConn {
|
||||
func (r *Redis) MustConn(ctx context.Context) Conn {
|
||||
c, err := r.Conn(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -100,8 +130,8 @@ func (r *Redis) MustDo(ctx context.Context, command string, args ...interface{})
|
||||
|
||||
// Close closes current redis client, closes its connection pool and releases all its related resources.
|
||||
func (r *Redis) Close(ctx context.Context) error {
|
||||
if r == nil {
|
||||
return gerror.NewCode(gcode.CodeInvalidParameter, errorNilRedis)
|
||||
if r == nil || r.localAdapter == nil {
|
||||
return nil
|
||||
}
|
||||
return r.adapter.Close(ctx)
|
||||
return r.localAdapter.Close(ctx)
|
||||
}
|
||||
|
@ -1,81 +0,0 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
"github.com/gogf/gf/v2"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/reflection"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// RedisConn is a connection of redis client.
|
||||
type RedisConn struct {
|
||||
conn Conn
|
||||
redis *Redis
|
||||
}
|
||||
|
||||
// Do send a command to the server and returns the received reply.
|
||||
// It uses json.Marshal for struct/slice/map type values before committing them to redis.
|
||||
func (c *RedisConn) Do(ctx context.Context, command string, args ...interface{}) (reply *gvar.Var, err error) {
|
||||
if ctx == nil {
|
||||
ctx = context.Background()
|
||||
}
|
||||
for k, v := range args {
|
||||
var (
|
||||
reflectInfo = reflection.OriginTypeAndKind(v)
|
||||
)
|
||||
switch reflectInfo.OriginKind {
|
||||
case
|
||||
reflect.Struct,
|
||||
reflect.Map,
|
||||
reflect.Slice,
|
||||
reflect.Array:
|
||||
// Ignore slice type of: []byte.
|
||||
if _, ok := v.([]byte); !ok {
|
||||
if args[k], err = json.Marshal(v); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Trace span start.
|
||||
tr := otel.GetTracerProvider().Tracer(traceInstrumentName, trace.WithInstrumentationVersion(gf.VERSION))
|
||||
_, span := tr.Start(ctx, "Redis."+command, trace.WithSpanKind(trace.SpanKindInternal))
|
||||
defer span.End()
|
||||
|
||||
timestampMilli1 := gtime.TimestampMilli()
|
||||
reply, err = c.conn.Do(ctx, command, args...)
|
||||
timestampMilli2 := gtime.TimestampMilli()
|
||||
|
||||
// Trace span end.
|
||||
c.traceSpanEnd(ctx, span, &traceItem{
|
||||
err: err,
|
||||
command: command,
|
||||
args: args,
|
||||
costMilli: timestampMilli2 - timestampMilli1,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// Receive receives a single reply as gvar.Var from the Redis server.
|
||||
func (c *RedisConn) Receive(ctx context.Context) (*gvar.Var, error) {
|
||||
return c.conn.Receive(ctx)
|
||||
}
|
||||
|
||||
// Close puts the connection back to connection pool.
|
||||
func (c *RedisConn) Close(ctx context.Context) error {
|
||||
return c.conn.Close(ctx)
|
||||
}
|
62
database/gredis/gredis_redis_group_generic.go
Normal file
62
database/gredis/gredis_redis_group_generic.go
Normal file
@ -0,0 +1,62 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupGeneric manages generic redis operations.
|
||||
// Implements see redis.GroupGeneric.
|
||||
type IGroupGeneric interface {
|
||||
Copy(ctx context.Context, source, destination string, option ...CopyOption) (int64, error)
|
||||
Exists(ctx context.Context, keys ...string) (int64, error)
|
||||
Type(ctx context.Context, key string) (string, error)
|
||||
Unlink(ctx context.Context, keys ...string) (int64, error)
|
||||
Rename(ctx context.Context, key, newKey string) error
|
||||
RenameNX(ctx context.Context, key, newKey string) (int64, error)
|
||||
Move(ctx context.Context, key string, db int) (int64, error)
|
||||
Del(ctx context.Context, keys ...string) (int64, error)
|
||||
RandomKey(ctx context.Context) (string, error)
|
||||
DBSize(ctx context.Context) (int64, error)
|
||||
Keys(ctx context.Context, pattern string) ([]string, error)
|
||||
FlushDB(ctx context.Context, option ...FlushOp) error
|
||||
FlushAll(ctx context.Context, option ...FlushOp) error
|
||||
Expire(ctx context.Context, key string, seconds int64, option ...ExpireOption) (int64, error)
|
||||
ExpireAt(ctx context.Context, key string, time time.Time, option ...ExpireOption) (int64, error)
|
||||
ExpireTime(ctx context.Context, key string) (*gvar.Var, error)
|
||||
TTL(ctx context.Context, key string) (int64, error)
|
||||
Persist(ctx context.Context, key string) (int64, error)
|
||||
PExpire(ctx context.Context, key string, milliseconds int64, option ...ExpireOption) (int64, error)
|
||||
PExpireAt(ctx context.Context, key string, time time.Time, option ...ExpireOption) (int64, error)
|
||||
PExpireTime(ctx context.Context, key string) (*gvar.Var, error)
|
||||
PTTL(ctx context.Context, key string) (int64, error)
|
||||
}
|
||||
|
||||
// CopyOption provides options for function Copy.
|
||||
type CopyOption struct {
|
||||
DB int // DB option allows specifying an alternative logical database index for the destination key.
|
||||
REPLACE bool // REPLACE option removes the destination key before copying the value to it.
|
||||
}
|
||||
|
||||
type FlushOp string
|
||||
|
||||
const (
|
||||
FlushAsync FlushOp = "ASYNC" // ASYNC: flushes the databases asynchronously
|
||||
FlushSync FlushOp = "SYNC" // SYNC: flushes the databases synchronously
|
||||
)
|
||||
|
||||
// ExpireOption provides options for function Expire.
|
||||
type ExpireOption struct {
|
||||
NX bool // NX -- Set expiry only when the key has no expiry
|
||||
XX bool // XX -- Set expiry only when the key has an existing expiry
|
||||
GT bool // GT -- Set expiry only when the new expiry is greater than current one
|
||||
LT bool // LT -- Set expiry only when the new expiry is less than current one
|
||||
}
|
32
database/gredis/gredis_redis_group_hash.go
Normal file
32
database/gredis/gredis_redis_group_hash.go
Normal file
@ -0,0 +1,32 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupHash manages redis hash operations.
|
||||
// Implements see redis.GroupHash.
|
||||
type IGroupHash interface {
|
||||
HSet(ctx context.Context, key string, fields map[string]interface{}) (int64, error)
|
||||
HSetNX(ctx context.Context, key, field string, value interface{}) (int64, error)
|
||||
HGet(ctx context.Context, key, field string) (*gvar.Var, error)
|
||||
HStrLen(ctx context.Context, key, field string) (int64, error)
|
||||
HExists(ctx context.Context, key, field string) (int64, error)
|
||||
HDel(ctx context.Context, key string, fields ...string) (int64, error)
|
||||
HLen(ctx context.Context, key string) (int64, error)
|
||||
HIncrBy(ctx context.Context, key, field string, increment int64) (int64, error)
|
||||
HIncrByFloat(ctx context.Context, key, field string, increment float64) (float64, error)
|
||||
HMSet(ctx context.Context, key string, fields map[string]interface{}) error
|
||||
HMGet(ctx context.Context, key string, fields ...string) ([]*gvar.Var, error)
|
||||
HKeys(ctx context.Context, key string) ([]string, error)
|
||||
HVals(ctx context.Context, key string) ([]*gvar.Var, error)
|
||||
HGetAll(ctx context.Context, key string) (map[string]*gvar.Var, error)
|
||||
}
|
43
database/gredis/gredis_redis_group_list.go
Normal file
43
database/gredis/gredis_redis_group_list.go
Normal file
@ -0,0 +1,43 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupList manages redis list operations.
|
||||
// Implements see redis.GroupList.
|
||||
type IGroupList interface {
|
||||
LPush(ctx context.Context, key string, values ...interface{}) (int64, error)
|
||||
LPushX(ctx context.Context, key string, element interface{}, elements ...interface{}) (int64, error)
|
||||
RPush(ctx context.Context, key string, values ...interface{}) (int64, error)
|
||||
RPushX(ctx context.Context, key string, value interface{}) (int64, error)
|
||||
LPop(ctx context.Context, key string, count ...int) (*gvar.Var, error)
|
||||
RPop(ctx context.Context, key string, count ...int) (*gvar.Var, error)
|
||||
LRem(ctx context.Context, key string, count int64, value interface{}) (int64, error)
|
||||
LLen(ctx context.Context, key string) (int64, error)
|
||||
LIndex(ctx context.Context, key string, index int64) (*gvar.Var, error)
|
||||
LInsert(ctx context.Context, key string, op LInsertOp, pivot, value interface{}) (int64, error)
|
||||
LSet(ctx context.Context, key string, index int64, value interface{}) (*gvar.Var, error)
|
||||
LRange(ctx context.Context, key string, start, stop int64) ([]*gvar.Var, error)
|
||||
LTrim(ctx context.Context, key string, start, stop int64) error
|
||||
BLPop(ctx context.Context, timeout int64, keys ...string) ([]*gvar.Var, error)
|
||||
BRPop(ctx context.Context, timeout int64, keys ...string) ([]*gvar.Var, error)
|
||||
RPopLPush(ctx context.Context, source, destination string) (*gvar.Var, error)
|
||||
BRPopLPush(ctx context.Context, source, destination string, timeout int64) (*gvar.Var, error)
|
||||
}
|
||||
|
||||
// LInsertOp defines the operation name for function LInsert.
|
||||
type LInsertOp string
|
||||
|
||||
const (
|
||||
LInsertBefore LInsertOp = "BEFORE"
|
||||
LInsertAfter LInsertOp = "AFTER"
|
||||
)
|
@ -6,7 +6,26 @@
|
||||
|
||||
package gredis
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// IGroupPubSub manages redis pub/sub operations.
|
||||
// Implements see redis.GroupPubSub.
|
||||
type IGroupPubSub interface {
|
||||
Publish(ctx context.Context, channel string, message interface{}) (int64, error)
|
||||
Subscribe(ctx context.Context, channel string, channels ...string) (Conn, []*Subscription, error)
|
||||
PSubscribe(ctx context.Context, pattern string, patterns ...string) (Conn, []*Subscription, error)
|
||||
}
|
||||
|
||||
// Message received as result of a PUBLISH command issued by another client.
|
||||
type Message struct {
|
||||
Channel string
|
||||
Pattern string
|
||||
Payload string
|
||||
PayloadSlice []string
|
||||
}
|
||||
|
||||
// Subscription received after a successful subscription to channel.
|
||||
type Subscription struct {
|
30
database/gredis/gredis_redis_group_script.go
Normal file
30
database/gredis/gredis_redis_group_script.go
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupScript manages redis script operations.
|
||||
// Implements see redis.GroupScript.
|
||||
type IGroupScript interface {
|
||||
Eval(ctx context.Context, script string, numKeys int64, keys []string, args []interface{}) (*gvar.Var, error)
|
||||
EvalSha(ctx context.Context, sha1 string, numKeys int64, keys []string, args []interface{}) (*gvar.Var, error)
|
||||
ScriptLoad(ctx context.Context, script string) (string, error)
|
||||
ScriptExists(ctx context.Context, sha1 string, sha1s ...string) (map[string]bool, error)
|
||||
ScriptFlush(ctx context.Context, option ...ScriptFlushOption) error
|
||||
ScriptKill(ctx context.Context) error
|
||||
}
|
||||
|
||||
// ScriptFlushOption provides options for function ScriptFlush.
|
||||
type ScriptFlushOption struct {
|
||||
SYNC bool // SYNC flushes the cache synchronously.
|
||||
ASYNC bool // ASYNC flushes the cache asynchronously.
|
||||
}
|
33
database/gredis/gredis_redis_group_set.go
Normal file
33
database/gredis/gredis_redis_group_set.go
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupSet manages redis set operations.
|
||||
// Implements see redis.GroupSet.
|
||||
type IGroupSet interface {
|
||||
SAdd(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error)
|
||||
SIsMember(ctx context.Context, key string, member interface{}) (int64, error)
|
||||
SPop(ctx context.Context, key string, count ...int) (*gvar.Var, error)
|
||||
SRandMember(ctx context.Context, key string, count ...int) (*gvar.Var, error)
|
||||
SRem(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error)
|
||||
SMove(ctx context.Context, source, destination string, member interface{}) (int64, error)
|
||||
SCard(ctx context.Context, key string) (int64, error)
|
||||
SMembers(ctx context.Context, key string) ([]*gvar.Var, error)
|
||||
SMIsMember(ctx context.Context, key, member interface{}, members ...interface{}) ([]int, error)
|
||||
SInter(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error)
|
||||
SInterStore(ctx context.Context, destination string, key string, keys ...string) (int64, error)
|
||||
SUnion(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error)
|
||||
SUnionStore(ctx context.Context, destination, key string, keys ...string) (int64, error)
|
||||
SDiff(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error)
|
||||
SDiffStore(ctx context.Context, destination string, key string, keys ...string) (int64, error)
|
||||
}
|
85
database/gredis/gredis_redis_group_sorted_set.go
Normal file
85
database/gredis/gredis_redis_group_sorted_set.go
Normal file
@ -0,0 +1,85 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupSortedSet manages redis sorted set operations.
|
||||
// Implements see redis.GroupSortedSet.
|
||||
type IGroupSortedSet interface {
|
||||
ZAdd(ctx context.Context, key string, option *ZAddOption, member ZAddMember, members ...ZAddMember) (*gvar.Var, error)
|
||||
ZScore(ctx context.Context, key string, member interface{}) (float64, error)
|
||||
ZIncrBy(ctx context.Context, key string, increment float64, member interface{}) (float64, error)
|
||||
ZCard(ctx context.Context, key string) (int64, error)
|
||||
ZCount(ctx context.Context, key string, min, max string) (int64, error)
|
||||
ZRange(ctx context.Context, key string, start, stop int64, option ...ZRangeOption) ([]*gvar.Var, error)
|
||||
ZRevRange(ctx context.Context, key string, start, stop int64, option ...ZRevRangeOption) (*gvar.Var, error)
|
||||
ZRank(ctx context.Context, key string, member interface{}) (int64, error)
|
||||
ZRevRank(ctx context.Context, key string, member interface{}) (int64, error)
|
||||
ZRem(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error)
|
||||
ZRemRangeByRank(ctx context.Context, key string, start, stop int64) (int64, error)
|
||||
ZRemRangeByScore(ctx context.Context, key string, min, max string) (int64, error)
|
||||
ZRemRangeByLex(ctx context.Context, key string, min, max string) (int64, error)
|
||||
ZLexCount(ctx context.Context, key, min, max string) (int64, error)
|
||||
}
|
||||
|
||||
// ZAddOption provides options for function ZAdd.
|
||||
type ZAddOption struct {
|
||||
XX bool // Only update elements that already exist. Don't add new elements.
|
||||
NX bool // Only add new elements. Don't update already existing elements.
|
||||
// Only update existing elements if the new score is less than the current score.
|
||||
// This flag doesn't prevent adding new elements.
|
||||
LT bool
|
||||
|
||||
// Only update existing elements if the new score is greater than the current score.
|
||||
// This flag doesn't prevent adding new elements.
|
||||
GT bool
|
||||
|
||||
// Modify the return value from the number of new elements added, to the total number of elements changed (CH is an abbreviation of changed).
|
||||
// Changed elements are new elements added and elements already existing for which the score was updated.
|
||||
// So elements specified in the command line having the same score as they had in the past are not counted.
|
||||
// Note: normally the return value of ZAdd only counts the number of new elements added.
|
||||
CH bool
|
||||
|
||||
// When this option is specified ZAdd acts like ZIncrBy. Only one score-element pair can be specified in this mode.
|
||||
INCR bool
|
||||
}
|
||||
|
||||
// ZAddMember is element struct for set.
|
||||
type ZAddMember struct {
|
||||
Score float64
|
||||
Member interface{}
|
||||
}
|
||||
|
||||
// ZRangeOption provides extra option for ZRange function.
|
||||
type ZRangeOption struct {
|
||||
ByScore bool
|
||||
ByLex bool
|
||||
// The optional REV argument reverses the ordering, so elements are ordered from highest to lowest score,
|
||||
// and score ties are resolved by reverse lexicographical ordering.
|
||||
Rev bool
|
||||
Limit *ZRangeOptionLimit
|
||||
// The optional WithScores argument supplements the command's reply with the scores of elements returned.
|
||||
WithScores bool
|
||||
}
|
||||
|
||||
// ZRangeOptionLimit provides LIMIT argument for ZRange function.
|
||||
// The optional LIMIT argument can be used to obtain a sub-range from the matching elements
|
||||
// (similar to SELECT LIMIT offset, count in SQL). A negative `Count` returns all elements from the `Offset`.
|
||||
type ZRangeOptionLimit struct {
|
||||
Offset *int
|
||||
Count *int
|
||||
}
|
||||
|
||||
// ZRevRangeOption provides options for function ZRevRange.
|
||||
type ZRevRangeOption struct {
|
||||
WithScores bool
|
||||
}
|
63
database/gredis/gredis_redis_group_string.go
Normal file
63
database/gredis/gredis_redis_group_string.go
Normal file
@ -0,0 +1,63 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupString manages redis string operations.
|
||||
// Implements see redis.GroupString.
|
||||
type IGroupString interface {
|
||||
Set(ctx context.Context, key string, value interface{}, option ...SetOption) (*gvar.Var, error)
|
||||
SetNX(ctx context.Context, key string, value interface{}) (bool, error)
|
||||
SetEX(ctx context.Context, key string, value interface{}, ttlInSeconds int64) error
|
||||
Get(ctx context.Context, key string) (*gvar.Var, error)
|
||||
GetDel(ctx context.Context, key string) (*gvar.Var, error)
|
||||
GetEX(ctx context.Context, key string, option ...GetEXOption) (*gvar.Var, error)
|
||||
GetSet(ctx context.Context, key string, value interface{}) (*gvar.Var, error)
|
||||
StrLen(ctx context.Context, key string) (int64, error)
|
||||
Append(ctx context.Context, key string, value string) (int64, error)
|
||||
SetRange(ctx context.Context, key string, offset int64, value string) (int64, error)
|
||||
GetRange(ctx context.Context, key string, start, end int64) (string, error)
|
||||
Incr(ctx context.Context, key string) (int64, error)
|
||||
IncrBy(ctx context.Context, key string, increment int64) (int64, error)
|
||||
IncrByFloat(ctx context.Context, key string, increment float64) (float64, error)
|
||||
Decr(ctx context.Context, key string) (int64, error)
|
||||
DecrBy(ctx context.Context, key string, decrement int64) (int64, error)
|
||||
MSet(ctx context.Context, keyValueMap map[string]interface{}) error
|
||||
MSetNX(ctx context.Context, keyValueMap map[string]interface{}) (bool, error)
|
||||
MGet(ctx context.Context, keys ...string) (map[string]*gvar.Var, error)
|
||||
}
|
||||
|
||||
// TTLOption provides extra option for TTL related functions.
|
||||
type TTLOption struct {
|
||||
EX *int64 // EX seconds -- Set the specified expire time, in seconds.
|
||||
PX *int64 // PX milliseconds -- Set the specified expire time, in milliseconds.
|
||||
EXAT *int64 // EXAT timestamp-seconds -- Set the specified Unix time at which the key will expire, in seconds.
|
||||
PXAT *int64 // PXAT timestamp-milliseconds -- Set the specified Unix time at which the key will expire, in milliseconds.
|
||||
KeepTTL bool // Retain the time to live associated with the key.
|
||||
}
|
||||
|
||||
// SetOption provides extra option for Set function.
|
||||
type SetOption struct {
|
||||
TTLOption
|
||||
NX bool // Only set the key if it does not already exist.
|
||||
XX bool // Only set the key if it already exists.
|
||||
|
||||
// Return the old string stored at key, or nil if key did not exist.
|
||||
// An error is returned and SET aborted if the value stored at key is not a string.
|
||||
Get bool
|
||||
}
|
||||
|
||||
// GetEXOption provides extra option for GetEx function.
|
||||
type GetEXOption struct {
|
||||
TTLOption
|
||||
Persist bool // Persist -- Remove the time to live associated with the key.
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/net/gtrace"
|
||||
)
|
||||
|
||||
// traceItem holds the information for redis trace.
|
||||
type traceItem struct {
|
||||
err error
|
||||
command string
|
||||
args []interface{}
|
||||
costMilli int64
|
||||
}
|
||||
|
||||
const (
|
||||
traceInstrumentName = "github.com/gogf/gf/v2/database/gredis"
|
||||
traceAttrRedisAddress = "redis.address"
|
||||
traceAttrRedisDb = "redis.db"
|
||||
traceEventRedisExecution = "redis.execution"
|
||||
traceEventRedisExecutionCommand = "redis.execution.command"
|
||||
traceEventRedisExecutionCost = "redis.execution.cost"
|
||||
traceEventRedisExecutionArguments = "redis.execution.arguments"
|
||||
)
|
||||
|
||||
// traceSpanEnd checks and adds redis trace information to OpenTelemetry.
|
||||
func (c *RedisConn) traceSpanEnd(ctx context.Context, span trace.Span, item *traceItem) {
|
||||
if gtrace.IsUsingDefaultProvider() || !gtrace.IsTracingInternal() {
|
||||
return
|
||||
}
|
||||
|
||||
if item.err != nil {
|
||||
span.SetStatus(codes.Error, fmt.Sprintf(`%+v`, item.err))
|
||||
}
|
||||
|
||||
span.SetAttributes(gtrace.CommonLabels()...)
|
||||
|
||||
if adapter, ok := c.redis.GetAdapter().(*AdapterGoRedis); ok {
|
||||
span.SetAttributes(
|
||||
attribute.String(traceAttrRedisAddress, adapter.config.Address),
|
||||
attribute.Int(traceAttrRedisDb, adapter.config.Db),
|
||||
)
|
||||
}
|
||||
|
||||
jsonBytes, _ := json.Marshal(item.args)
|
||||
span.AddEvent(traceEventRedisExecution, trace.WithAttributes(
|
||||
attribute.String(traceEventRedisExecutionCommand, item.command),
|
||||
attribute.String(traceEventRedisExecutionCost, fmt.Sprintf(`%d ms`, item.costMilli)),
|
||||
attribute.String(traceEventRedisExecutionArguments, string(jsonBytes)),
|
||||
))
|
||||
}
|
@ -26,26 +26,27 @@ type Code interface {
|
||||
// ================================================================================================================
|
||||
|
||||
var (
|
||||
CodeNil = localCode{-1, "", nil} // No error code specified.
|
||||
CodeOK = localCode{0, "OK", nil} // It is OK.
|
||||
CodeInternalError = localCode{50, "Internal Error", nil} // An error occurred internally.
|
||||
CodeValidationFailed = localCode{51, "Validation Failed", nil} // Data validation failed.
|
||||
CodeDbOperationError = localCode{52, "Database Operation Error", nil} // Database operation error.
|
||||
CodeInvalidParameter = localCode{53, "Invalid Parameter", nil} // The given parameter for current operation is invalid.
|
||||
CodeMissingParameter = localCode{54, "Missing Parameter", nil} // Parameter for current operation is missing.
|
||||
CodeInvalidOperation = localCode{55, "Invalid Operation", nil} // The function cannot be used like this.
|
||||
CodeInvalidConfiguration = localCode{56, "Invalid Configuration", nil} // The configuration is invalid for current operation.
|
||||
CodeMissingConfiguration = localCode{57, "Missing Configuration", nil} // The configuration is missing for current operation.
|
||||
CodeNotImplemented = localCode{58, "Not Implemented", nil} // The operation is not implemented yet.
|
||||
CodeNotSupported = localCode{59, "Not Supported", nil} // The operation is not supported yet.
|
||||
CodeOperationFailed = localCode{60, "Operation Failed", nil} // I tried, but I cannot give you what you want.
|
||||
CodeNotAuthorized = localCode{61, "Not Authorized", nil} // Not Authorized.
|
||||
CodeSecurityReason = localCode{62, "Security Reason", nil} // Security Reason.
|
||||
CodeServerBusy = localCode{63, "Server Is Busy", nil} // Server is busy, please try again later.
|
||||
CodeUnknown = localCode{64, "Unknown Error", nil} // Unknown error.
|
||||
CodeNotFound = localCode{65, "Not Found", nil} // Resource does not exist.
|
||||
CodeInvalidRequest = localCode{66, "Invalid Request", nil} // Invalid request.
|
||||
CodeBusinessValidationFailed = localCode{300, "Business Validation Failed", nil} // Business validation failed.
|
||||
CodeNil = localCode{-1, "", nil} // No error code specified.
|
||||
CodeOK = localCode{0, "OK", nil} // It is OK.
|
||||
CodeInternalError = localCode{50, "Internal Error", nil} // An error occurred internally.
|
||||
CodeValidationFailed = localCode{51, "Validation Failed", nil} // Data validation failed.
|
||||
CodeDbOperationError = localCode{52, "Database Operation Error", nil} // Database operation error.
|
||||
CodeInvalidParameter = localCode{53, "Invalid Parameter", nil} // The given parameter for current operation is invalid.
|
||||
CodeMissingParameter = localCode{54, "Missing Parameter", nil} // Parameter for current operation is missing.
|
||||
CodeInvalidOperation = localCode{55, "Invalid Operation", nil} // The function cannot be used like this.
|
||||
CodeInvalidConfiguration = localCode{56, "Invalid Configuration", nil} // The configuration is invalid for current operation.
|
||||
CodeMissingConfiguration = localCode{57, "Missing Configuration", nil} // The configuration is missing for current operation.
|
||||
CodeNotImplemented = localCode{58, "Not Implemented", nil} // The operation is not implemented yet.
|
||||
CodeNotSupported = localCode{59, "Not Supported", nil} // The operation is not supported yet.
|
||||
CodeOperationFailed = localCode{60, "Operation Failed", nil} // I tried, but I cannot give you what you want.
|
||||
CodeNotAuthorized = localCode{61, "Not Authorized", nil} // Not Authorized.
|
||||
CodeSecurityReason = localCode{62, "Security Reason", nil} // Security Reason.
|
||||
CodeServerBusy = localCode{63, "Server Is Busy", nil} // Server is busy, please try again later.
|
||||
CodeUnknown = localCode{64, "Unknown Error", nil} // Unknown error.
|
||||
CodeNotFound = localCode{65, "Not Found", nil} // Resource does not exist.
|
||||
CodeInvalidRequest = localCode{66, "Invalid Request", nil} // Invalid request.
|
||||
CodeNecessaryPackageNotImport = localCode{67, "Necessary Package Not Import", nil} // It needs necessary package import.
|
||||
CodeBusinessValidationFailed = localCode{300, "Business Validation Failed", nil} // Business validation failed.
|
||||
)
|
||||
|
||||
// New creates and returns an error code.
|
||||
|
@ -7,7 +7,7 @@ require (
|
||||
github.com/gogf/gf/contrib/config/kubecm/v2 v2.0.0
|
||||
github.com/gogf/gf/contrib/config/nacos/v2 v2.0.0-00010101000000-000000000000
|
||||
github.com/gogf/gf/contrib/config/polaris/v2 v2.0.0
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.0.0
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.2.1
|
||||
github.com/gogf/gf/contrib/registry/etcd/v2 v2.1.0-rc3.0.20220523034830-510fa3faf03f
|
||||
github.com/gogf/gf/contrib/registry/polaris/v2 v2.0.0
|
||||
github.com/gogf/gf/contrib/trace/jaeger/v2 v2.0.0
|
||||
|
@ -124,8 +124,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo=
|
||||
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
@ -181,8 +179,6 @@ github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng=
|
||||
github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
@ -410,17 +406,14 @@ github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6Yf
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
|
||||
github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU=
|
||||
@ -428,7 +421,6 @@ github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
|
||||
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
|
||||
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
|
||||
@ -1019,7 +1011,6 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
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/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
93
example/tcp/server/proxy/main.go
Normal file
93
example/tcp/server/proxy/main.go
Normal file
@ -0,0 +1,93 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/net/gtcp"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/os/gtimer"
|
||||
)
|
||||
|
||||
const (
|
||||
AddressOfServer1 = ":8198"
|
||||
AddressOfServer2 = ":8199"
|
||||
UpStream = "127.0.0.1:8198"
|
||||
)
|
||||
|
||||
var (
|
||||
ctx = gctx.GetInitCtx()
|
||||
)
|
||||
|
||||
// StartTCPServer1 starts Server1: A simple tcp server for demo.
|
||||
// It reads the content from client connect and write it back to client.
|
||||
func StartTCPServer1() {
|
||||
s := g.TCPServer(1)
|
||||
s.SetHandler(func(conn *gtcp.Conn) {
|
||||
defer conn.Close()
|
||||
for {
|
||||
data, err := conn.Recv(-1)
|
||||
if err != nil {
|
||||
g.Log().Errorf(ctx, `%+v`, err)
|
||||
break
|
||||
}
|
||||
if len(data) > 0 {
|
||||
err = conn.Send([]byte(fmt.Sprintf(`received: %s`, data)))
|
||||
if err != nil {
|
||||
g.Log().Errorf(ctx, `%+v`, err)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
s.SetAddress(AddressOfServer1)
|
||||
s.Run()
|
||||
}
|
||||
|
||||
// StartTCPServer2 starts Server2:
|
||||
// All requests to Server2 are directly redirected to Server1.
|
||||
func StartTCPServer2() {
|
||||
s := g.TCPServer(2)
|
||||
s.SetHandler(func(conn *gtcp.Conn) {
|
||||
defer conn.Close()
|
||||
// Each client connection associates an upstream connection.
|
||||
upstreamClient, err := gtcp.NewConn(UpStream)
|
||||
if err != nil {
|
||||
_, _ = conn.Write([]byte(fmt.Sprintf(
|
||||
`cannot connect to upstream "%s": %s`, UpStream, err.Error(),
|
||||
)))
|
||||
return
|
||||
}
|
||||
// Redirect the client connection reading and writing to upstream connection.
|
||||
for {
|
||||
go io.Copy(upstreamClient, conn)
|
||||
_, err = io.Copy(conn, upstreamClient)
|
||||
if err != nil {
|
||||
_, _ = conn.Write([]byte(fmt.Sprintf(
|
||||
`io.Copy to upstream "%s" failed: %s`, UpStream, err.Error(),
|
||||
)))
|
||||
}
|
||||
}
|
||||
})
|
||||
s.SetAddress(AddressOfServer2)
|
||||
s.Run()
|
||||
}
|
||||
|
||||
func main() {
|
||||
go StartTCPServer1()
|
||||
go StartTCPServer2()
|
||||
time.Sleep(time.Second)
|
||||
gtimer.Add(ctx, time.Second, func(ctx context.Context) {
|
||||
address := fmt.Sprintf(`127.0.0.1%s`, AddressOfServer2)
|
||||
result, err := gtcp.SendRecv(address, []byte(gtime.Now().String()), -1)
|
||||
if err != nil {
|
||||
g.Log().Errorf(ctx, `send data failed: %+v`, err)
|
||||
}
|
||||
g.Log().Info(ctx, result)
|
||||
})
|
||||
g.Listen()
|
||||
}
|
@ -11,6 +11,8 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/consts"
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
@ -63,6 +65,10 @@ func Redis(name ...string) *gredis.Redis {
|
||||
}
|
||||
return redisClient
|
||||
}
|
||||
panic(gerror.NewCode(
|
||||
gcode.CodeMissingConfiguration,
|
||||
`no configuration found for creating redis client`,
|
||||
))
|
||||
return nil
|
||||
})
|
||||
if result != nil {
|
||||
|
1
go.mod
1
go.mod
@ -7,7 +7,6 @@ require (
|
||||
github.com/clbanning/mxj/v2 v2.5.5
|
||||
github.com/fatih/color v1.13.0
|
||||
github.com/fsnotify/fsnotify v1.5.4
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
github.com/grokify/html-strip-tags-go v0.0.1
|
||||
github.com/magiconair/properties v1.8.6
|
||||
|
85
go.sum
85
go.sum
@ -1,21 +1,11 @@
|
||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/mxj/v2 v2.5.5 h1:oT81vUeEiQQ/DcHbzSytRngP6Ky9O+L+0Bw0zSJag9E=
|
||||
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
|
||||
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/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
@ -23,32 +13,12 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
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/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0=
|
||||
github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
@ -58,30 +28,13 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
|
||||
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
|
||||
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
@ -91,76 +44,40 @@ go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJ
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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-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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 h1:GLw7MR8AfAG2GmGcmVgObFOHXYypgGjnGno25RDwn3Y=
|
||||
golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
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=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
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=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
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=
|
||||
|
@ -19,11 +19,11 @@ import (
|
||||
|
||||
// Conn is the TCP connection object.
|
||||
type Conn struct {
|
||||
net.Conn // Underlying TCP connection object.
|
||||
reader *bufio.Reader // Buffer reader for connection.
|
||||
receiveDeadline time.Time // Timeout point for reading.
|
||||
sendDeadline time.Time // Timeout point for writing.
|
||||
receiveBufferWait time.Duration // Interval duration for reading buffer.
|
||||
net.Conn // Underlying TCP connection object.
|
||||
reader *bufio.Reader // Buffer reader for connection.
|
||||
deadlineRecv time.Time // Timeout point for reading.
|
||||
deadlineSend time.Time // Timeout point for writing.
|
||||
bufferWaitRecv time.Duration // Interval duration for reading buffer.
|
||||
}
|
||||
|
||||
const (
|
||||
@ -63,11 +63,11 @@ func NewConnKeyCrt(addr, crtFile, keyFile string) (*Conn, error) {
|
||||
// NewConnByNetConn creates and returns a TCP connection object with given net.Conn object.
|
||||
func NewConnByNetConn(conn net.Conn) *Conn {
|
||||
return &Conn{
|
||||
Conn: conn,
|
||||
reader: bufio.NewReader(conn),
|
||||
receiveDeadline: time.Time{},
|
||||
sendDeadline: time.Time{},
|
||||
receiveBufferWait: receiveAllWaitTimeout,
|
||||
Conn: conn,
|
||||
reader: bufio.NewReader(conn),
|
||||
deadlineRecv: time.Time{},
|
||||
deadlineSend: time.Time{},
|
||||
bufferWaitRecv: receiveAllWaitTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ func (c *Conn) Recv(length int, retry ...Retry) ([]byte, error) {
|
||||
for {
|
||||
if length < 0 && index > 0 {
|
||||
bufferWait = true
|
||||
if err = c.SetReadDeadline(time.Now().Add(c.receiveBufferWait)); err != nil {
|
||||
if err = c.SetReadDeadline(time.Now().Add(c.bufferWaitRecv)); err != nil {
|
||||
err = gerror.Wrap(err, `SetReadDeadline for connection failed`)
|
||||
return nil, err
|
||||
}
|
||||
@ -155,7 +155,7 @@ func (c *Conn) Recv(length int, retry ...Retry) ([]byte, error) {
|
||||
}
|
||||
// Re-set the timeout when reading data.
|
||||
if bufferWait && isTimeout(err) {
|
||||
if err = c.SetReadDeadline(c.receiveDeadline); err != nil {
|
||||
if err = c.SetReadDeadline(c.deadlineRecv); err != nil {
|
||||
err = gerror.Wrap(err, `SetReadDeadline for connection failed`)
|
||||
return nil, err
|
||||
}
|
||||
@ -240,11 +240,11 @@ func (c *Conn) RecvTill(til []byte, retry ...Retry) ([]byte, error) {
|
||||
|
||||
// RecvWithTimeout reads data from the connection with timeout.
|
||||
func (c *Conn) RecvWithTimeout(length int, timeout time.Duration, retry ...Retry) (data []byte, err error) {
|
||||
if err = c.SetReceiveDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err = c.SetDeadlineRecv(time.Now().Add(timeout)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetReceiveDeadline(time.Time{})
|
||||
_ = c.SetDeadlineRecv(time.Time{})
|
||||
}()
|
||||
data, err = c.Recv(length, retry...)
|
||||
return
|
||||
@ -252,11 +252,11 @@ func (c *Conn) RecvWithTimeout(length int, timeout time.Duration, retry ...Retry
|
||||
|
||||
// SendWithTimeout writes data to the connection with timeout.
|
||||
func (c *Conn) SendWithTimeout(data []byte, timeout time.Duration, retry ...Retry) (err error) {
|
||||
if err = c.SetSendDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err = c.SetDeadlineSend(time.Now().Add(timeout)); err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetSendDeadline(time.Time{})
|
||||
_ = c.SetDeadlineSend(time.Time{})
|
||||
}()
|
||||
err = c.Send(data, retry...)
|
||||
return
|
||||
@ -280,10 +280,11 @@ func (c *Conn) SendRecvWithTimeout(data []byte, length int, timeout time.Duratio
|
||||
}
|
||||
}
|
||||
|
||||
// SetDeadline sets the deadline for current connection.
|
||||
func (c *Conn) SetDeadline(t time.Time) (err error) {
|
||||
if err = c.Conn.SetDeadline(t); err == nil {
|
||||
c.receiveDeadline = t
|
||||
c.sendDeadline = t
|
||||
c.deadlineRecv = t
|
||||
c.deadlineSend = t
|
||||
}
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `SetDeadline for connection failed with "%s"`, t)
|
||||
@ -291,28 +292,30 @@ func (c *Conn) SetDeadline(t time.Time) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Conn) SetReceiveDeadline(t time.Time) (err error) {
|
||||
// SetDeadlineRecv sets the deadline of receiving for current connection.
|
||||
func (c *Conn) SetDeadlineRecv(t time.Time) (err error) {
|
||||
if err = c.SetReadDeadline(t); err == nil {
|
||||
c.receiveDeadline = t
|
||||
c.deadlineRecv = t
|
||||
}
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `SetReadDeadline for connection failed with "%s"`, t)
|
||||
err = gerror.Wrapf(err, `SetDeadlineRecv for connection failed with "%s"`, t)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Conn) SetSendDeadline(t time.Time) (err error) {
|
||||
// SetDeadlineSend sets the deadline of sending for current connection.
|
||||
func (c *Conn) SetDeadlineSend(t time.Time) (err error) {
|
||||
if err = c.SetWriteDeadline(t); err == nil {
|
||||
c.sendDeadline = t
|
||||
c.deadlineSend = t
|
||||
}
|
||||
if err != nil {
|
||||
err = gerror.Wrapf(err, `SetWriteDeadline for connection failed with "%s"`, t)
|
||||
err = gerror.Wrapf(err, `SetDeadlineSend for connection failed with "%s"`, t)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// SetReceiveBufferWait sets the buffer waiting timeout when reading all data from connection.
|
||||
// SetBufferWaitRecv sets the buffer waiting timeout when reading all data from connection.
|
||||
// The waiting duration cannot be too long which might delay receiving data from remote address.
|
||||
func (c *Conn) SetReceiveBufferWait(bufferWaitDuration time.Duration) {
|
||||
c.receiveBufferWait = bufferWaitDuration
|
||||
func (c *Conn) SetBufferWaitRecv(bufferWaitDuration time.Duration) {
|
||||
c.bufferWaitRecv = bufferWaitDuration
|
||||
}
|
||||
|
@ -66,11 +66,11 @@ func (c *Conn) SendPkg(data []byte, option ...PkgOption) error {
|
||||
|
||||
// SendPkgWithTimeout writes data to connection with timeout using simple package protocol.
|
||||
func (c *Conn) SendPkgWithTimeout(data []byte, timeout time.Duration, option ...PkgOption) (err error) {
|
||||
if err := c.SetSendDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err := c.SetDeadlineSend(time.Now().Add(timeout)); err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetSendDeadline(time.Time{})
|
||||
_ = c.SetDeadlineSend(time.Time{})
|
||||
}()
|
||||
err = c.SendPkg(data, option...)
|
||||
return
|
||||
@ -135,11 +135,11 @@ func (c *Conn) RecvPkg(option ...PkgOption) (result []byte, err error) {
|
||||
|
||||
// RecvPkgWithTimeout reads data from connection with timeout using simple package protocol.
|
||||
func (c *Conn) RecvPkgWithTimeout(timeout time.Duration, option ...PkgOption) (data []byte, err error) {
|
||||
if err = c.SetReceiveDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err = c.SetDeadlineRecv(time.Now().Add(timeout)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetReceiveDeadline(time.Time{})
|
||||
_ = c.SetDeadlineRecv(time.Time{})
|
||||
}()
|
||||
data, err = c.RecvPkg(option...)
|
||||
return
|
||||
|
@ -123,11 +123,11 @@ func (c *PoolConn) RecvTill(til []byte, retry ...Retry) ([]byte, error) {
|
||||
|
||||
// RecvWithTimeout reads data from the connection with timeout.
|
||||
func (c *PoolConn) RecvWithTimeout(length int, timeout time.Duration, retry ...Retry) (data []byte, err error) {
|
||||
if err := c.SetReceiveDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err := c.SetDeadlineRecv(time.Now().Add(timeout)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetReceiveDeadline(time.Time{})
|
||||
_ = c.SetDeadlineRecv(time.Time{})
|
||||
}()
|
||||
data, err = c.Recv(length, retry...)
|
||||
return
|
||||
@ -135,11 +135,11 @@ func (c *PoolConn) RecvWithTimeout(length int, timeout time.Duration, retry ...R
|
||||
|
||||
// SendWithTimeout writes data to the connection with timeout.
|
||||
func (c *PoolConn) SendWithTimeout(data []byte, timeout time.Duration, retry ...Retry) (err error) {
|
||||
if err := c.SetSendDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err := c.SetDeadlineSend(time.Now().Add(timeout)); err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetSendDeadline(time.Time{})
|
||||
_ = c.SetDeadlineSend(time.Time{})
|
||||
}()
|
||||
err = c.Send(data, retry...)
|
||||
return
|
||||
|
@ -43,11 +43,11 @@ func (c *PoolConn) RecvPkg(option ...PkgOption) ([]byte, error) {
|
||||
|
||||
// RecvPkgWithTimeout reads data from connection with timeout using simple package protocol.
|
||||
func (c *PoolConn) RecvPkgWithTimeout(timeout time.Duration, option ...PkgOption) (data []byte, err error) {
|
||||
if err := c.SetReceiveDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err := c.SetDeadlineRecv(time.Now().Add(timeout)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetReceiveDeadline(time.Time{})
|
||||
_ = c.SetDeadlineRecv(time.Time{})
|
||||
}()
|
||||
data, err = c.RecvPkg(option...)
|
||||
return
|
||||
@ -55,11 +55,11 @@ func (c *PoolConn) RecvPkgWithTimeout(timeout time.Duration, option ...PkgOption
|
||||
|
||||
// SendPkgWithTimeout writes data to connection with timeout using simple package protocol.
|
||||
func (c *PoolConn) SendPkgWithTimeout(data []byte, timeout time.Duration, option ...PkgOption) (err error) {
|
||||
if err := c.SetSendDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err := c.SetDeadlineSend(time.Now().Add(timeout)); err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetSendDeadline(time.Time{})
|
||||
_ = c.SetDeadlineSend(time.Time{})
|
||||
}()
|
||||
err = c.SendPkg(data, option...)
|
||||
return
|
||||
|
@ -320,7 +320,7 @@ func TestConn_SetReceiveBufferWait(t *testing.T) {
|
||||
conn, err := gtcp.NewConn(s.GetListenedAddress())
|
||||
t.AssertNil(err)
|
||||
t.AssertNE(conn, nil)
|
||||
conn.SetReceiveBufferWait(time.Millisecond * 100)
|
||||
conn.SetBufferWaitRecv(time.Millisecond * 100)
|
||||
err = conn.Send(sendData, gtcp.Retry{Count: 1})
|
||||
t.AssertNil(err)
|
||||
result, err := conn.Recv(-1)
|
||||
|
@ -16,11 +16,11 @@ import (
|
||||
|
||||
// Conn handles the UDP connection.
|
||||
type Conn struct {
|
||||
*net.UDPConn // Underlying UDP connection.
|
||||
remoteAddr *net.UDPAddr // Remote address.
|
||||
receiveDeadline time.Time // Timeout point for reading data.
|
||||
sendDeadline time.Time // Timeout point for writing data.
|
||||
receiveBufferWait time.Duration // Interval duration for reading buffer.
|
||||
*net.UDPConn // Underlying UDP connection.
|
||||
remoteAddr *net.UDPAddr // Remote address.
|
||||
deadlineRecv time.Time // Timeout point for reading data.
|
||||
deadlineSend time.Time // Timeout point for writing data.
|
||||
bufferWaitRecv time.Duration // Interval duration for reading buffer.
|
||||
}
|
||||
|
||||
const (
|
||||
@ -47,10 +47,10 @@ func NewConn(remoteAddress string, localAddress ...string) (*Conn, error) {
|
||||
// NewConnByNetConn creates an UDP connection object with given *net.UDPConn object.
|
||||
func NewConnByNetConn(udp *net.UDPConn) *Conn {
|
||||
return &Conn{
|
||||
UDPConn: udp,
|
||||
receiveDeadline: time.Time{},
|
||||
sendDeadline: time.Time{},
|
||||
receiveBufferWait: receiveAllWaitTimeout,
|
||||
UDPConn: udp,
|
||||
deadlineRecv: time.Time{},
|
||||
deadlineSend: time.Time{},
|
||||
bufferWaitRecv: receiveAllWaitTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,11 +144,11 @@ func (c *Conn) SendRecv(data []byte, receive int, retry ...Retry) ([]byte, error
|
||||
|
||||
// RecvWithTimeout reads data from remote address with timeout.
|
||||
func (c *Conn) RecvWithTimeout(length int, timeout time.Duration, retry ...Retry) (data []byte, err error) {
|
||||
if err = c.SetRecvDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err = c.SetDeadlineRecv(time.Now().Add(timeout)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetRecvDeadline(time.Time{})
|
||||
_ = c.SetDeadlineRecv(time.Time{})
|
||||
}()
|
||||
data, err = c.Recv(length, retry...)
|
||||
return
|
||||
@ -156,11 +156,11 @@ func (c *Conn) RecvWithTimeout(length int, timeout time.Duration, retry ...Retry
|
||||
|
||||
// SendWithTimeout writes data to connection with timeout.
|
||||
func (c *Conn) SendWithTimeout(data []byte, timeout time.Duration, retry ...Retry) (err error) {
|
||||
if err = c.SetSendDeadline(time.Now().Add(timeout)); err != nil {
|
||||
if err = c.SetDeadlineSend(time.Now().Add(timeout)); err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
_ = c.SetSendDeadline(time.Time{})
|
||||
_ = c.SetDeadlineSend(time.Time{})
|
||||
}()
|
||||
err = c.Send(data, retry...)
|
||||
return
|
||||
@ -177,37 +177,38 @@ func (c *Conn) SendRecvWithTimeout(data []byte, receive int, timeout time.Durati
|
||||
// SetDeadline sets the read and write deadlines associated with the connection.
|
||||
func (c *Conn) SetDeadline(t time.Time) (err error) {
|
||||
if err = c.UDPConn.SetDeadline(t); err == nil {
|
||||
c.receiveDeadline = t
|
||||
c.sendDeadline = t
|
||||
c.deadlineRecv = t
|
||||
c.deadlineSend = t
|
||||
} else {
|
||||
err = gerror.Wrapf(err, `SetDeadline for connection failed with "%s"`, t)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// SetRecvDeadline sets the read deadline associated with the connection.
|
||||
func (c *Conn) SetRecvDeadline(t time.Time) (err error) {
|
||||
// SetDeadlineRecv sets the read deadline associated with the connection.
|
||||
func (c *Conn) SetDeadlineRecv(t time.Time) (err error) {
|
||||
if err = c.SetReadDeadline(t); err == nil {
|
||||
c.receiveDeadline = t
|
||||
c.deadlineRecv = t
|
||||
} else {
|
||||
err = gerror.Wrapf(err, `SetReadDeadline for connection failed with "%s"`, t)
|
||||
err = gerror.Wrapf(err, `SetDeadlineRecv for connection failed with "%s"`, t)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Conn) SetSendDeadline(t time.Time) (err error) {
|
||||
// SetDeadlineSend sets the deadline of sending for current connection.
|
||||
func (c *Conn) SetDeadlineSend(t time.Time) (err error) {
|
||||
if err = c.SetWriteDeadline(t); err == nil {
|
||||
c.sendDeadline = t
|
||||
c.deadlineSend = t
|
||||
} else {
|
||||
err = gerror.Wrapf(err, `SetWriteDeadline for connection failed with "%s"`, t)
|
||||
err = gerror.Wrapf(err, `SetDeadlineSend for connection failed with "%s"`, t)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// SetRecvBufferWait sets the buffer waiting timeout when reading all data from connection.
|
||||
// SetBufferWaitRecv sets the buffer waiting timeout when reading all data from connection.
|
||||
// The waiting duration cannot be too long which might delay receiving data from remote address.
|
||||
func (c *Conn) SetRecvBufferWait(d time.Duration) {
|
||||
c.receiveBufferWait = d
|
||||
func (c *Conn) SetBufferWaitRecv(d time.Duration) {
|
||||
c.bufferWaitRecv = d
|
||||
}
|
||||
|
||||
// RemoteAddr returns the remote address of current UDP connection.
|
||||
|
@ -100,7 +100,7 @@ func Test_Basic(t *testing.T) {
|
||||
t.AssertNil(err)
|
||||
err = conn.Send([]byte(gconv.String(i)))
|
||||
t.AssertNil(err)
|
||||
conn.SetRecvBufferWait(time.Millisecond * 100)
|
||||
conn.SetBufferWaitRecv(time.Millisecond * 100)
|
||||
result, err := conn.RecvWithTimeout(-1, time.Second)
|
||||
t.AssertNil(err)
|
||||
t.Assert(string(result), fmt.Sprintf(`> %d`, i))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user