diff --git a/.travis.yml b/.travis.yml index 52cfa60..d32cd58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ branches: - master - v2 -go_import_path: hidevops.io/hiboot-data +go_import_path: github.com/hidevopsio/hiboot-data env: diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 8274ba6..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,878 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:b62a3c5b37db602bf1158e921da1a762315a4c37855fd418a14498aa87a342d5" - name = "cloud.google.com/go" - packages = ["civil"] - pruneopts = "UT" - revision = "97efc2c9ffd9fe8ef47f7f3203dc60bbca547374" - version = "v0.28.0" - -[[projects]] - digest = "1:b16fbfbcc20645cb419f78325bb2e85ec729b338e996a228124d68931a6f2a37" - name = "github.com/BurntSushi/toml" - packages = ["."] - pruneopts = "UT" - revision = "b26d9c308763d68093482582cea63d69be07a0f0" - version = "v0.3.0" - -[[projects]] - branch = "master" - digest = "1:164a36ea7dd8adbbe439458aeb3f55aeb1e18461be220ebab4937cec96fb1a6a" - name = "github.com/Joker/jade" - packages = ["."] - pruneopts = "UT" - revision = "8828253bfc54f2f91aaef5f32b44a244b0a98e4f" - -[[projects]] - branch = "master" - digest = "1:f3d644e4f9c0f3c3a23c0556df749b111bea11cf9f083f975659d8206535d06f" - name = "github.com/Shopify/goreferrer" - packages = ["."] - pruneopts = "UT" - revision = "b9777dc9f9cc3f3e426a01d218ddd6d52153f907" - -[[projects]] - digest = "1:2aff5edb9bccd2974090fddb17ca7ab05a3f5c983db567c30c7f0b53404f5783" - name = "github.com/ajg/form" - packages = ["."] - pruneopts = "UT" - revision = "cc2954064ec9ea8d93917f0f87456e11d7b881ad" - version = "v1.5" - -[[projects]] - branch = "master" - digest = "1:8c99bae8191c18fc5a2ba4cc0ab7d2d3d669dfb892e32561e867418ecc25bb05" - name = "github.com/aymerick/raymond" - packages = [ - ".", - "ast", - "lexer", - "parser", - ] - pruneopts = "UT" - revision = "b565731e1464263de0bda75f2e45d97b54b60110" - -[[projects]] - digest = "1:0f98f59e9a2f4070d66f0c9c39561f68fcd1dc837b22a852d28d0003aebd1b1e" - name = "github.com/boltdb/bolt" - packages = ["."] - pruneopts = "UT" - revision = "2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8" - version = "v1.3.1" - -[[projects]] - digest = "1:8c99488f6d10d92104ee155409ae42ed65badf2a745cd7709c05cb48ef540e68" - name = "github.com/coreos/etcd" - packages = [ - "auth/authpb", - "clientv3", - "etcdserver/api/v3rpc/rpctypes", - "etcdserver/etcdserverpb", - "mvcc/mvccpb", - "pkg/tlsutil", - "pkg/transport", - "pkg/types", - ] - pruneopts = "UT" - revision = "fca8add78a9d926166eb739b8e4a124434025ba3" - version = "v3.3.9" - -[[projects]] - digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "UT" - revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" - version = "v1.1.1" - -[[projects]] - digest = "1:e47d51dab652d26c3fba6f8cba403f922d02757a82abdc77e90df7948daf296e" - name = "github.com/deckarep/golang-set" - packages = ["."] - pruneopts = "UT" - revision = "cbaa98ba5575e67703b32b4b19f73c91f3c4159e" - version = "v1.7.1" - -[[projects]] - branch = "master" - digest = "1:6f120164f62e62991d0f85562abe2002d438abb2ca80b7717a2f4ae2af1c6829" - name = "github.com/denisenkom/go-mssqldb" - packages = [ - ".", - "internal/cp", - ] - pruneopts = "UT" - revision = "1eb28afdf9b6e56cf673badd47545f844fe81103" - -[[projects]] - branch = "master" - digest = "1:f524f46fd5c8f8ae8bef1f754683f2fbb951fb616010be6ff6eed9a6e4082fd7" - name = "github.com/eknkc/amber" - packages = [ - ".", - "parser", - ] - pruneopts = "UT" - revision = "cdade1c073850f4ffc70a829e31235ea6892853b" - -[[projects]] - branch = "master" - digest = "1:c3350d654d335f3bd199e44805f79da6d5a29b254a3457b83ac399210824c89b" - name = "github.com/erikstmartin/go-testdb" - packages = ["."] - pruneopts = "UT" - revision = "8d10e4a1bae52cd8b81ffdec3445890d6dccab3d" - -[[projects]] - digest = "1:bbc4aacabe6880bdbce849c64cb061b7eddf39f132af4ea2853ddd32f85fbec3" - name = "github.com/fatih/camelcase" - packages = ["."] - pruneopts = "UT" - revision = "44e46d280b43ec1531bb25252440e34f1b800b65" - version = "v1.0.0" - -[[projects]] - digest = "1:ca82a3b99694824c627573c2a76d0e49719b4a9c02d1d85a2ac91f1c1f52ab9b" - name = "github.com/fatih/structs" - packages = ["."] - pruneopts = "UT" - revision = "a720dfa8df582c51dee1b36feabb906bde1588bd" - version = "v1.0" - -[[projects]] - branch = "master" - digest = "1:21b9131fddca407b60999864676deeaa3d81626eef996658c3828628b9ce0b9c" - name = "github.com/flosch/pongo2" - packages = ["."] - pruneopts = "UT" - revision = "24195e6d38b06020d7a92c7b11960cf2e7cad2f2" - -[[projects]] - digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd" - name = "github.com/fsnotify/fsnotify" - packages = ["."] - pruneopts = "UT" - revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" - version = "v1.4.7" - -[[projects]] - branch = "master" - digest = "1:fbc02c2b3b78e6bc30228f3bae582f1fcea74a050cbdbf42f24eff12bef8eab4" - name = "github.com/gavv/monotime" - packages = ["."] - pruneopts = "UT" - revision = "6f8212e8d10df7383609d3c377ca08884d8f3ec0" - -[[projects]] - digest = "1:adea5a94903eb4384abef30f3d878dc9ff6b6b5b0722da25b82e5169216dfb61" - name = "github.com/go-sql-driver/mysql" - packages = ["."] - pruneopts = "UT" - revision = "d523deb1b23d913de5bdada721a6071e71283618" - version = "v1.4.0" - -[[projects]] - digest = "1:bfc758d5a03d57d97226fac6934551c01bd76612adb119c177395b057a0a46db" - name = "github.com/gogo/protobuf" - packages = [ - "gogoproto", - "proto", - "protoc-gen-gogo/descriptor", - ] - pruneopts = "UT" - revision = "636bf0302bc95575d69441b25a2603156ffdddf1" - version = "v1.1.1" - -[[projects]] - digest = "1:4c0989ca0bcd10799064318923b9bc2db6b4d6338dd75f3f2d86c3511aaaf5cf" - name = "github.com/golang/protobuf" - packages = [ - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp", - ] - pruneopts = "UT" - revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" - version = "v1.2.0" - -[[projects]] - branch = "master" - digest = "1:a63cff6b5d8b95638bfe300385d93b2a6d9d687734b863da8e09dc834510a690" - name = "github.com/google/go-querystring" - packages = ["query"] - pruneopts = "UT" - revision = "44c6ddd0a2342c386950e880b658017258da92fc" - -[[projects]] - digest = "1:77395dd3847dac9c45118c668f5dab85aedf0163dc3b38aea6578c5cf0d502f9" - name = "github.com/hashicorp/go-version" - packages = ["."] - pruneopts = "UT" - revision = "b5a281d3160aa11950a6182bd9a9dc2cb1e02d50" - version = "v1.0.0" - -[[projects]] - digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10" - name = "github.com/hashicorp/hcl" - packages = [ - ".", - "hcl/ast", - "hcl/parser", - "hcl/printer", - "hcl/scanner", - "hcl/strconv", - "hcl/token", - "json/parser", - "json/scanner", - "json/token", - ] - pruneopts = "UT" - revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241" - version = "v1.0.0" - -[[projects]] - digest = "1:31119c7a7683a263ada97d8af5a0258fa2dbc90a641756913dfab41c910e7245" - name = "github.com/hidevopsio/gorm" - packages = [ - ".", - "dialects/mssql", - "dialects/mysql", - "dialects/postgres", - "dialects/sqlite", - ] - pruneopts = "UT" - revision = "c63e030600d114f09f451c887732f616e5a6da48" - version = "v2.0.1" - -[[projects]] - digest = "1:a3ce4de79566c21e93cb6934797fdaa587ad3fc6a964708ab77babe54ea67188" - name = "github.com/imkira/go-interpol" - packages = ["."] - pruneopts = "UT" - revision = "5accad8134979a6ac504d456a6c7f1c53da237ca" - version = "v1.1.0" - -[[projects]] - branch = "master" - digest = "1:8a2a940fd81980cd5394dbb60a8f9ab49b5d8195e52cddec562b9a40eab394f0" - name = "github.com/iris-contrib/blackfriday" - packages = ["."] - pruneopts = "UT" - revision = "48b3da6a6f3865c7eb1eba96d74cf0a16f63faca" - -[[projects]] - branch = "master" - digest = "1:be0e14e780a05a33d034ff3a33c385a383a028c84df710a95ec402062df025c3" - name = "github.com/iris-contrib/formBinder" - packages = ["."] - pruneopts = "UT" - revision = "ad9fb86c356f971f30319c40ddbdcf72129a2791" - -[[projects]] - branch = "v2" - digest = "1:ff6b0586c0621a76832cf783eee58cbb9d9795d2ce8acbc199a4131db11c42a9" - name = "github.com/iris-contrib/go.uuid" - packages = ["."] - pruneopts = "UT" - revision = "36e9d2ebbde5e3f13ab2e25625fd453271d6522e" - -[[projects]] - branch = "master" - digest = "1:5f35bfd7932f3f7866d8a6efae3e57ee7862721065ef91abc657089e1193f1e2" - name = "github.com/iris-contrib/httpexpect" - packages = ["."] - pruneopts = "UT" - revision = "ebe99fcebbcedf6e7916320cce24c3e1832766ac" - -[[projects]] - branch = "master" - digest = "1:f3e05c804e1c6e5928dbf5e20a9601fa0318af3812a0eb3559d2ef4533295eca" - name = "github.com/iris-contrib/i18n" - packages = ["."] - pruneopts = "UT" - revision = "987a633949d087ba52207b587792e8c67d65780b" - -[[projects]] - branch = "master" - digest = "1:5c3444689562053b027ef3b96372e306adbe0d7d109b6cdd48d01eb80f8bab14" - name = "github.com/jinzhu/copier" - packages = ["."] - pruneopts = "UT" - revision = "7e38e58719c33e0d44d585c4ab477a30f8cb82dd" - -[[projects]] - branch = "master" - digest = "1:fd97437fbb6b7dce04132cf06775bd258cce305c44add58eb55ca86c6c325160" - name = "github.com/jinzhu/inflection" - packages = ["."] - pruneopts = "UT" - revision = "04140366298a54a039076d798123ffa108fff46c" - -[[projects]] - branch = "master" - digest = "1:8d44b575d464430d321863488733d08f98b925721fff5b5f7f5011b6848ef135" - name = "github.com/json-iterator/go" - packages = ["."] - pruneopts = "UT" - revision = "2433035e513208b0f7bd5b50d0aecd889b2c1ff8" - -[[projects]] - branch = "master" - digest = "1:1261ccace00babbf02bb702e71c85c8e81f65bad7bdb98c12c7a409c14de1d86" - name = "github.com/juju/errors" - packages = ["."] - pruneopts = "UT" - revision = "22422dad46e14561a0854ad42497a75af9b61909" - -[[projects]] - branch = "master" - digest = "1:f17dfd7df684b802076e8b0b316f27788763f647f8dbee368c98b2cb933d8657" - name = "github.com/kataras/golog" - packages = ["."] - pruneopts = "UT" - revision = "03be101463868edc5a81f094fc68a5f6c1b5503a" - -[[projects]] - digest = "1:e7f8df75fb199d9eb720dbc1b23ad0b139dd6f88101c5b5d9c7b80cb2301fdf7" - name = "github.com/kataras/iris" - packages = [ - ".", - "cache", - "cache/cfg", - "cache/client", - "cache/client/rule", - "cache/entry", - "cache/ruleset", - "cache/uri", - "context", - "core/errors", - "core/handlerconv", - "core/host", - "core/maintenance", - "core/maintenance/version", - "core/memstore", - "core/netutil", - "core/router", - "core/router/macro", - "core/router/macro/interpreter/ast", - "core/router/macro/interpreter/lexer", - "core/router/macro/interpreter/parser", - "core/router/macro/interpreter/token", - "core/router/node", - "httptest", - "middleware/i18n", - "middleware/logger", - "middleware/recover", - "view", - ] - pruneopts = "UT" - revision = "39b8b1eb00eae9914addee3dee3612ffa785817f" - version = "v10.7.1" - -[[projects]] - branch = "master" - digest = "1:12dd62070fab270c309a993d1b3d2c09c78313ae7cd11be06eb36f80b41b0aef" - name = "github.com/kataras/pio" - packages = [ - ".", - "terminal", - ] - pruneopts = "UT" - revision = "a9733b5b6b83d32b479aacd51d26ef6018261963" - -[[projects]] - branch = "v2" - digest = "1:f07bdc2e8067cea1616c6f770760b5e21700ac9c8d1ca3bbbc735eec659fbefc" - name = "github.com/kataras/survey" - packages = [ - ".", - "core", - "terminal", - ] - pruneopts = "UT" - revision = "00934ae069eda15df26fa427ac393e67e239380c" - -[[projects]] - digest = "1:bc00f32084cbf3d1af8adf273c7dc132d55d88762231c0c26c136e576feddb55" - name = "github.com/klauspost/compress" - packages = [ - "flate", - "gzip", - ] - pruneopts = "UT" - revision = "b939724e787a27c0005cabe3f78e7ed7987ac74f" - version = "v1.4.0" - -[[projects]] - digest = "1:4ea0668d490ca32a38366453a486e2e8c60fbdaf1f2607c96b4a093d8a5c8de7" - name = "github.com/klauspost/cpuid" - packages = ["."] - pruneopts = "UT" - revision = "ae7887de9fa5d2db4eaa8174a7eff2c1ac00f2da" - version = "v1.1" - -[[projects]] - digest = "1:b18ffc558326ebaed3b4a175617f1e12ed4e3f53d6ebfe5ba372a3de16d22278" - name = "github.com/lib/pq" - packages = [ - ".", - "hstore", - "oid", - ] - pruneopts = "UT" - revision = "4ded0e9383f75c197b3a2aaa6d590ac52df6fd79" - version = "v1.0.0" - -[[projects]] - digest = "1:c568d7727aa262c32bdf8a3f7db83614f7af0ed661474b24588de635c20024c7" - name = "github.com/magiconair/properties" - packages = ["."] - pruneopts = "UT" - revision = "c2353362d570a7bfa228149c62842019201cfb71" - version = "v1.8.0" - -[[projects]] - digest = "1:c658e84ad3916da105a761660dcaeb01e63416c8ec7bc62256a9b411a05fcd67" - name = "github.com/mattn/go-colorable" - packages = ["."] - pruneopts = "UT" - revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" - version = "v0.0.9" - -[[projects]] - digest = "1:0981502f9816113c9c8c4ac301583841855c8cf4da8c72f696b3ebedf6d0e4e5" - name = "github.com/mattn/go-isatty" - packages = ["."] - pruneopts = "UT" - revision = "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c" - version = "v0.0.4" - -[[projects]] - digest = "1:3cafc6a5a1b8269605d9df4c6956d43d8011fc57f266ca6b9d04da6c09dee548" - name = "github.com/mattn/go-sqlite3" - packages = ["."] - pruneopts = "UT" - revision = "25ecb14adfc7543176f7d85291ec7dba82c6f7e4" - version = "v1.9.0" - -[[projects]] - branch = "master" - digest = "1:2b32af4d2a529083275afc192d1067d8126b578c7a9613b26600e4df9c735155" - name = "github.com/mgutz/ansi" - packages = ["."] - pruneopts = "UT" - revision = "9520e82c474b0a04dd04f8a40959027271bab992" - -[[projects]] - branch = "master" - digest = "1:1fc201f179a7d45f944655de3cdbfb0a8a226fd525569454e31ca87f9e4bb677" - name = "github.com/microcosm-cc/bluemonday" - packages = ["."] - pruneopts = "UT" - revision = "82c7118e8ccf7403d4860175d97bb635e8e28239" - -[[projects]] - digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318" - name = "github.com/mitchellh/mapstructure" - packages = ["."] - pruneopts = "UT" - revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe" - version = "v1.1.2" - -[[projects]] - digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563" - name = "github.com/modern-go/concurrent" - packages = ["."] - pruneopts = "UT" - revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" - version = "1.0.3" - -[[projects]] - digest = "1:e32bdbdb7c377a07a9a46378290059822efdce5c8d96fe71940d87cb4f918855" - name = "github.com/modern-go/reflect2" - packages = ["."] - pruneopts = "UT" - revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" - version = "1.0.1" - -[[projects]] - branch = "master" - digest = "1:7aefb397a53fc437c90f0fdb3e1419c751c5a3a165ced52325d5d797edf1aca6" - name = "github.com/moul/http2curl" - packages = ["."] - pruneopts = "UT" - revision = "9ac6cf4d929b2fa8fd2d2e6dec5bb0feb4f4911d" - -[[projects]] - digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" - name = "github.com/pelletier/go-toml" - packages = ["."] - pruneopts = "UT" - revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194" - version = "v1.2.0" - -[[projects]] - digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - pruneopts = "UT" - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - branch = "master" - digest = "1:0cdbe7b717bdc81f143bbdd516c3639828c5e1cd158e4140ca100d657fc26550" - name = "github.com/ryanuber/columnize" - packages = ["."] - pruneopts = "UT" - revision = "abc90934186a77966e2beeac62ed966aac0561d5" - -[[projects]] - digest = "1:d917313f309bda80d27274d53985bc65651f81a5b66b820749ac7f8ef061fd04" - name = "github.com/sergi/go-diff" - packages = ["diffmatchpatch"] - pruneopts = "UT" - revision = "1744e2970ca51c86172c8190fadad617561ed6e7" - version = "v1.0.0" - -[[projects]] - branch = "master" - digest = "1:def689e73e9252f6f7fe66834a76751a41b767e03daab299e607e7226c58a855" - name = "github.com/shurcooL/sanitized_anchor_name" - packages = ["."] - pruneopts = "UT" - revision = "86672fcb3f950f35f2e675df2240550f2a50762f" - -[[projects]] - branch = "master" - digest = "1:8e9c06a6265bacd03807c0e4776c91b0d36d7ea0f91c87f7f044a04c44f489b2" - name = "github.com/sony/sonyflake" - packages = ["."] - pruneopts = "UT" - revision = "fa881fb1052b152e977c41023052c2f2a1c475e9" - -[[projects]] - digest = "1:6a4a11ba764a56d2758899ec6f3848d24698d48442ebce85ee7a3f63284526cd" - name = "github.com/spf13/afero" - packages = [ - ".", - "mem", - ] - pruneopts = "UT" - revision = "d40851caa0d747393da1ffb28f7f9d8b4eeffebd" - version = "v1.1.2" - -[[projects]] - digest = "1:08d65904057412fc0270fc4812a1c90c594186819243160dc779a402d4b6d0bc" - name = "github.com/spf13/cast" - packages = ["."] - pruneopts = "UT" - revision = "8c9545af88b134710ab1cd196795e7f2388358d7" - version = "v1.3.0" - -[[projects]] - digest = "1:68ea4e23713989dc20b1bded5d9da2c5f9be14ff9885beef481848edd18c26cb" - name = "github.com/spf13/jwalterweatherman" - packages = ["."] - pruneopts = "UT" - revision = "4a4406e478ca629068e7768fc33f3f044173c0a6" - version = "v1.0.0" - -[[projects]] - digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2" - name = "github.com/spf13/pflag" - packages = ["."] - pruneopts = "UT" - revision = "298182f68c66c05229eb03ac171abe6e309ee79a" - version = "v1.0.3" - -[[projects]] - digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02" - name = "github.com/stretchr/objx" - packages = ["."] - pruneopts = "UT" - revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c" - version = "v0.1.1" - -[[projects]] - digest = "1:cf4fdb98e23a565bd82473027d37512a3d5b186fba3a1895d7e8401d8ce3ffe1" - name = "github.com/stretchr/testify" - packages = [ - "assert", - "mock", - "require", - ] - pruneopts = "UT" - revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" - version = "v1.2.2" - -[[projects]] - branch = "master" - digest = "1:f4e5276a3b356f4692107047fd2890f2fe534f4feeb6b1fd2f6dfbd87f1ccf54" - name = "github.com/xeipuuv/gojsonpointer" - packages = ["."] - pruneopts = "UT" - revision = "4e3ac2762d5f479393488629ee9370b50873b3a6" - -[[projects]] - branch = "master" - digest = "1:dc6a6c28ca45d38cfce9f7cb61681ee38c5b99ec1425339bfc1e1a7ba769c807" - name = "github.com/xeipuuv/gojsonreference" - packages = ["."] - pruneopts = "UT" - revision = "bd5ef7bd5415a7ac448318e64f11a24cd21e594b" - -[[projects]] - branch = "master" - digest = "1:41bd4de0a27c0b7affef4083bc8f86501b4c7d891f95809a0fb758a23eb5e78f" - name = "github.com/xeipuuv/gojsonschema" - packages = ["."] - pruneopts = "UT" - revision = "da425ebb7609ba06a0f395fc8a254d1c303364a0" - -[[projects]] - branch = "master" - digest = "1:ac3d942a027d57fbfc5c13791cfaaa4b30729674fea88f2e03190b777c2b674e" - name = "github.com/yalp/jsonpath" - packages = ["."] - pruneopts = "UT" - revision = "5cc68e5049a040829faef3a44c00ec4332f6dec7" - -[[projects]] - digest = "1:52ccbcf36804b0beb5677a8994bd4ac740b71d1d6fe38c02b113dabdda51bf6d" - name = "github.com/yudai/gojsondiff" - packages = [ - ".", - "formatter", - ] - pruneopts = "UT" - revision = "7b1b7adf999dab73a6eb02669c3d82dbb27a3dd6" - version = "1.0.0" - -[[projects]] - branch = "master" - digest = "1:0d4822d3440c9b5992704bb357061fff7ab60daa85d92dec02b81b78e4908db7" - name = "github.com/yudai/golcs" - packages = ["."] - pruneopts = "UT" - revision = "ecda9a501e8220fae3b4b600c3db4b0ba22cfc68" - -[[projects]] - branch = "master" - digest = "1:21fff5e6df3eecd602ee8f53b0df0e19ecdfbe601e8e1baec628a4189b34d491" - name = "golang.org/x/crypto" - packages = [ - "acme", - "acme/autocert", - "md4", - ] - pruneopts = "UT" - revision = "0e37d006457bf46f9e6692014ba72ef82c33022c" - -[[projects]] - branch = "master" - digest = "1:15602646c6a0f753dedf287b903aeae4520317773c98ed8ef653ba42f75476cd" - name = "golang.org/x/net" - packages = [ - "context", - "html", - "html/atom", - "http/httpguts", - "http2", - "http2/hpack", - "idna", - "internal/timeseries", - "publicsuffix", - "trace", - ] - pruneopts = "UT" - revision = "26e67e76b6c3f6ce91f7c52def5af501b4e0f3a2" - -[[projects]] - branch = "master" - digest = "1:6eb2645d74b43d9c87b51947df39f7c668a4f422cd512053f7f6f75bfaad0197" - name = "golang.org/x/sys" - packages = ["unix"] - pruneopts = "UT" - revision = "d0be0721c37eeb5299f245a996a483160fc36940" - -[[projects]] - digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - ] - pruneopts = "UT" - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[[projects]] - digest = "1:c25289f43ac4a68d88b02245742347c94f1e108c534dda442188015ff80669b3" - name = "google.golang.org/appengine" - packages = ["cloudsql"] - pruneopts = "UT" - revision = "b1f26356af11148e710935ed1ac8a7f5702c7612" - version = "v1.1.0" - -[[projects]] - branch = "master" - digest = "1:4b89f7cb4fa89ee4b8ec3fff8e91105e7f1fee84761edcb063a738e376c53357" - name = "google.golang.org/genproto" - packages = ["googleapis/rpc/status"] - pruneopts = "UT" - revision = "4b56f30a1fd96a133a036b62cdd2a249883dd89b" - -[[projects]] - digest = "1:c52f29435ecb5b76c37e7f0098b6a50dbe60f8624d820827d0fede75c40199a1" - name = "google.golang.org/grpc" - packages = [ - ".", - "balancer", - "balancer/base", - "balancer/roundrobin", - "codes", - "connectivity", - "credentials", - "encoding", - "encoding/proto", - "grpclog", - "health/grpc_health_v1", - "internal", - "internal/backoff", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "resolver/dns", - "resolver/passthrough", - "stats", - "status", - "tap", - ] - pruneopts = "UT" - revision = "8dea3dc473e90c8179e519d91302d0597c0ca1d1" - version = "v1.15.0" - -[[projects]] - digest = "1:cbc72c4c4886a918d6ab4b95e347ffe259846260f99ebdd8a198c2331cf2b2e9" - name = "gopkg.in/go-playground/validator.v8" - packages = ["."] - pruneopts = "UT" - revision = "5f1438d3fca68893a817e4a66806cea46a9e4ebf" - version = "v8.18.2" - -[[projects]] - digest = "1:5abd6a22805b1919f6a6bca0ae58b13cef1f3412812f38569978f43ef02743d4" - name = "gopkg.in/ini.v1" - packages = ["."] - pruneopts = "UT" - revision = "5cf292cae48347c2490ac1a58fe36735fb78df7e" - version = "v1.38.2" - -[[projects]] - digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202" - name = "gopkg.in/yaml.v2" - packages = ["."] - pruneopts = "UT" - revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" - version = "v2.2.1" - -[[projects]] - digest = "1:cdbef7eaf280d31d18b3dd56b047fd986dc9249d039a5227c494d291266adcb3" - name = "hidevops.io/hiboot" - packages = [ - "pkg/app", - "pkg/app/web", - "pkg/app/web/context", - "pkg/at", - "pkg/factory", - "pkg/factory/autoconfigure", - "pkg/factory/depends", - "pkg/factory/instantiate", - "pkg/inject", - "pkg/log", - "pkg/model", - "pkg/starter/actuator", - "pkg/starter/locale", - "pkg/starter/logging", - "pkg/system", - "pkg/system/types", - "pkg/utils/cmap", - "pkg/utils/copier", - "pkg/utils/crypto", - "pkg/utils/crypto/base64", - "pkg/utils/crypto/rsa", - "pkg/utils/idgen", - "pkg/utils/io", - "pkg/utils/mapstruct", - "pkg/utils/reflector", - "pkg/utils/replacer", - "pkg/utils/str", - "pkg/utils/validator", - ] - pruneopts = "UT" - revision = "4222ad7c4524bbf047be68db6daf33b4b3d91ef0" - version = "v0.11.1" - -[[projects]] - digest = "1:7a2b59ae200fa4db0b8753c2585f103fd9f3b2f34107913d5ffc35fdddd51779" - name = "hidevops.io/viper" - packages = ["."] - pruneopts = "UT" - revision = "86828cc12e0d5432e8440421083c6cf8f905470c" - version = "v1.3.1" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/boltdb/bolt", - "github.com/coreos/etcd/clientv3", - "github.com/coreos/etcd/mvcc/mvccpb", - "github.com/coreos/etcd/pkg/transport", - "github.com/erikstmartin/go-testdb", - "github.com/hidevopsio/gorm", - "github.com/hidevopsio/gorm/dialects/mssql", - "github.com/hidevopsio/gorm/dialects/mysql", - "github.com/hidevopsio/gorm/dialects/postgres", - "github.com/hidevopsio/gorm/dialects/sqlite", - "github.com/stretchr/testify/assert", - "github.com/stretchr/testify/mock", - "golang.org/x/net/context", - "hidevops.io/hiboot/pkg/app", - "hidevops.io/hiboot/pkg/app/web", - "hidevops.io/hiboot/pkg/at", - "hidevops.io/hiboot/pkg/log", - "hidevops.io/hiboot/pkg/model", - "hidevops.io/hiboot/pkg/starter/actuator", - "hidevops.io/hiboot/pkg/starter/locale", - "hidevops.io/hiboot/pkg/starter/logging", - "hidevops.io/hiboot/pkg/utils/copier", - "hidevops.io/hiboot/pkg/utils/crypto/rsa", - "hidevops.io/hiboot/pkg/utils/idgen", - "hidevops.io/hiboot/pkg/utils/reflector", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index ed4d20f..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,54 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - name = "github.com/boltdb/bolt" - version = "1.3.1" - -[[constraint]] - branch = "master" - name = "github.com/erikstmartin/go-testdb" - -[[constraint]] - name = "github.com/hidevopsio/gorm" - version = "2.0.1" - -[[constraint]] - name = "hidevops.io/hiboot" - version = "v1.0.2" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.2.2" - -[[constraint]] - branch = "master" - name = "golang.org/x/net" - -[prune] - go-tests = true - unused-packages = true diff --git a/README.md b/README.md index 0973e18..1c83ec9 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,16 @@

- - Build Status - - - + + - +

@@ -37,7 +34,7 @@ then Hiboot auto-configures an database bolt for any service to inject. You need to opt-in to auto-configuration by embedding app.Configuration in your configuration and calling the app.Register() function inside the init() function of your configuration pkg. -For more details, see https://godoc.org/hidevops.io/hiboot/pkg/starter +For more details, see https://godoc.org/github.com/hidevopsio/hiboot/pkg/starter ## Creating Your Own Starter @@ -87,7 +84,7 @@ import ( "encoding/json" "errors" "github.com/boltdb/bolt" - "hidevops.io/hiboot-data/starter" + "hiboot-data/starter" "sync" ) @@ -237,8 +234,8 @@ package bolt // limitations under the License. import ( - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/log" ) type boltConfiguration struct { @@ -275,7 +272,7 @@ func (c *boltConfiguration) BoltRepository() Repository { After bolt starter is built, you can inject it directly in your application. -Below is the example, for more details, please see [example](https://hidevops.io/hiboot-data/tree/master/examples/bolt) +Below is the example, for more details, please see [example](https://hiboot-data/tree/master/examples/bolt) ```go @@ -283,9 +280,9 @@ Below is the example, for more details, please see [example](https://hidevops.io package service import ( - "hidevops.io/hiboot-data/examples/bolt/entity" - "hidevops.io/hiboot-data/starter/bolt" - "hidevops.io/hiboot/pkg/app" + "hiboot-data/examples/bolt/entity" + "hiboot-data/starter/bolt" + "github.com/hidevopsio/hiboot/pkg/app" ) type UserService struct { @@ -296,7 +293,7 @@ func init() { app.Register(newUserService) } -// will inject BoltRepository that configured in hidevops.io/hiboot-data/starter/bolt +// will inject BoltRepository that configured in hiboot-data/starter/bolt func newUserService(repository bolt.Repository) *UserService { return &UserService{ repository: repository, diff --git a/examples/amqp/config/application.yml b/examples/amqp/config/application.yml index 8fe9171..7ad498e 100644 --- a/examples/amqp/config/application.yml +++ b/examples/amqp/config/application.yml @@ -9,10 +9,10 @@ app: - amqp amqp: - host: amqp + host: rabbitmq port: 5672 - username: root - password: 123456 + username: user + password: password logging: level: debug diff --git a/examples/amqp/controller/user.go b/examples/amqp/controller/user.go index 8c29d0e..0483a07 100644 --- a/examples/amqp/controller/user.go +++ b/examples/amqp/controller/user.go @@ -15,13 +15,13 @@ package controller import ( - "hidevops.io/hiboot-data/examples/amqp/service" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/at" - "hidevops.io/hiboot/pkg/model" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/model" + "hiboot-data/examples/amqp/service" ) -//hi: RestController +// hi: RestController type UserController struct { at.RestController at.RequestMapping `value:"/user"` @@ -41,32 +41,44 @@ func newUserController(userService *service.UserService) *UserController { } // Post /user -func (c *UserController) Publish(at struct{at.PostMapping `value:"/publish"`}) (model.Response, error) { +func (c *UserController) Publish(at struct { + at.PostMapping `value:"/publish"` +}) (model.Response, error) { err := c.userService.PublishFanout() return nil, err } -func (c *UserController) Push(at struct{at.PostMapping `value:"/push"`}) (model.Response, error) { +func (c *UserController) Push(at struct { + at.PostMapping `value:"/push"` +}) (model.Response, error) { err := c.userService.Publish() return nil, err } -func (c *UserController) Receive(at struct{at.PostMapping `value:"/receive"`}) (model.Response, error) { +func (c *UserController) Receive(at struct { + at.PostMapping `value:"/receive"` +}) (model.Response, error) { c.userService.ReceiveFanout() return nil, nil } -func (c *UserController) Receive1(at struct{at.PostMapping `value:"/receive1"`}) (model.Response, error) { +func (c *UserController) Receive1(at struct { + at.PostMapping `value:"/receive1"` +}) (model.Response, error) { c.userService.ReceiveFanout3() return nil, nil } -func (c *UserController) Create(at struct{at.PostMapping `value:"/create"`}) (model.Response, error) { +func (c *UserController) Create(at struct { + at.PostMapping `value:"/create"` +}) (model.Response, error) { err := c.userService.Create() return nil, err } -func (c *UserController) Create1(at struct{at.PostMapping `value:"/create1"`}) (model.Response, error) { +func (c *UserController) Create1(at struct { + at.PostMapping `value:"/create1"` +}) (model.Response, error) { err := c.userService.Create1() return nil, err -} \ No newline at end of file +} diff --git a/examples/amqp/controller/user_test.go b/examples/amqp/controller/user_test.go index debcaa6..2ce37f0 100644 --- a/examples/amqp/controller/user_test.go +++ b/examples/amqp/controller/user_test.go @@ -15,8 +15,8 @@ package controller import ( - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/log" "net/http" "testing" ) @@ -27,7 +27,7 @@ func init() { func TestCrdRequest(t *testing.T) { // TODO: mock UserService - testApp := web.NewTestApplication(t, newUserController) + testApp := web.NewTestApp(t, newUserController).Run(t) t.Run("should add user with POST request", func(t *testing.T) { // First, let's Post User diff --git a/examples/amqp/main.go b/examples/amqp/main.go index ba74fee..8d91f7e 100644 --- a/examples/amqp/main.go +++ b/examples/amqp/main.go @@ -15,11 +15,11 @@ package main import ( - _ "hidevops.io/hiboot-data/examples/amqp/controller" - "hidevops.io/hiboot-data/starter/amqp" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/starter/actuator" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/starter/actuator" + _ "hiboot-data/examples/amqp/controller" + "hiboot-data/starter/amqp" ) func main() { diff --git a/examples/amqp/service/user.go b/examples/amqp/service/user.go index f134b5f..ea9e578 100644 --- a/examples/amqp/service/user.go +++ b/examples/amqp/service/user.go @@ -16,10 +16,10 @@ package service import ( "errors" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/log" str_amqp "github.com/streadway/amqp" - "hidevops.io/hiboot-data/starter/amqp" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/log" + "hiboot-data/starter/amqp" "time" ) @@ -31,7 +31,7 @@ func init() { app.Register(newUserService) } -// will inject BoltRepository that configured in hidevops.io/hiboot/pkg/starter/data/bolt +// will inject BoltRepository that configured in github.com/hidevopsio/hiboot/pkg/starter/data/bolt func newUserService(newChannel amqp.NewChannel) *UserService { return &UserService{ newChannel: newChannel, diff --git a/examples/amqp/service/user_test.go b/examples/amqp/service/user_test.go index a4c7bba..bb6e678 100644 --- a/examples/amqp/service/user_test.go +++ b/examples/amqp/service/user_test.go @@ -15,8 +15,8 @@ package service import ( - "hidevops.io/hiboot-data/examples/bolt/entity" - "hidevops.io/hiboot-data/starter" + "hiboot-data/examples/bolt/entity" + "hiboot-data/starter" ) type FakeRepository struct { diff --git a/examples/bolt/README.md b/examples/bolt/README.md index 51d209a..b51980a 100644 --- a/examples/bolt/README.md +++ b/examples/bolt/README.md @@ -14,8 +14,8 @@ main.go package main import ( - "hidevops.io/hiboot/pkg/starter/web" - _ "hidevops.io/hiboot/examples/db/bolt/controllers" + "github.com/hidevopsio/hiboot/pkg/starter/web" + _ "github.com/hidevopsio/hiboot/examples/db/bolt/controllers" ) func main() { @@ -56,14 +56,14 @@ type UserController struct { In order to inject Repository into Service, you need to -* import hidevops.io/hiboot/pkg/starter/db +* import github.com/hidevopsio/hiboot/pkg/starter/db * add tag `component:"repository" dataSourceType:"bolt"` to the field Repository of UserService ```go import ( - "hidevops.io/hiboot/pkg/starter/db" + "github.com/hidevopsio/hiboot/pkg/starter/db" ) type UserService struct { diff --git a/examples/bolt/controller/user.go b/examples/bolt/controller/user.go index 206402b..0159767 100644 --- a/examples/bolt/controller/user.go +++ b/examples/bolt/controller/user.go @@ -15,15 +15,14 @@ package controller import ( - "hidevops.io/hiboot-data/examples/bolt/entity" - "hidevops.io/hiboot-data/examples/bolt/service" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/at" - "hidevops.io/hiboot/pkg/model" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/model" + "hiboot-data/examples/bolt/entity" + "hiboot-data/examples/bolt/service" "net/http" ) -//hi: RestController type UserController struct { at.RestController at.RequestMapping `value:"/user"` @@ -43,7 +42,9 @@ func newUserController(userService *service.UserService) *UserController { } // Post /user -func (c *UserController) Post(at struct{at.PostMapping `value:"/"`}, user *entity.User) (model.Response, error) { +func (c *UserController) Post(at struct { + at.PostMapping `value:"/"` +}, user *entity.User) (model.Response, error) { err := c.userService.AddUser(user) response := new(model.BaseResponse) response.SetData(user) @@ -51,7 +52,9 @@ func (c *UserController) Post(at struct{at.PostMapping `value:"/"`}, user *entit } // Get /user/id/{id} -func (c *UserController) GetById(at struct{at.GetMapping `value:"/{id}"`}, id string) (model.Response, error) { +func (c *UserController) GetById(at struct { + at.GetMapping `value:"/{id}"` +}, id string) (model.Response, error) { user, err := c.userService.GetUser(id) response := new(model.BaseResponse) if err != nil { @@ -63,7 +66,9 @@ func (c *UserController) GetById(at struct{at.GetMapping `value:"/{id}"`}, id st } // Delete /user/id/{id} -func (c *UserController) DeleteById(at struct{at.DeleteMapping `value:"/{id}"`}, id string) (response model.Response, err error) { +func (c *UserController) DeleteById(at struct { + at.DeleteMapping `value:"/{id}"` +}, id string) (response model.Response, err error) { err = c.userService.DeleteUser(id) response = new(model.BaseResponse) return diff --git a/examples/bolt/controller/user_test.go b/examples/bolt/controller/user_test.go index 769356c..f734f40 100644 --- a/examples/bolt/controller/user_test.go +++ b/examples/bolt/controller/user_test.go @@ -15,9 +15,9 @@ package controller import ( - "hidevops.io/hiboot-data/examples/bolt/entity" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/log" + "hiboot-data/examples/bolt/entity" "net/http" "testing" ) diff --git a/examples/bolt/entity/user.go b/examples/bolt/entity/user.go index 0302664..be5a95a 100644 --- a/examples/bolt/entity/user.go +++ b/examples/bolt/entity/user.go @@ -14,7 +14,7 @@ package entity -import "hidevops.io/hiboot/pkg/model" +import "github.com/hidevopsio/hiboot/pkg/model" type User struct { model.RequestBody diff --git a/examples/bolt/main.go b/examples/bolt/main.go index 794b317..d01a0cb 100644 --- a/examples/bolt/main.go +++ b/examples/bolt/main.go @@ -15,11 +15,11 @@ package main import ( - _ "hidevops.io/hiboot-data/examples/bolt/controller" - "hidevops.io/hiboot/pkg/app/web" - _ "hidevops.io/hiboot/pkg/starter/actuator" - _ "hidevops.io/hiboot/pkg/starter/locale" - _ "hidevops.io/hiboot/pkg/starter/logging" + "github.com/hidevopsio/hiboot/pkg/app/web" + _ "github.com/hidevopsio/hiboot/pkg/starter/actuator" + _ "github.com/hidevopsio/hiboot/pkg/starter/locale" + _ "github.com/hidevopsio/hiboot/pkg/starter/logging" + _ "hiboot-data/examples/bolt/controller" ) func main() { diff --git a/examples/bolt/service/user.go b/examples/bolt/service/user.go index 6c4ea4e..0300e95 100644 --- a/examples/bolt/service/user.go +++ b/examples/bolt/service/user.go @@ -15,9 +15,9 @@ package service import ( - "hidevops.io/hiboot-data/examples/bolt/entity" - "hidevops.io/hiboot-data/starter/bolt" - "hidevops.io/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app" + "hiboot-data/examples/bolt/entity" + "hiboot-data/starter/bolt" ) type UserService struct { @@ -28,7 +28,7 @@ func init() { app.Register(newUserService) } -// will inject BoltRepository that configured in hidevops.io/hiboot/pkg/starter/data/bolt +// will inject BoltRepository that configured in github.com/hidevopsio/hiboot/pkg/starter/data/bolt func newUserService(repository bolt.Repository) *UserService { return &UserService{ repository: repository, diff --git a/examples/bolt/service/user_test.go b/examples/bolt/service/user_test.go index 8bab798..9ed2d47 100644 --- a/examples/bolt/service/user_test.go +++ b/examples/bolt/service/user_test.go @@ -16,8 +16,8 @@ package service import ( "github.com/stretchr/testify/assert" - "hidevops.io/hiboot-data/examples/bolt/entity" - "hidevops.io/hiboot-data/starter" + "hiboot-data/examples/bolt/entity" + "hiboot-data/starter" "testing" ) diff --git a/examples/es/controller/user.go b/examples/es/controller/user.go index b9c8489..25dd396 100644 --- a/examples/es/controller/user.go +++ b/examples/es/controller/user.go @@ -15,11 +15,11 @@ package controller import ( - "hidevops.io/hiboot-data/examples/es/entity" - "hidevops.io/hiboot-data/examples/es/service" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/at" - "hidevops.io/hiboot/pkg/model" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/model" + "hiboot-data/examples/es/entity" + "hiboot-data/examples/es/service" "net/http" ) diff --git a/examples/es/controller/user_test.go b/examples/es/controller/user_test.go index dc2ad88..cfc34d6 100644 --- a/examples/es/controller/user_test.go +++ b/examples/es/controller/user_test.go @@ -16,12 +16,12 @@ package controller import ( "errors" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" "github.com/stretchr/testify/assert" - "hidevops.io/hiboot-data/examples/es/entity" - "hidevops.io/hiboot-data/examples/es/service/mocks" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/log" - "hidevops.io/hiboot/pkg/utils/idgen" + "hiboot-data/examples/es/entity" + "hiboot-data/examples/es/service/mocks" "net/http" "testing" ) diff --git a/examples/es/entity/user.go b/examples/es/entity/user.go index f63ff54..cac8d5d 100644 --- a/examples/es/entity/user.go +++ b/examples/es/entity/user.go @@ -14,7 +14,7 @@ package entity -import "hidevops.io/hiboot/pkg/model" +import "github.com/hidevopsio/hiboot/pkg/model" type User struct { model.RequestBody diff --git a/examples/es/main.go b/examples/es/main.go index 61ea73b..a334970 100644 --- a/examples/es/main.go +++ b/examples/es/main.go @@ -15,12 +15,12 @@ package main import ( - _ "hidevops.io/hiboot-data/examples/es/controller" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/starter/actuator" - "hidevops.io/hiboot/pkg/starter/locale" - "hidevops.io/hiboot/pkg/starter/logging" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/starter/actuator" + "github.com/hidevopsio/hiboot/pkg/starter/locale" + "github.com/hidevopsio/hiboot/pkg/starter/logging" + _ "hiboot-data/examples/es/controller" ) func main() { diff --git a/examples/es/service/mocks/UserService.go b/examples/es/service/mocks/UserService.go index ade4869..411f065 100644 --- a/examples/es/service/mocks/UserService.go +++ b/examples/es/service/mocks/UserService.go @@ -2,7 +2,7 @@ package mocks -import entity "hidevops.io/hiboot-data/examples/es/entity" +import entity "hiboot-data/examples/es/entity" import mock "github.com/stretchr/testify/mock" // UserService is an autogenerated mock type for the UserService type diff --git a/examples/es/service/user.go b/examples/es/service/user.go index e512c80..cb7af2e 100644 --- a/examples/es/service/user.go +++ b/examples/es/service/user.go @@ -18,11 +18,11 @@ import ( "context" "encoding/json" "fmt" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" "github.com/olivere/elastic/v6" - "hidevops.io/hiboot-data/examples/es/entity" - "hidevops.io/hiboot-data/starter/es" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/utils/idgen" + "hiboot-data/examples/es/entity" + "hiboot-data/starter/es" "log" ) @@ -42,7 +42,7 @@ func init() { app.Register(newUserService) } -// will inject gorm.Repository that configured in hidevops.io/hiboot-data/starter/gorm +// will inject gorm.Repository that configured in hiboot-data/starter/gorm func newUserService(client *es.Client) UserService { return &userServiceImpl{ client: client, diff --git a/examples/etcd/controller/user.go b/examples/etcd/controller/user.go index 9031ddd..289d163 100644 --- a/examples/etcd/controller/user.go +++ b/examples/etcd/controller/user.go @@ -15,13 +15,13 @@ package controller import ( - "hidevops.io/hiboot-data/examples/etcd/entity" - "hidevops.io/hiboot-data/examples/etcd/service" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/at" - "hidevops.io/hiboot/pkg/model" - "hidevops.io/hiboot/pkg/utils/copier" - "hidevops.io/hiboot/pkg/utils/idgen" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/model" + "github.com/hidevopsio/hiboot/pkg/utils/copier" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" + "hiboot-data/examples/etcd/entity" + "hiboot-data/examples/etcd/service" "net/http" ) diff --git a/examples/etcd/controller/user_test.go b/examples/etcd/controller/user_test.go index 1edf1e5..fdcc8c0 100644 --- a/examples/etcd/controller/user_test.go +++ b/examples/etcd/controller/user_test.go @@ -16,14 +16,14 @@ package controller import ( "errors" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "hidevops.io/hiboot-data/examples/etcd/entity" - "hidevops.io/hiboot-data/starter/etcd/fake" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/log" - "hidevops.io/hiboot/pkg/utils/idgen" + "hiboot-data/examples/etcd/entity" + "hiboot-data/starter/etcd/fake" "net/http" "testing" ) diff --git a/examples/etcd/main.go b/examples/etcd/main.go index 8734429..733f598 100644 --- a/examples/etcd/main.go +++ b/examples/etcd/main.go @@ -15,11 +15,11 @@ package main import ( - _ "hidevops.io/hiboot-data/examples/etcd/controller" - "hidevops.io/hiboot/pkg/app/web" - _ "hidevops.io/hiboot/pkg/starter/actuator" - _ "hidevops.io/hiboot/pkg/starter/locale" - _ "hidevops.io/hiboot/pkg/starter/logging" + "github.com/hidevopsio/hiboot/pkg/app/web" + _ "github.com/hidevopsio/hiboot/pkg/starter/actuator" + _ "github.com/hidevopsio/hiboot/pkg/starter/locale" + _ "github.com/hidevopsio/hiboot/pkg/starter/logging" + _ "hiboot-data/examples/etcd/controller" ) func main() { diff --git a/examples/etcd/service/user.go b/examples/etcd/service/user.go index 8d69c0f..30bf66b 100644 --- a/examples/etcd/service/user.go +++ b/examples/etcd/service/user.go @@ -19,10 +19,10 @@ import ( "encoding/json" "errors" "fmt" - "hidevops.io/hiboot-data/examples/etcd/entity" - "hidevops.io/hiboot-data/starter/etcd" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/log" + "hiboot-data/examples/etcd/entity" + "hiboot-data/starter/etcd" "time" ) @@ -41,7 +41,7 @@ func init() { app.Register(newUserService) } -// will inject etcd.Repository that configured in hidevops.io/hiboot-data/starter/etcd +// will inject etcd.Repository that configured in hiboot-data/starter/etcd func newUserService(repository etcd.Repository) UserService { return &UserServiceImpl{repository} } diff --git a/examples/etcd/service/user_test.go b/examples/etcd/service/user_test.go index bb834fc..5495905 100644 --- a/examples/etcd/service/user_test.go +++ b/examples/etcd/service/user_test.go @@ -20,13 +20,13 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/mvcc/mvccpb" _ "github.com/erikstmartin/go-testdb" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" "github.com/stretchr/testify/assert" - "hidevops.io/hiboot-data/examples/etcd/entity" - "hidevops.io/hiboot-data/starter/etcd/fake" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/log" - "hidevops.io/hiboot/pkg/utils/idgen" + "hiboot-data/examples/etcd/entity" + "hiboot-data/starter/etcd/fake" "testing" ) diff --git a/examples/gorm/config/application-dev.yml b/examples/gorm/config/application-dev.yml new file mode 100644 index 0000000..aaf6101 --- /dev/null +++ b/examples/gorm/config/application-dev.yml @@ -0,0 +1,7 @@ +# config file for testing + +server: + port: 8080 + +logging: + level: info diff --git a/examples/gorm/config/application-gorm.yml b/examples/gorm/config/application-gorm.yml index fd6d248..23c9e0d 100644 --- a/examples/gorm/config/application-gorm.yml +++ b/examples/gorm/config/application-gorm.yml @@ -3,11 +3,11 @@ gorm: type: mysql - host: mysql-${app.profiles.active:dev} + host: mysql port: 3306 - database: ${app.name:test} - username: demo - password: Duahbi3GqMmeS7ogPw743xtmsmVFiDIaNwh24BokqC1BnUIah8doCRRhVuIqtWs3tl8nHRNkEWMIbuKAo6GleN4FwSoO56B8HAxqP3Kv8Jr3A6L2bam1bglFJRDx6rRkSuX4zrO3D/35t1YSFdPKf+n2PWIEeEJI6zcULo7UVKA= + database: ${app.name:demo} + username: root + password: cfkK4351ATlJBdRQpZecNWJ1HRzOItqoHPlQgE3f9pgUSA1fAZUnbsz2VEEySf863PWRuNmgjeOvLSzSE8jb4lp1SLVYyh13Awibm0iVryUZIxkRvdIPsm1Pm0Hgj1EGmOUET2+5NEzY995nIXK0WOBLc9nolUmpcamS4NRbaro= charset: utf8 parseTime: true retry_times: 1 diff --git a/examples/gorm/config/application-local.yml b/examples/gorm/config/application-local.yml deleted file mode 100644 index bc6b928..0000000 --- a/examples/gorm/config/application-local.yml +++ /dev/null @@ -1,13 +0,0 @@ -# config file for testing - -server: - port: 8080 - -logging: - level: info -# -#gorm: -# host: 10.10.12.14 -# database: demo -# username: root -# password: mN632xQ/rlS3E0r0pGz/bSvbEAoAGQSMSzxc1EmHUdjf6oGhMNtQ1EQmd14+LSMcqnr6Ln1UNoQvzgZMCyqAty4tXVFAxd+h+YABDcf+gBS+b+I4R4iQmxVdbT/FA2OcXiqT4XW0YKHh1KuHw/fBqhn2QwqH2IVIaUzA7689dpw= diff --git a/examples/gorm/config/application-redis.yml b/examples/gorm/config/application-redis.yml new file mode 100644 index 0000000..f6172ac --- /dev/null +++ b/examples/gorm/config/application-redis.yml @@ -0,0 +1,11 @@ +# config file for testing +# filename should be application-redis.yml + +redis: + host: redis-master + port: 6379 + password: cfkK4351ATlJBdRQpZecNWJ1HRzOItqoHPlQgE3f9pgUSA1fAZUnbsz2VEEySf863PWRuNmgjeOvLSzSE8jb4lp1SLVYyh13Awibm0iVryUZIxkRvdIPsm1Pm0Hgj1EGmOUET2+5NEzY995nIXK0WOBLc9nolUmpcamS4NRbaro= + db: 0 + config: + decrypt: true + diff --git a/examples/gorm/config/application.yml b/examples/gorm/config/application.yml index cd92c01..402ac24 100644 --- a/examples/gorm/config/application.yml +++ b/examples/gorm/config/application.yml @@ -3,13 +3,14 @@ app: project: examples - name: gorm-demo + name: demo profiles: include: - actuator - locale - logging - gorm + - redis logging: level: info diff --git a/examples/gorm/controller/user.go b/examples/gorm/controller/user.go index 0a95ffb..e20423c 100644 --- a/examples/gorm/controller/user.go +++ b/examples/gorm/controller/user.go @@ -15,19 +15,17 @@ package controller import ( - "hidevops.io/hiboot-data/examples/gorm/entity" - "hidevops.io/hiboot-data/examples/gorm/service" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/at" - "hidevops.io/hiboot/pkg/model" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/model" + "hiboot-data/examples/gorm/entity" + "hiboot-data/examples/gorm/service" "net/http" ) // RestController type userController struct { at.RestController - - userService service.UserService } func init() { @@ -35,23 +33,21 @@ func init() { } // newUserController inject userService automatically -func newUserController(userService service.UserService) *userController { - return &userController{ - userService: userService, - } +func newUserController() *userController { + return &userController{} } -// Post POST /user -func (c *userController) Post(request *entity.User) (model.Response, error) { - err := c.userService.AddUser(request) +// Post create /user +func (c *userController) Post(request *entity.User, userService *service.UserService) (model.Response, error) { + err := userService.AddUser(request) response := new(model.BaseResponse) response.SetData(request) return response, err } // GetById GET /id/{id} -func (c *userController) GetById(id uint64) (response model.Response, err error) { - user, err := c.userService.GetUser(id) +func (c *userController) GetById(id uint64, userService *service.UserService) (response model.Response, err error) { + user, err := userService.GetUser(id) response = new(model.BaseResponse) if err != nil { response.SetCode(http.StatusNotFound) @@ -61,17 +57,17 @@ func (c *userController) GetById(id uint64) (response model.Response, err error) return } -// GetById GET /id/{id} -func (c *userController) GetAll() (response model.Response, err error) { - users, err := c.userService.GetAll() +// GetAll GET /id/{id} +func (c *userController) GetAll(userService *service.UserService) (response model.Response, err error) { + users, err := userService.GetAll() response = new(model.BaseResponse) response.SetData(users) return } // DeleteById DELETE /id/{id} -func (c *userController) DeleteById(id uint64) (response model.Response, err error) { - err = c.userService.DeleteUser(id) +func (c *userController) DeleteById(id uint64, userService *service.UserService) (response model.Response, err error) { + err = userService.DeleteUser(id) response = new(model.BaseResponse) return } diff --git a/examples/gorm/controller/user_test.go b/examples/gorm/controller/user_test.go index 298fb52..456d481 100644 --- a/examples/gorm/controller/user_test.go +++ b/examples/gorm/controller/user_test.go @@ -15,13 +15,11 @@ package controller import ( - "errors" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" "github.com/stretchr/testify/assert" - "hidevops.io/hiboot-data/examples/gorm/entity" - "hidevops.io/hiboot-data/examples/gorm/service/mocks" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/log" - "hidevops.io/hiboot/pkg/utils/idgen" + "hiboot-data/examples/gorm/entity" "net/http" "testing" ) @@ -32,9 +30,7 @@ func init() { func TestCrdRequest(t *testing.T) { - mockUserService := new(mocks.UserService) - userController := newUserController(mockUserService) - testApp := web.NewTestApp(userController).Run(t) + testApp := web.NewTestApp().Run(t) id, err := idgen.Next() assert.Equal(t, nil, err) @@ -49,8 +45,6 @@ func TestCrdRequest(t *testing.T) { Gender: 1, } - // first, call mocks.UserService.AddUser - mockUserService.On("AddUser", testUser).Return(nil) // then run the test that will call UserService.AddUser t.Run("should add user with POST request", func(t *testing.T) { // First, let's Post User @@ -59,7 +53,6 @@ func TestCrdRequest(t *testing.T) { Expect().Status(http.StatusOK) }) - mockUserService.On("GetUser", id).Return(testUser, nil) t.Run("should get user with GET request", func(t *testing.T) { // Then Get User // e.g. GET /user/id/123456 @@ -68,7 +61,6 @@ func TestCrdRequest(t *testing.T) { Expect().Status(http.StatusOK) }) - mockUserService.On("GetAll").Return(&[]entity.User{*testUser}, nil) t.Run("should get user with GET request", func(t *testing.T) { // Then Get User // e.g. GET /user/id/123456 @@ -76,12 +68,8 @@ func TestCrdRequest(t *testing.T) { Expect().Status(http.StatusOK) }) - // assert that the expectations were met - mockUserService.AssertExpectations(t) - unknownId, err := idgen.Next() assert.Equal(t, nil, err) - mockUserService.On("GetUser", unknownId).Return((*entity.User)(nil), errors.New("not found")) t.Run("should return 404 if trying to find a record that does not exist", func(t *testing.T) { // Then Get User @@ -90,10 +78,6 @@ func TestCrdRequest(t *testing.T) { Expect().Status(http.StatusNotFound) }) - // assert that the expectations were met - mockUserService.AssertExpectations(t) - - mockUserService.On("DeleteUser", id).Return(nil) t.Run("should delete the record with DELETE request", func(t *testing.T) { // Finally Delete User testApp.Delete("/user/id/{id}"). diff --git a/examples/gorm/entity/user.go b/examples/gorm/entity/user.go index b8067eb..1473195 100644 --- a/examples/gorm/entity/user.go +++ b/examples/gorm/entity/user.go @@ -14,7 +14,7 @@ package entity -import "hidevops.io/hiboot/pkg/model" +import "github.com/hidevopsio/hiboot/pkg/model" type User struct { model.RequestBody diff --git a/examples/gorm/main.go b/examples/gorm/main.go index 2e45523..51b08ae 100644 --- a/examples/gorm/main.go +++ b/examples/gorm/main.go @@ -15,12 +15,14 @@ package main import ( - _ "hidevops.io/hiboot-data/examples/gorm/controller" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/starter/actuator" - "hidevops.io/hiboot/pkg/starter/locale" - "hidevops.io/hiboot/pkg/starter/logging" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/starter/actuator" + "github.com/hidevopsio/hiboot/pkg/starter/locale" + "github.com/hidevopsio/hiboot/pkg/starter/logging" + _ "hiboot-data/examples/gorm/controller" + "hiboot-data/starter/gorm" + "hiboot-data/starter/redis" ) func main() { @@ -28,6 +30,8 @@ func main() { SetProperty(app.ProfilesInclude, actuator.Profile, locale.Profile, + gorm.Profile, + redis.Profile, logging.Profile). Run() } diff --git a/examples/gorm/service/mocks/UserService.go b/examples/gorm/service/mocks/UserService.go deleted file mode 100644 index 6614155..0000000 --- a/examples/gorm/service/mocks/UserService.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. - -package mocks - -import entity "hidevops.io/hiboot-data/examples/gorm/entity" -import mock "github.com/stretchr/testify/mock" - -// UserService is an autogenerated mock type for the UserService type -type UserService struct { - mock.Mock -} - -// AddUser provides a mock function with given fields: user -func (_m *UserService) AddUser(user *entity.User) error { - ret := _m.Called(user) - - var r0 error - if rf, ok := ret.Get(0).(func(*entity.User) error); ok { - r0 = rf(user) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DeleteUser provides a mock function with given fields: id -func (_m *UserService) DeleteUser(id uint64) error { - ret := _m.Called(id) - - var r0 error - if rf, ok := ret.Get(0).(func(uint64) error); ok { - r0 = rf(id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetAll provides a mock function with given fields: -func (_m *UserService) GetAll() (*[]entity.User, error) { - ret := _m.Called() - - var r0 *[]entity.User - if rf, ok := ret.Get(0).(func() *[]entity.User); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*[]entity.User) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetUser provides a mock function with given fields: id -func (_m *UserService) GetUser(id uint64) (*entity.User, error) { - ret := _m.Called(id) - - var r0 *entity.User - if rf, ok := ret.Get(0).(func(uint64) *entity.User); ok { - r0 = rf(id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*entity.User) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} diff --git a/examples/gorm/service/user.go b/examples/gorm/service/user.go index 6059a97..6f12708 100644 --- a/examples/gorm/service/user.go +++ b/examples/gorm/service/user.go @@ -15,61 +15,89 @@ package service import ( + "context" + "encoding/json" "errors" - "hidevops.io/hiboot-data/examples/gorm/entity" - "hidevops.io/hiboot-data/starter/gorm" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/utils/idgen" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" + "hiboot-data/examples/gorm/entity" + "hiboot-data/starter/gorm" + "hiboot-data/starter/redis" + "strconv" ) -type UserService interface { - AddUser(user *entity.User) (err error) - GetUser(id uint64) (user *entity.User, err error) - GetAll() (user *[]entity.User, err error) - DeleteUser(id uint64) (err error) -} - -type userServiceImpl struct { - repository gorm.Repository +type UserService struct { + at.Scope `value:"request"` + db *gorm.DB + cache *redis.Client } func init() { - // register UserServiceImpl + // register UserService app.Register(newUserService) } -// will inject gorm.Repository that configured in hidevops.io/hiboot-data/starter/gorm -func newUserService(repository gorm.Repository) UserService { - repository.AutoMigrate(&entity.User{}) - return &userServiceImpl{ - repository: repository, +// will inject gorm.Repository that configured in hiboot-data/starter/gorm +func newUserService(db *gorm.DB, redisClient *redis.Client) *UserService { + _ = db.AutoMigrate(&entity.User{}) + return &UserService{ + db: db, + cache: redisClient, } } -func (s *userServiceImpl) AddUser(user *entity.User) (err error) { +func (s *UserService) AddUser(user *entity.User) (err error) { if user == nil { return errors.New("user is not allowed nil") } if user.Id == 0 { user.Id, _ = idgen.Next() } - err = s.repository.Create(user).Error() + err = s.db.Create(user).Error + if err != nil { + return + } + err = s.cacheUser(user) + return +} + +func (s *UserService) cacheUser(user *entity.User) (err error) { + var userJSON []byte + userJSON, err = json.Marshal(user) + if err != nil { + return + } + err = s.cache.Set(context.Background(), strconv.FormatUint(user.Id, 16), string(userJSON), 0).Err() return } -func (s *userServiceImpl) GetUser(id uint64) (user *entity.User, err error) { +func (s *UserService) GetUser(id uint64) (user *entity.User, err error) { user = &entity.User{} - err = s.repository.Where("id = ?", id).First(user).Error() + var res string + res, err = s.cache.Get(context.Background(), strconv.FormatUint(id, 16)).Result() + if err != nil { + return + } + err = json.Unmarshal([]byte(res), user) + if err != nil { + err = s.db.Where("id = ?", id).First(user).Error + if err != nil { + return + } + err = s.cacheUser(user) + } + return } -func (s *userServiceImpl) GetAll() (users *[]entity.User, err error) { +func (s *UserService) GetAll() (users *[]entity.User, err error) { users = &[]entity.User{} - err = s.repository.Find(users).Error() + err = s.db.Find(users).Error return } -func (s *userServiceImpl) DeleteUser(id uint64) (err error) { - err = s.repository.Where("id = ?", id).Delete(entity.User{}).Error() +func (s *UserService) DeleteUser(id uint64) (err error) { + err = s.db.Where("id = ?", id).Delete(entity.User{}).Error return } diff --git a/examples/gorm/service/user_test.go b/examples/gorm/service/user_test.go deleted file mode 100644 index aef088f..0000000 --- a/examples/gorm/service/user_test.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018 John Deng (hi.devops.io@gmail.com). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package service - -import ( - _ "github.com/erikstmartin/go-testdb" - "github.com/hidevopsio/gorm" - "github.com/stretchr/testify/assert" - "hidevops.io/hiboot-data/examples/gorm/entity" - "testing" -) - -var fakeUser = entity.User{ - Id: 1, - Name: "Bill Gates", - Username: "billg", - Password: "3948tdaD", - Email: "bill.gates@microsoft.com", - Age: 60, - Gender: 1, -} - -func TestUserCrud(t *testing.T) { - fakeRepository := new(gorm.FakeRepository) - userService := newUserService(fakeRepository) - - t.Run("should return error if user is nil", func(t *testing.T) { - err := userService.AddUser((*entity.User)(nil)) - assert.NotEqual(t, nil, err) - }) - - t.Run("should add user", func(t *testing.T) { - err := userService.AddUser(&fakeUser) - assert.Equal(t, nil, err) - }) - - t.Run("should generate user id", func(t *testing.T) { - u := &entity.User{} - err := userService.AddUser(u) - assert.Equal(t, nil, err) - assert.NotEqual(t, 0, u.Id) - }) - - t.Run("should generate user id", func(t *testing.T) { - fakeRepository.Mock("Find", &[]entity.User{fakeUser}).Expect(nil) - users, err := userService.GetAll() - assert.Equal(t, nil, err) - assert.Equal(t, 1, len(*users)) - assert.Equal(t, "Bill Gates", (*users)[0].Name) - }) - - t.Run("should get user that added above", func(t *testing.T) { - // call mock method mocker.First(fakeUser).Expected(nil) - fakeRepository.Mock("First", &fakeUser).Expect(nil) - - u, err := userService.GetUser(1) - assert.Equal(t, nil, err) - assert.Equal(t, "Bill Gates", u.Name) - assert.Equal(t, uint(60), u.Age) - }) - - t.Run("should delete user", func(t *testing.T) { - err := userService.DeleteUser(1) - assert.Equal(t, nil, err) - }) -} diff --git a/examples/mongo/controller/user.go b/examples/mongo/controller/user.go index 30df73f..3372116 100644 --- a/examples/mongo/controller/user.go +++ b/examples/mongo/controller/user.go @@ -15,11 +15,11 @@ package controller import ( - "hidevops.io/hiboot-data/examples/mongo/entity" - "hidevops.io/hiboot-data/examples/mongo/service" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/at" - "hidevops.io/hiboot/pkg/model" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/model" + "hiboot-data/examples/mongo/entity" + "hiboot-data/examples/mongo/service" "net/http" ) diff --git a/examples/mongo/controller/user_test.go b/examples/mongo/controller/user_test.go index 46ebab8..3314a54 100644 --- a/examples/mongo/controller/user_test.go +++ b/examples/mongo/controller/user_test.go @@ -16,12 +16,12 @@ package controller import ( "errors" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" "github.com/stretchr/testify/assert" - "hidevops.io/hiboot-data/examples/mongo/entity" - "hidevops.io/hiboot-data/examples/mongo/service/mocks" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/log" - "hidevops.io/hiboot/pkg/utils/idgen" + "hiboot-data/examples/mongo/entity" + "hiboot-data/examples/mongo/service/mocks" "net/http" "testing" ) diff --git a/examples/mongo/entity/user.go b/examples/mongo/entity/user.go index f63ff54..cac8d5d 100644 --- a/examples/mongo/entity/user.go +++ b/examples/mongo/entity/user.go @@ -14,7 +14,7 @@ package entity -import "hidevops.io/hiboot/pkg/model" +import "github.com/hidevopsio/hiboot/pkg/model" type User struct { model.RequestBody diff --git a/examples/mongo/main.go b/examples/mongo/main.go index 919bad6..d00d970 100644 --- a/examples/mongo/main.go +++ b/examples/mongo/main.go @@ -15,12 +15,12 @@ package main import ( - _ "hidevops.io/hiboot-data/examples/mongo/controller" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/app/web" - "hidevops.io/hiboot/pkg/starter/actuator" - "hidevops.io/hiboot/pkg/starter/locale" - "hidevops.io/hiboot/pkg/starter/logging" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/starter/actuator" + "github.com/hidevopsio/hiboot/pkg/starter/locale" + "github.com/hidevopsio/hiboot/pkg/starter/logging" + _ "hiboot-data/examples/mongo/controller" ) func main() { diff --git a/examples/mongo/service/mocks/UserService.go b/examples/mongo/service/mocks/UserService.go index 36c37fc..557d741 100644 --- a/examples/mongo/service/mocks/UserService.go +++ b/examples/mongo/service/mocks/UserService.go @@ -2,7 +2,7 @@ package mocks -import entity "hidevops.io/hiboot-data/examples/mongo/entity" +import entity "hiboot-data/examples/mongo/entity" import mock "github.com/stretchr/testify/mock" // UserService is an autogenerated mock type for the UserService type diff --git a/examples/mongo/service/user.go b/examples/mongo/service/user.go index 62c9896..a578b54 100644 --- a/examples/mongo/service/user.go +++ b/examples/mongo/service/user.go @@ -17,11 +17,11 @@ package service import ( "context" "fmt" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" "go.mongodb.org/mongo-driver/bson" - "hidevops.io/hiboot-data/examples/mongo/entity" - "hidevops.io/hiboot-data/starter/mongo" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/utils/idgen" + "hiboot-data/examples/mongo/entity" + "hiboot-data/starter/mongo" "log" "time" ) @@ -42,7 +42,7 @@ func init() { app.Register(newUserService) } -// will inject gorm.Repository that configured in hidevops.io/hiboot-data/starter/gorm +// will inject gorm.Repository that configured in hiboot-data/starter/gorm func newUserService(client *mongo.Client) UserService { return &userServiceImpl{ client: client, diff --git a/examples/sqlx/config/application-dev.yml b/examples/sqlx/config/application-dev.yml new file mode 100644 index 0000000..0dda7ea --- /dev/null +++ b/examples/sqlx/config/application-dev.yml @@ -0,0 +1,15 @@ +# config file for testing + +server: + port: 8080 + +logging: + level: info + +sqlx: + type: sqlite3 + host: "-" + port: "-" + username: "-" + password: "-" + database: ":memory:" diff --git a/examples/sqlx/config/application-redis.yml b/examples/sqlx/config/application-redis.yml new file mode 100644 index 0000000..f6172ac --- /dev/null +++ b/examples/sqlx/config/application-redis.yml @@ -0,0 +1,11 @@ +# config file for testing +# filename should be application-redis.yml + +redis: + host: redis-master + port: 6379 + password: cfkK4351ATlJBdRQpZecNWJ1HRzOItqoHPlQgE3f9pgUSA1fAZUnbsz2VEEySf863PWRuNmgjeOvLSzSE8jb4lp1SLVYyh13Awibm0iVryUZIxkRvdIPsm1Pm0Hgj1EGmOUET2+5NEzY995nIXK0WOBLc9nolUmpcamS4NRbaro= + db: 0 + config: + decrypt: true + diff --git a/examples/sqlx/config/application-sqlx.yml b/examples/sqlx/config/application-sqlx.yml new file mode 100644 index 0000000..e437f85 --- /dev/null +++ b/examples/sqlx/config/application-sqlx.yml @@ -0,0 +1,17 @@ +# config file for testing +# filename should be application-sqlx.yml + +sqlx: + type: mysql + host: mysql + port: 3306 + database: ${app.name:demo} + username: root + password: cfkK4351ATlJBdRQpZecNWJ1HRzOItqoHPlQgE3f9pgUSA1fAZUnbsz2VEEySf863PWRuNmgjeOvLSzSE8jb4lp1SLVYyh13Awibm0iVryUZIxkRvdIPsm1Pm0Hgj1EGmOUET2+5NEzY995nIXK0WOBLc9nolUmpcamS4NRbaro= + charset: utf8 + parseTime: true + retry_times: 1 + loc: Asia/Shanghai + config: + decrypt: true + diff --git a/examples/sqlx/config/application.yml b/examples/sqlx/config/application.yml new file mode 100644 index 0000000..a79771e --- /dev/null +++ b/examples/sqlx/config/application.yml @@ -0,0 +1,17 @@ +# config file for testing +# filename should be application.yml + +app: + project: examples + name: demo + profiles: + include: + - actuator + - locale + - logging + - sqlx + - redis + +logging: + level: info + diff --git a/examples/sqlx/config/i18n/en-US.ini b/examples/sqlx/config/i18n/en-US.ini new file mode 100644 index 0000000..6a29eef --- /dev/null +++ b/examples/sqlx/config/i18n/en-US.ini @@ -0,0 +1,3 @@ +success = Success +failed = Failed +hello = Hello \ No newline at end of file diff --git a/examples/sqlx/config/i18n/zh-CN.ini b/examples/sqlx/config/i18n/zh-CN.ini new file mode 100644 index 0000000..67856a1 --- /dev/null +++ b/examples/sqlx/config/i18n/zh-CN.ini @@ -0,0 +1,3 @@ +success = 成功 +failed = 失败 +hello = 您好 diff --git a/examples/sqlx/config/keygen.sh b/examples/sqlx/config/keygen.sh new file mode 100755 index 0000000..e67ebf2 --- /dev/null +++ b/examples/sqlx/config/keygen.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Copyright 2018 John Deng (hi.devops.io@gmail.com). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http:#www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +mkdir -p ssl + +openssl genrsa -out ssl/app.rsa 1024 +openssl rsa -in ssl/app.rsa -pubout > ssl/app.rsa.pub \ No newline at end of file diff --git a/examples/sqlx/config/ssl/app.rsa b/examples/sqlx/config/ssl/app.rsa new file mode 100644 index 0000000..2fbbd3d --- /dev/null +++ b/examples/sqlx/config/ssl/app.rsa @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDBaFochwjb/PFXA9EOmynT+SQr54wh9HMx5VFj0bNUKegMS02W +4DSsneRVaY5Bo+8sDoNPx2Luzp7pPRNbukP4pjgVWAASVWnGeBaGRaYbo/d9SV/R +OdKwmV1DJM3PtOo82oNnI26FJeJ/oTl+5UJ4sd7J8UbR0DCu40venKLlOwIDAQAB +AoGAOFuJDpEGstvlE38INyJdsOgDc0u4mNhbjOmOqvCbOeYwOQzkYheZIceslnr4 +ugXkFslv2Bp4qK/KvJpQfsUrMtGNr1FKfwLzD09++GU89ltufgn8Z6iYJ+app0qa +hYKAoGQkvPP4ks+k3nBYRESL01y9mKZ/JSvWfKj8wHOu1pkCQQD/Pdom+5r2q150 +QUkw4huDthHBB96LMJiVLSNkPoHXPwXqSoa8CXNquCQA43F1gjtCz37rZDEyFYWH +IYT4TcG1AkEAwft3WsON1ND0p8Z+iUCe/+ySajBvH4ICJ6Muj8D4FdydRvBhNJT0 +qmZYZI19Bjk8qYHV7UoUhQQcfBB8TVQhLwJBAOE10CEJbEguGR9243+wYhqrMasi +qGgkLt2hgFLZHHOx9iQuMggERsRpSctG5DuM94ER2KkWNJo+hx0epFb7NOkCQEnq +1c9LRyd6PFAWTi9k5XGmJyC5tg5ujv2lq99xa9eAypm2jYPo4tZvy2z9kU+mzdvV +srwKB4msSGJqMcORtFcCQQDJ1nXPTCgptvny+FhkFGAy3UNLdGXKeAM9UHhJW+/Z +RJvfo1hEyCPZZbPrMrPzqkJ8pBd2VRwoevlJreZDekvd +-----END RSA PRIVATE KEY----- diff --git a/examples/sqlx/config/ssl/app.rsa.pub b/examples/sqlx/config/ssl/app.rsa.pub new file mode 100644 index 0000000..6dd0c22 --- /dev/null +++ b/examples/sqlx/config/ssl/app.rsa.pub @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBaFochwjb/PFXA9EOmynT+SQr +54wh9HMx5VFj0bNUKegMS02W4DSsneRVaY5Bo+8sDoNPx2Luzp7pPRNbukP4pjgV +WAASVWnGeBaGRaYbo/d9SV/ROdKwmV1DJM3PtOo82oNnI26FJeJ/oTl+5UJ4sd7J +8UbR0DCu40venKLlOwIDAQAB +-----END PUBLIC KEY----- diff --git a/examples/sqlx/controller/user.go b/examples/sqlx/controller/user.go new file mode 100644 index 0000000..57fe0fa --- /dev/null +++ b/examples/sqlx/controller/user.go @@ -0,0 +1,73 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controller + +import ( + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/model" + "hiboot-data/examples/sqlx/entity" + "hiboot-data/examples/sqlx/service" + "net/http" +) + +// RestController +type userController struct { + at.RestController +} + +func init() { + app.Register(newUserController) +} + +// newUserController inject userService automatically +func newUserController() *userController { + return &userController{} +} + +// Post create /user +func (c *userController) Post(request *entity.User, userService *service.UserService) (model.Response, error) { + err := userService.AddUser(request) + response := new(model.BaseResponse) + response.SetData(request) + return response, err +} + +// GetById GET /id/{id} +func (c *userController) GetById(id uint64, userService *service.UserService) (response model.Response, err error) { + user, err := userService.GetUser(id) + response = new(model.BaseResponse) + if err != nil { + response.SetCode(http.StatusNotFound) + } else { + response.SetData(user) + } + return +} + +// GetAll GET /id/{id} +func (c *userController) GetAll(userService *service.UserService) (response model.Response, err error) { + users, err := userService.GetAll() + response = new(model.BaseResponse) + response.SetData(users) + return +} + +// DeleteById DELETE /id/{id} +func (c *userController) DeleteById(id uint64, userService *service.UserService) (response model.Response, err error) { + err = userService.DeleteUser(id) + response = new(model.BaseResponse) + return +} diff --git a/examples/sqlx/controller/user_test.go b/examples/sqlx/controller/user_test.go new file mode 100644 index 0000000..9bde6c8 --- /dev/null +++ b/examples/sqlx/controller/user_test.go @@ -0,0 +1,87 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controller + +import ( + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" + "github.com/stretchr/testify/assert" + "hiboot-data/examples/sqlx/entity" + "net/http" + "testing" +) + +func init() { + log.SetLevel(log.DebugLevel) +} + +func TestCrdRequest(t *testing.T) { + + testApp := web.NewTestApp().Run(t) + + id, err := idgen.Next() + assert.Equal(t, nil, err) + + testUser := &entity.User{ + Id: id, + Name: "Bill Gates", + Username: "billg", + Password: "3948tdaD", + Email: "bill.gates@microsoft.com", + Age: 60, + Gender: 1, + } + + // then run the test that will call UserService.AddUser + t.Run("should add user with POST request", func(t *testing.T) { + // First, let's Post User + testApp.Post("/user"). + WithJSON(testUser). + Expect().Status(http.StatusOK) + }) + + t.Run("should get user with GET request", func(t *testing.T) { + // Then Get User + // e.g. GET /user/id/123456 + testApp.Get("/user/id/{id}"). + WithPath("id", id). + Expect().Status(http.StatusOK) + }) + + t.Run("should get user with GET request", func(t *testing.T) { + // Then Get User + // e.g. GET /user/id/123456 + testApp.Get("/user/all"). + Expect().Status(http.StatusOK) + }) + + unknownId, err := idgen.Next() + assert.Equal(t, nil, err) + + t.Run("should return 404 if trying to find a record that does not exist", func(t *testing.T) { + // Then Get User + testApp.Get("/user/id/{id}"). + WithPath("id", unknownId). + Expect().Status(http.StatusNotFound) + }) + + t.Run("should delete the record with DELETE request", func(t *testing.T) { + // Finally Delete User + testApp.Delete("/user/id/{id}"). + WithPath("id", id). + Expect().Status(http.StatusOK) + }) +} diff --git a/examples/sqlx/entity/user.go b/examples/sqlx/entity/user.go new file mode 100644 index 0000000..1473195 --- /dev/null +++ b/examples/sqlx/entity/user.go @@ -0,0 +1,32 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package entity + +import "github.com/hidevopsio/hiboot/pkg/model" + +type User struct { + model.RequestBody + Id uint64 `json:"id"` + Name string `json:"name" validate:"required"` + Username string `json:"username" validate:"required"` + Password string `json:"password" validate:"required"` + Email string `json:"email" validate:"required,email"` + Age uint `json:"age" validate:"gte=0,lte=130"` + Gender uint `json:"gender" validate:"gte=0,lte=2"` +} + +func (u *User) TableName() string { + return "user" +} diff --git a/starter/datasource.go b/examples/sqlx/entity/user_test.go similarity index 78% rename from starter/datasource.go rename to examples/sqlx/entity/user_test.go index 2de44df..72196a4 100644 --- a/starter/datasource.go +++ b/examples/sqlx/entity/user_test.go @@ -12,4 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -package data +package entity + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestUser(t *testing.T) { + u := new(User) + assert.Equal(t, "user", u.TableName()) +} diff --git a/examples/sqlx/main.go b/examples/sqlx/main.go new file mode 100644 index 0000000..c0a2901 --- /dev/null +++ b/examples/sqlx/main.go @@ -0,0 +1,37 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app/web" + "github.com/hidevopsio/hiboot/pkg/starter/actuator" + "github.com/hidevopsio/hiboot/pkg/starter/locale" + "github.com/hidevopsio/hiboot/pkg/starter/logging" + _ "hiboot-data/examples/sqlx/controller" + "hiboot-data/starter/redis" + "hiboot-data/starter/sqlx" +) + +func main() { + web.NewApplication(). + SetProperty(app.ProfilesInclude, + actuator.Profile, + locale.Profile, + sqlx.Profile, + redis.Profile, + logging.Profile). + Run() +} diff --git a/starter/autoconfigure.go b/examples/sqlx/main_test.go similarity index 89% rename from starter/autoconfigure.go rename to examples/sqlx/main_test.go index 393550c..7129c7f 100644 --- a/starter/autoconfigure.go +++ b/examples/sqlx/main_test.go @@ -12,7 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package data +package main -type Configuration interface { +import "testing" + +func TestRunMain(t *testing.T) { + go main() } diff --git a/examples/sqlx/service/user.go b/examples/sqlx/service/user.go new file mode 100644 index 0000000..6c88ad5 --- /dev/null +++ b/examples/sqlx/service/user.go @@ -0,0 +1,150 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package service + +import ( + "context" + "encoding/json" + "errors" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/idgen" + "hiboot-data/examples/sqlx/entity" + "hiboot-data/starter/redis" + "hiboot-data/starter/sqlx" + "strconv" +) + +type UserService struct { + at.Scope `value:"request"` + db *sqlx.DB + cache *redis.Client +} + +func init() { + // register UserService + app.Register(newUserService) +} + +// will inject sqlx.Repository that configured in hiboot-data/starter/gorm +func newUserService(db *sqlx.DB, redisClient *redis.Client) *UserService { + + schema := ` + CREATE TABLE IF NOT EXISTS users ( + id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, -- id: Unsigned 64-bit integer with auto-increment + name VARCHAR(255) NOT NULL, -- name: Non-nullable string + username VARCHAR(255) NOT NULL UNIQUE, -- username: Non-nullable string, unique + password VARCHAR(255) NOT NULL, -- password: Non-nullable string + email VARCHAR(255) NOT NULL UNIQUE, -- email: Non-nullable string, unique + age TINYINT UNSIGNED CHECK (age >= 0 AND age <= 130), -- age: Unsigned integer, limited between 0 and 130 + gender TINYINT UNSIGNED CHECK (gender >= 0 AND gender <= 2) -- gender: Unsigned integer, limited between 0 and 2 +); + +` + // Execute the schema + _, err := db.Exec(schema) + if err != nil { + log.Fatalf("failed to create table for schema: %v ", schema) + } + + return &UserService{ + db: db, + cache: redisClient, + } +} + +func (s *UserService) AddUser(user *entity.User) error { + if user == nil { + return errors.New("user is not allowed to be nil") + } + if user.Id == 0 { + user.Id, _ = idgen.Next() + } + + // SQLX insert query + query := `INSERT INTO users (id, name, username, password, email, age, gender) + VALUES (:id, :name, :username, :password, :email, :age, :gender)` + + // NamedExec binds named parameters from a struct to the query + _, err := s.db.NamedExec(query, user) + if err != nil { + return err + } + + // Cache the user + return s.cacheUser(user) +} + +func (s *UserService) cacheUser(user *entity.User) (err error) { + var userJSON []byte + userJSON, err = json.Marshal(user) + if err != nil { + return + } + err = s.cache.Set(context.Background(), strconv.FormatUint(user.Id, 16), string(userJSON), 0).Err() + return +} + +func (s *UserService) GetUser(id uint64) (*entity.User, error) { + user := &entity.User{} + + // Attempt to get the user from the cache + res, err := s.cache.Get(context.Background(), strconv.FormatUint(id, 16)).Result() + if err == nil { + err = json.Unmarshal([]byte(res), user) + if err == nil { + return user, nil + } + } + + // If the cache lookup failed or unmarshalling failed, query the database + query := `SELECT * FROM users WHERE id = ?` + err = s.db.Get(user, query, id) + if err != nil { + return nil, err + } + + // Cache the user + if err := s.cacheUser(user); err != nil { + return nil, err + } + + return user, nil +} + +func (s *UserService) GetAll() ([]entity.User, error) { + users := []entity.User{} + + // SQLX select query to fetch all users + query := `SELECT * FROM users` + + // Execute the query and map the results to the users slice + err := s.db.Select(&users, query) + if err != nil { + return nil, err + } + + return users, nil +} + +func (s *UserService) DeleteUser(id uint64) error { + // SQLX delete query + query := `DELETE FROM users WHERE id = ?` + + // Execute the delete query + _, err := s.db.Exec(query, id) + return err +} diff --git a/go.mod b/go.mod index 16e1ea9..7c1013e 100644 --- a/go.mod +++ b/go.mod @@ -1,47 +1,123 @@ -module hidevops.io/hiboot-data +module hiboot-data + +go 1.22.6 require ( github.com/boltdb/bolt v1.3.1 - github.com/coreos/bbolt v1.3.3 // indirect - github.com/coreos/etcd v3.3.10+incompatible - github.com/coreos/go-semver v0.3.0 // indirect - github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect - github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect - github.com/dave/jennifer v1.4.0 - github.com/denisenkom/go-mssqldb v0.0.0-20180901172138-1eb28afdf9b6 // indirect + github.com/coreos/etcd v3.3.27+incompatible github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 - github.com/go-sql-driver/mysql v1.4.0 // indirect - github.com/gogo/protobuf v1.3.0 // indirect - github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect - github.com/google/btree v1.0.0 // indirect - github.com/gorilla/websocket v1.4.1 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.11.1 // indirect - github.com/hidevopsio/gorm v2.0.1+incompatible - github.com/jinzhu/copier v0.0.0-20180308034124-7e38e58719c3 // indirect - github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a // indirect - github.com/jinzhu/now v1.0.1 // indirect - github.com/jonboulle/clockwork v0.1.0 // indirect - github.com/lib/pq v1.0.0 // indirect - github.com/magiconair/properties v1.8.0 - github.com/mattn/go-sqlite3 v1.9.0 // indirect - github.com/olivere/elastic v6.2.27+incompatible // indirect + github.com/go-sql-driver/mysql v1.8.1 + github.com/hidevopsio/hiboot v1.8.0 + github.com/jmoiron/sqlx v1.4.0 + github.com/magiconair/properties v1.8.7 + github.com/mattn/go-sqlite3 v1.14.22 github.com/olivere/elastic/v6 v6.2.1 - github.com/prometheus/client_golang v1.1.0 // indirect - github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect - github.com/soheilhy/cmux v0.1.4 // indirect - github.com/streadway/amqp v0.0.0-20180315184602-8e4aba63da9f - github.com/stretchr/testify v1.4.0 - github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect - github.com/ugorji/go v1.1.7 // indirect - github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect - go.etcd.io/bbolt v1.3.3 // indirect - go.mongodb.org/mongo-driver v1.3.0 - golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 - golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 // indirect - google.golang.org/appengine v1.4.0 // indirect - hidevops.io/hiboot v1.3.1 + github.com/redis/go-redis/v9 v9.6.1 + github.com/streadway/amqp v1.1.0 + github.com/stretchr/testify v1.9.0 + go.mongodb.org/mongo-driver v1.16.1 + golang.org/x/net v0.28.0 + gopkg.in/olivere/elastic.v5 v5.0.86 + gorm.io/driver/mysql v1.5.7 + gorm.io/gorm v1.25.11 ) -go 1.13 +require ( + filippo.io/edwards25519 v1.1.0 // indirect + github.com/BurntSushi/toml v0.3.1 // indirect + github.com/Joker/jade v1.0.0 // indirect + github.com/Shopify/goreferrer v0.0.0-20180807163728-b9777dc9f9cc // indirect + github.com/ajg/form v1.5.1 // indirect + github.com/aymerick/douceur v0.2.0 // indirect + github.com/aymerick/raymond v2.0.2+incompatible // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect + github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/deckarep/golang-set v1.7.1 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 // indirect + github.com/fatih/camelcase v1.0.0 // indirect + github.com/fatih/structs v1.1.0 // indirect + github.com/flosch/pongo2 v0.0.0-20180809100617-24195e6d38b0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/gavv/monotime v0.0.0-20190418164738-30dba4353424 // indirect + github.com/go-playground/locales v0.13.0 // indirect + github.com/go-playground/universal-translator v0.17.0 // indirect + github.com/go-playground/validator/v10 v10.5.0 // indirect + github.com/gogo/protobuf v1.2.1 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/css v1.0.0 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hidevopsio/formBinder v0.0.0-20240811094544-2118e9d3668d // indirect + github.com/hidevopsio/go-uuid v0.0.0-20240811102623-0749af16addf // indirect + github.com/hidevopsio/gocron v1.6.1-0.20210602042859-a8b1ada7665d // indirect + github.com/hidevopsio/golog v0.0.0-20240811115351-6b4a7711e704 // indirect + github.com/hidevopsio/httpexpect v0.0.0-20240811100504-92ed99bc8bec // indirect + github.com/hidevopsio/i18n v0.0.0-20240811095331-eee3daa5c80f // indirect + github.com/hidevopsio/iris v0.0.0-20240811142313-7ed19cd46895 // indirect + github.com/hidevopsio/mapstructure v1.1.3-0.20190908102033-f8832fd9e307 // indirect + github.com/hidevopsio/pio v0.0.0-20240811115022-e705bbf749aa // indirect + github.com/hidevopsio/viper v1.2.2-0.20210220025633-ccb4b202d169 // indirect + github.com/imkira/go-interpol v1.1.0 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/juju/errors v1.0.0 // indirect + github.com/klauspost/compress v1.13.6 // indirect + github.com/leodido/go-urn v1.2.0 // indirect + github.com/mailru/easyjson v0.7.1 // indirect + github.com/microcosm-cc/bluemonday v1.0.26 // indirect + github.com/mitchellh/mapstructure v1.3.3 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/montanaflynn/stats v0.7.1 // indirect + github.com/moul/http2curl v1.0.0 // indirect + github.com/olivere/elastic v6.2.37+incompatible // indirect + github.com/pelletier/go-toml v1.2.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rakyll/statik v0.1.6 // indirect + github.com/robfig/cron/v3 v3.0.1 // indirect + github.com/ryanuber/columnize v2.1.0+incompatible // indirect + github.com/sergi/go-diff v1.3.1 // indirect + github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect + github.com/sony/sonyflake v1.2.0 // indirect + github.com/spf13/afero v1.1.2 // indirect + github.com/spf13/cast v1.3.0 // indirect + github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/spf13/pflag v1.0.3 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/xdg-go/scram v1.1.2 // indirect + github.com/xdg-go/stringprep v1.0.4 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect + github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect + github.com/yudai/gojsondiff v1.0.0 // indirect + github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect + go.uber.org/atomic v1.4.0 // indirect + go.uber.org/multierr v1.1.0 // indirect + go.uber.org/zap v1.10.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a // indirect + google.golang.org/grpc v1.21.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/russross/blackfriday.v2 v2.0.0+incompatible // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect +) diff --git a/go.sum b/go.sum index 3da321d..9718300 100644 --- a/go.sum +++ b/go.sum @@ -1,433 +1,416 @@ -cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Joker/hpp v0.0.0-20180418125244-6893e659854a h1:PiDAizhfJbwZMISZ1Itx1ZTFeOFCml89Ofmz3V8rhoU= github.com/Joker/hpp v0.0.0-20180418125244-6893e659854a/go.mod h1:MzD2WMdSxvbHw5fM/OXOFily/lipJWRc9C1px0Mt0ZE= github.com/Joker/jade v1.0.0 h1:lOCEPvTAtWfLpSZYMOv/g44MGQFAolbKh2khHHGu0Kc= github.com/Joker/jade v1.0.0/go.mod h1:efZIdO0py/LtcJRSa/j2WEklMSAw84WV0zZVMxNToB8= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/goreferrer v0.0.0-20180807163728-b9777dc9f9cc h1:zZYkIbeMNcH1lhztdVxy4+Ykk8NoMhqUfSigsrT/x7Y= github.com/Shopify/goreferrer v0.0.0-20180807163728-b9777dc9f9cc/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f h1:zvClvFQwU++UpIUBGC8YmDlfhUrweEy1R1Fj1gu5iIM= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go v1.29.11/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/aymerick/raymond v2.0.2+incompatible h1:VEp3GpgdAnv9B2GFyTvqgcKvY+mfKMjPOA3SbKLtnU0= github.com/aymerick/raymond v2.0.2+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +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/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.27+incompatible h1:QIudLb9KeBsE5zyYxd1mjzRSkzLg9Wf9QlRwFgd6oTA= +github.com/coreos/etcd v3.3.27+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/dave/jennifer v1.4.0 h1:tNJFJmLDVTLu+v05mVZ88RINa3vQqnyyWkTKWYz0CwE= -github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= 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/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/denisenkom/go-mssqldb v0.0.0-20180901172138-1eb28afdf9b6 h1:BZGp1dbKFjqlGmxEpwkDpCWNxVwEYnUPoncIzLiHlPo= -github.com/denisenkom/go-mssqldb v0.0.0-20180901172138-1eb28afdf9b6/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= -github.com/dgraph-io/badger v1.5.4/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20180109070241-2de33835d102/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +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/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= -github.com/etcd-io/bbolt v1.3.0/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flosch/pongo2 v0.0.0-20180809100617-24195e6d38b0 h1:ZHx2BEERvWkuwuE7qWN9TuRxucHDH2JrsvneZjVJfo0= github.com/flosch/pongo2 v0.0.0-20180809100617-24195e6d38b0/go.mod h1:rE0ErqqBaMcp9pzj8JxV1GcfDBpuypXYxlR1c37AUwg= -github.com/fortytw2/leaktest v1.2.0 h1:cj6GCiwJDH7l3tMHLjZDo0QqPtrXJiWSI9JgpeQKw+Q= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gavv/monotime v0.0.0-20171021193802-6f8212e8d10d h1:oYXrtNhqNKL1dVtKdv8XUq5zqdGVFNQ0/4tvccXZOLM= -github.com/gavv/monotime v0.0.0-20171021193802-6f8212e8d10d/go.mod h1:vmp8DIyckQMXOPl0AQVHt+7n5h7Gb7hS6CUydiV8QeA= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gavv/monotime v0.0.0-20190418164738-30dba4353424 h1:Vh7rylVZRZCj6W41lRlP17xPk4Nq260H4Xo/DDYmEZk= +github.com/gavv/monotime v0.0.0-20190418164738-30dba4353424/go.mod h1:vmp8DIyckQMXOPl0AQVHt+7n5h7Gb7hS6CUydiV8QeA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.5.0 h1:X9rflw/KmpACwT8zdrm1upefpvdy6ur8d1kWyq6sg3E= +github.com/go-playground/validator/v10 v10.5.0/go.mod h1:xm76BBt941f7yWdGnI2DVPFFg1UK3YY04qifoXU3lOk= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gojektech/valkyrie v0.0.0-20190210220504-8f62c1e7ba45/go.mod h1:tDYRk1s5Pms6XJjj5m2PxAzmQvaDU8GqDf1u6x7yxKw= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +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.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c h1:16eHWuMGvCjSfgRJKqIzapE78onvvTbdi1rMkU00lZw= -github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= +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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= +github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= +github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.11.1 h1:/dBYI+n4xIL+Y9SKXQrjlKTmJJDwCSlNLRwZ5nBhIek= -github.com/grpc-ecosystem/grpc-gateway v1.11.1/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +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/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hidevopsio/gorm v2.0.1+incompatible h1:nRGuB8mveptEOr0gI3rTbwKO11qlCuE83x+eTwmYzUQ= -github.com/hidevopsio/gorm v2.0.1+incompatible/go.mod h1:YHOPppbwInFOXTYvfDMCp2ekW96R2O9BuG5FgptF2pg= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +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/hidevopsio/formBinder v0.0.0-20240811094544-2118e9d3668d h1:CEpO3c0aRsegynMoxEpCysmy/lePVmtCSU6+qOWb/Pk= +github.com/hidevopsio/formBinder v0.0.0-20240811094544-2118e9d3668d/go.mod h1:PFEZAcn66wWTbWkpkS+omAVhIVIampnTIEh3akUA3pU= +github.com/hidevopsio/go-uuid v0.0.0-20240811102623-0749af16addf h1:/htNDo2bTYeoigbMtMkWJIzJtEoH3VUdBr+lRrO28kI= +github.com/hidevopsio/go-uuid v0.0.0-20240811102623-0749af16addf/go.mod h1:w7LankQd+f+LyuoHBA3qh5w1xsSsj2TXovtw0qy33IA= +github.com/hidevopsio/gocron v1.6.1-0.20210602042859-a8b1ada7665d h1:tyb3Uofi0B2+J6ocO34jjzDjKTxMQMVLMRMEBG5Z/4c= +github.com/hidevopsio/gocron v1.6.1-0.20210602042859-a8b1ada7665d/go.mod h1:r7hFZ8FQUTzUrBwbBao1OPpKO0/dZGTOEkBVFar+Fww= +github.com/hidevopsio/golog v0.0.0-20240811115351-6b4a7711e704 h1:+MB2aj5w+IKZumFSPsOMJ30WEhQIImVmfqmM9arp3/w= +github.com/hidevopsio/golog v0.0.0-20240811115351-6b4a7711e704/go.mod h1:PAdSAVsgMTZgHMHR9QU07S+gIJY2D8hc7MNVvhazxNE= +github.com/hidevopsio/hiboot v1.8.0 h1:Pi504NR0ScsgzStSQ8sen4KnQa5giWnkIB6tDPEwmPc= +github.com/hidevopsio/hiboot v1.8.0/go.mod h1:YcK507p7irSmiixN7Tc/Lyyj4EO5FW2YZro2BhS5Q2U= +github.com/hidevopsio/httpexpect v0.0.0-20240811100504-92ed99bc8bec h1:P8Cc0RBRffxmihk8Q6VajQhvZsJ/i1BmtLMqmr+OtSk= +github.com/hidevopsio/httpexpect v0.0.0-20240811100504-92ed99bc8bec/go.mod h1:bdWZrbWv4cxf1vR3lNiIJ2LBYfVmUAkFDK8ytBubtv8= +github.com/hidevopsio/i18n v0.0.0-20240811095331-eee3daa5c80f h1:+2IuerGSyOGGQiLe+lGFtmnaFfchXt5k6PfepHqnlEY= +github.com/hidevopsio/i18n v0.0.0-20240811095331-eee3daa5c80f/go.mod h1:3etx1Wx+FzrAUhnpgYxKBcjhvJD1LmtVk4d7bVpxcJ4= +github.com/hidevopsio/iris v0.0.0-20240811142313-7ed19cd46895 h1:2D/K010EMrwxuK/geGqMu5FRdww0/3qHibamJUL8amw= +github.com/hidevopsio/iris v0.0.0-20240811142313-7ed19cd46895/go.mod h1:S5zyawUrZLh96WF7mOFzD5end+2wQ9CWQdQzWgjH/EM= github.com/hidevopsio/mapstructure v1.1.3-0.20190908102033-f8832fd9e307 h1:Zc7/94OHdzC0A2sbJhrYErhhgho+fVW0qYQHarr8I+A= github.com/hidevopsio/mapstructure v1.1.3-0.20190908102033-f8832fd9e307/go.mod h1:HfcSxv9DfiSRv+QktNJmUUS4ByRmkxbldwKCpFglm7A= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hidevopsio/middleware v0.0.0-20240811142457-7e33354fa83f h1:zLwYOFUrf9fI6rUYddOPqFxBA8f9aZX5m/+SPPJW6n4= +github.com/hidevopsio/middleware v0.0.0-20240811142457-7e33354fa83f/go.mod h1:MNkKMvtBmt1IoIlCBsbL+ylynFu7yuiVeG+yZIvdabU= +github.com/hidevopsio/pio v0.0.0-20240811115022-e705bbf749aa h1:41FkUR+YfRYm5M/Rsg3gi2B2gdKPI8QUVKwi0ZqG6b8= +github.com/hidevopsio/pio v0.0.0-20240811115022-e705bbf749aa/go.mod h1:/LeeTJc9++Q453YJy8sXmDxQbVFkpD3CzpLz8zSScWs= +github.com/hidevopsio/viper v1.2.2-0.20210220025633-ccb4b202d169 h1:Ph6BkgjMElcd5eVVcKuUYcIsw615++Ou0aJJwgNED9M= +github.com/hidevopsio/viper v1.2.2-0.20210220025633-ccb4b202d169/go.mod h1:x1Ww++XoTwlwUN1tKDuBQlGHx7i6Sb6mfIDFmoMro2o= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/formBinder v0.0.0-20171010160137-ad9fb86c356f h1:WgD6cqCSncBgkftw34mSPlMKU5JgoruAomW/SJtRrGU= -github.com/iris-contrib/formBinder v0.0.0-20171010160137-ad9fb86c356f/go.mod h1:i8kTYUOEstd/S8TG0ChTXQdf4ermA/e8vJX0+QruD9w= -github.com/iris-contrib/formBinder v0.0.0-20190104093907-fbd5963f41e1 h1:7GsNnSLoVceNylMpwcfy5aFNz/S5/TV25crb34I5PEo= -github.com/iris-contrib/formBinder v0.0.0-20190104093907-fbd5963f41e1/go.mod h1:i8kTYUOEstd/S8TG0ChTXQdf4ermA/e8vJX0+QruD9w= -github.com/iris-contrib/go.uuid v2.0.0+incompatible h1:XZubAYg61/JwnJNbZilGjf3b3pB80+OQg2qf6c8BfWE= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/httpexpect v0.0.0-20180314041918-ebe99fcebbce h1:q8Ka/exfHNgK7izJE+aUOZd7KZXJ7oQbnJWiZakEiMo= -github.com/iris-contrib/httpexpect v0.0.0-20180314041918-ebe99fcebbce/go.mod h1:VER17o2JZqquOx41avolD/wMGQSFEFBKWmhag9/RQRY= -github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0 h1:Kyp9KiXwsyZRTeoNjgVCrWks7D8ht9+kg6yCjh8K97o= -github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= -github.com/iris-contrib/middleware v0.0.0-20171114084220-1060fbb0ce08 h1:eMdEcZQMT0Lge3x/vPRhg9wGLfdCUA3Z4wjog26HjVM= -github.com/iris-contrib/middleware v0.0.0-20171114084220-1060fbb0ce08/go.mod h1:lZivVjxn00uQH7vp452Wa2p9GD+2ElkVms944o+f0+Y= -github.com/jinzhu/copier v0.0.0-20180308034124-7e38e58719c3 h1:sHsPfNMAG70QAvKbddQ0uScZCHQoZsT5NykGRCeeeIs= -github.com/jinzhu/copier v0.0.0-20180308034124-7e38e58719c3/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s= -github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a h1:eeaG9XMUvRBYXJi4pg1ZKM7nxc5AfXfojeLLW7O5J3k= -github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= -github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20180806074554-22422dad46e1 h1:wnhMXidtb70kDZCeLt/EfsVtkXS5c8zLnE9y/6DIRAU= -github.com/juju/errors v0.0.0-20180806074554-22422dad46e1/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v0.0.0-20180524022052-584905176618 h1:MK144iBQF9hTSwBW/9eJm034bVoG30IshVm688T2hi8= -github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073 h1:WQM1NildKThwdP7qWrNAFGzp4ijNLw8RlgENkaI4MJs= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM= +github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kataras/golog v0.0.0-20180321173939-03be10146386 h1:VT6AeCHO/mc+VedKBMhoqb5eAK8B1i9F6nZl7EGlHvA= -github.com/kataras/golog v0.0.0-20180321173939-03be10146386/go.mod h1:PcaEvfvhGsqwXZ6S3CgCbmjcp+4UDUh2MIfF2ZEul8M= -github.com/kataras/iris v11.0.3+incompatible h1:dDO6AtDrusCZesEjBivmqhEGhjRN+Bzqzxdc8hXixOg= -github.com/kataras/iris v11.0.3+incompatible/go.mod h1:4cangdWZW4brINuhSqxUwRwwObNAwvqkQm3EcRDL5pA= -github.com/kataras/pio v0.0.0-20180511174041-a9733b5b6b83 h1:NoJ+fI58ptwrPc1blX116i+5xWGAY/2TJww37AN8X54= -github.com/kataras/pio v0.0.0-20180511174041-a9733b5b6b83/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0 h1:8nsMz3tWa9SWWPL60G1V6CUsf4lLjWLTNEtibhe8gh8= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.5 h1:U+CaK85mrNNb4k8BNOfgJtJ/gr6kswUCFj6miSzVC6M= -github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e h1:+lIPJOWl+jSiJOc70QXJ07+2eg2Jy2EC7Mi11BWujeM= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.1 h1:SIYunPjnlXcW+gVfvm0IlSeR5U3WZUOLfVmqg85Go44= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58= +github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= +github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/olivere/elastic v6.2.27+incompatible h1:c57kY8PF/J6Iz2ATxHQkWFNkYyKDlEZr6hl/O5ZFNvQ= -github.com/olivere/elastic v6.2.27+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olivere/elastic v6.2.37+incompatible h1:UfSGJem5czY+x/LqxgeCBgjDn6St+z8OnsCuxwD3L0U= +github.com/olivere/elastic v6.2.37+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8= github.com/olivere/elastic/v6 v6.2.1 h1:tZ2NZWoFCdFnuQg1q9JCyjN6YTczNF03tLj954ptqNc= github.com/olivere/elastic/v6 v6.2.1/go.mod h1:OeCPPyGCIn9j7/1Dk+tGE7gsezYo9lsJIiHhZjT/qQ4= -github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/olivere/elastic/v7 v7.0.12/go.mod h1:14rWX28Pnh3qCKYRVnSGXWLf9MbLonYS/4FDCY3LAPo= +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/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +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= -github.com/pelletier/go-toml v1.4.0 h1:u3Z1r+oOXJIkxqw34zVhyPgjBsm6X2wn21NWs/HfSeg= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= +github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= +github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= +github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA= +github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= +github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 h1:/vdW8Cb7EXrkqWGufVMES1OH2sU9gKVb2n9/1y5NMBY= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smarty/assertions v1.16.0 h1:EvHNkdRA4QHMrn75NZSoUQ/mAUXAYWfatfB01yTCzfY= +github.com/smarty/assertions v1.16.0/go.mod h1:duaaFdCS0K9dnoM50iyek/eYINOZ64gbh1Xlf6LG7AI= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY= +github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= +github.com/smartystreets/gunit v1.1.3/go.mod h1:EH5qMBab2UclzXUcpR8b93eHsIlp9u+pDQIRp5DZNzQ= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/sonyflake v0.0.0-20160530021500-fa881fb1052b h1:FxlG3UKLHlawZSajeceKbQT8Nws0oENmCNDIphYuxDY= -github.com/sony/sonyflake v0.0.0-20160530021500-fa881fb1052b/go.mod h1:dVvZuWJd174umvm5g8CmZD6S2GWwHKtpK/0ZPHswuNo= +github.com/sony/sonyflake v1.2.0 h1:Pfr3A+ejSg+0SPqpoAmQgEtNDAhc2G1SUYk205qVMLQ= +github.com/sony/sonyflake v1.2.0/go.mod h1:LORtCywH/cq10ZbyfhKrHYgAUGH7mOBa76enV9txy/Y= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/streadway/amqp v0.0.0-20180315184602-8e4aba63da9f h1:q//3aFQhyA8sBywUCO9DlDoFZFitzVhnght/YhKrQ6s= -github.com/streadway/amqp v0.0.0-20180315184602-8e4aba63da9f/go.mod h1:1WNBiOZtZQLpVAyu0iTduoJL9hEsMloAK5XWrtW0xdY= +github.com/streadway/amqp v1.1.0 h1:py12iX8XSyI7aN/3dUT8DFIDJazNJsVJdxNVEpnQTZM= +github.com/streadway/amqp v1.1.0/go.mod h1:WYSrTEYHOXHd0nwFeUXAe2G2hRnQT+deZJJf88uS9Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v1.5.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc h1:n+nNi93yXLkJvKwXNP9d55HC7lGK4H/SRcwB5IaUZLo= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180816142147-da425ebb7609 h1:BcMExZAULPkihVZ7UJXK7t8rwGqisXFw75tILnafhBY= -github.com/xeipuuv/gojsonschema v0.0.0-20180816142147-da425ebb7609/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.mongodb.org/mongo-driver v1.3.0 h1:ew6uUIeJOo+qdUUv7LxFCUhtWmVv7ZV/Xuy4FAUsw2E= -go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.mongodb.org/mongo-driver v1.16.1 h1:rIVLL3q0IHM39dvE+z2ulZLp9ENZKThVfuvN/IiN4l8= +go.mongodb.org/mongo-driver v1.16.1/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= @@ -435,121 +418,182 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180927165925-5295e8364332/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +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-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= 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= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 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-20181005035420-146acd28ed58/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-20181102091132-c10e9556a7bc/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= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd h1:HuTn7WObtcDo9uEEU7rEqL0jYthdXAmZ6PP+meazmaU= +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= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +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-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/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.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +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-20180906133057-8cf3aee42992/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-20180928133829-e4b3c5e90611/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= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/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-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +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/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 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 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -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/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.38.3 h1:ourkRZgR6qjJYoec9lYhX4+nuN1tEbV34dQEQ3IRk9U= -gopkg.in/ini.v1 v1.38.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/olivere/elastic.v5 v5.0.84 h1:acF/tRSg5geZpE3rqLglkS79CQMIMzOpWZE7hRXIkjs= -gopkg.in/olivere/elastic.v5 v5.0.84/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUrtTxrNrxJI= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/olivere/elastic.v5 v5.0.86 h1:xFy6qRCGAmo5Wjx96srho9BitLhZl2fcnpuidPwduXM= +gopkg.in/olivere/elastic.v5 v5.0.86/go.mod h1:M3WNlsF+WhYn7api4D87NIflwTV/c0iVs8cqfWhK+68= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/russross/blackfriday.v2 v2.0.0+incompatible h1:l1Mna0cVh8WlpyB8uFtc2c+5cdvrI5CDyuwTgIChojI= gopkg.in/russross/blackfriday.v2 v2.0.0+incompatible/go.mod h1:6sSBNz/GtOm/pJTuh5UmBK2ZHfmnxGbl2NZg1UliSOI= 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 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -hidevops.io/hiboot v1.3.1 h1:fnFDpGH88Q2q3j8gaUoM8bpgu49VR7JeB30gZziCQDg= -hidevops.io/hiboot v1.3.1/go.mod h1:SPgKnbe8KZuoiS/ifUZqxrvLTBeirJGYwex2XmTZMCI= -hidevops.io/viper v1.3.2 h1:V5S1yGjYbPwWlzg5SzSD7ghBoHLC7RpRjpef2yuHHwI= -hidevops.io/viper v1.3.2/go.mod h1:B1gD8pJIYvmlHegqP6p/BKe8E9MMfOd4egl98vQbGtM= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +gopkg.in/yaml.v2 v2.2.4/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= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo= +gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= +gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg= +gorm.io/gorm v1.25.11/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/starter/amqp/amqpclient.go b/starter/amqp/amqpclient.go index 7f8afab..f865901 100644 --- a/starter/amqp/amqpclient.go +++ b/starter/amqp/amqpclient.go @@ -3,9 +3,9 @@ package amqp import ( "bytes" "fmt" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/log" "github.com/streadway/amqp" - "hidevops.io/hiboot/pkg/at" - "hidevops.io/hiboot/pkg/log" ) type Channel struct { @@ -121,7 +121,7 @@ func BytesToString(b *[]byte) *string { return &r } -//CreateFanout 创建Fanout类型的队列 +// CreateFanout 创建Fanout类型的队列 func (chn *Channel) CreateFanout(queueName, exchange string) error { //type : 交换器类型 DIRECT("direct"), FANOUT("fanout"), TOPIC("topic"), HEADERS("headers"); //durable: 是否持久化,durable设置为true表示持久化,反之是非持久化 diff --git a/starter/amqp/autoconfigure.go b/starter/amqp/autoconfigure.go index e8a1e82..b9e935a 100644 --- a/starter/amqp/autoconfigure.go +++ b/starter/amqp/autoconfigure.go @@ -15,7 +15,7 @@ package amqp import ( - "hidevops.io/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app" ) const Profile = "amqp" @@ -49,4 +49,4 @@ type NewChannel func() (chn *Channel) func (c *configuration) NewChannel() NewChannel { return c.Channel -} \ No newline at end of file +} diff --git a/starter/amqp/autoconfigure_test.go b/starter/amqp/autoconfigure_test.go index a43b58f..5cab1ef 100644 --- a/starter/amqp/autoconfigure_test.go +++ b/starter/amqp/autoconfigure_test.go @@ -1,8 +1,8 @@ package amqp import ( + "github.com/hidevopsio/hiboot/pkg/log" "github.com/magiconair/properties/assert" - "hidevops.io/hiboot/pkg/log" "testing" ) diff --git a/starter/bolt/autoconfigure.go b/starter/bolt/autoconfigure.go index 82302a9..55df36c 100644 --- a/starter/bolt/autoconfigure.go +++ b/starter/bolt/autoconfigure.go @@ -15,8 +15,8 @@ package bolt // limitations under the License. import ( - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/log" ) const Profile = "bolt" diff --git a/starter/bolt/datasource.go b/starter/bolt/datasource.go index b50fa09..1d98543 100644 --- a/starter/bolt/datasource.go +++ b/starter/bolt/datasource.go @@ -16,7 +16,7 @@ package bolt import ( "github.com/boltdb/bolt" - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/log" "sync" "time" ) diff --git a/starter/bolt/properties.go b/starter/bolt/properties.go index e6ef5d0..5445ec8 100644 --- a/starter/bolt/properties.go +++ b/starter/bolt/properties.go @@ -15,7 +15,7 @@ package bolt import ( - "hidevops.io/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/at" "os" ) diff --git a/starter/bolt/repository.go b/starter/bolt/repository.go index eae2d16..62e0315 100644 --- a/starter/bolt/repository.go +++ b/starter/bolt/repository.go @@ -18,7 +18,7 @@ import ( "encoding/json" "errors" "github.com/boltdb/bolt" - "hidevops.io/hiboot-data/starter" + "hiboot-data/starter" "sync" ) diff --git a/starter/bolt/repository_test.go b/starter/bolt/repository_test.go index 1f91a56..835af61 100644 --- a/starter/bolt/repository_test.go +++ b/starter/bolt/repository_test.go @@ -16,7 +16,7 @@ package bolt import ( "github.com/stretchr/testify/assert" - "hidevops.io/hiboot-data/starter" + "hiboot-data/starter" "testing" ) diff --git a/starter/es/autoconfigure.go b/starter/es/autoconfigure.go index bc6761f..94d2d52 100644 --- a/starter/es/autoconfigure.go +++ b/starter/es/autoconfigure.go @@ -1,7 +1,7 @@ package es import ( - "hidevops.io/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app" ) const Profile = "es" @@ -21,7 +21,7 @@ func init() { app.Register(newConfiguration, new(Properties)) } -// Repository method name must be unique +// Client method name must be unique func (c *configuration) Client() *Client { client := newClient() err := client.Connect(c.Properties) diff --git a/starter/es/autoconfigure_test.go b/starter/es/autoconfigure_test.go index 2a002f1..c1b5538 100644 --- a/starter/es/autoconfigure_test.go +++ b/starter/es/autoconfigure_test.go @@ -1,15 +1,15 @@ package es import ( - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/log" "testing" ) func TestClient_Connect(t *testing.T) { log.SetLevel(log.DebugLevel) conf := newConfiguration(&Properties{ - Host: "127.0.0.1", - Port: 1111, + Host: "127.0.0.1", + Port: 1111, }) conf.Client() diff --git a/starter/es/client.go b/starter/es/client.go index dae67eb..861859a 100644 --- a/starter/es/client.go +++ b/starter/es/client.go @@ -4,9 +4,9 @@ import ( "fmt" "gopkg.in/olivere/elastic.v5" /*"github.com/olivere/elastic/v6"*/ - "hidevops.io/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/log" "time" - "hidevops.io/hiboot/pkg/log" ) type Properties struct { @@ -32,7 +32,7 @@ func (c *Client) Connect(p *Properties) (err error) { elastic.SetHealthcheckInterval(10*time.Second), elastic.SetURL(esUrl), elastic.SetBasicAuth(p.Username, p.Password), - ) + ) if err != nil { log.Errorf("elastic connection errors:%v", esUrl) return diff --git a/starter/es/client_test.go b/starter/es/client_test.go index 79d0144..71735ac 100644 --- a/starter/es/client_test.go +++ b/starter/es/client_test.go @@ -1,8 +1,8 @@ package es import ( + "github.com/hidevopsio/hiboot/pkg/at" "github.com/magiconair/properties/assert" - "hidevops.io/hiboot/pkg/at" "testing" ) diff --git a/starter/etcd/autoconfigure.go b/starter/etcd/autoconfigure.go index 5766dae..9bfc664 100644 --- a/starter/etcd/autoconfigure.go +++ b/starter/etcd/autoconfigure.go @@ -17,8 +17,8 @@ package etcd import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/pkg/transport" - "hidevops.io/hiboot/pkg/app" - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/log" "time" ) @@ -43,7 +43,6 @@ func newEtcdConfiguration(properties *Properties) *etcdConfiguration { return &etcdConfiguration{Properties: properties} } - func init() { app.Register(newEtcdConfiguration, new(Properties)) } diff --git a/starter/etcd/autoconfigure_test.go b/starter/etcd/autoconfigure_test.go index fd88963..ce44b26 100644 --- a/starter/etcd/autoconfigure_test.go +++ b/starter/etcd/autoconfigure_test.go @@ -2,9 +2,9 @@ package etcd import ( "github.com/coreos/etcd/clientv3" + "github.com/hidevopsio/hiboot/pkg/log" "github.com/stretchr/testify/assert" - "hidevops.io/hiboot-data/starter/etcd/fake" - "hidevops.io/hiboot/pkg/log" + "hiboot-data/starter/etcd/fake" "testing" ) diff --git a/starter/etcd/properties.go b/starter/etcd/properties.go index 9fcbf0d..316d60c 100644 --- a/starter/etcd/properties.go +++ b/starter/etcd/properties.go @@ -14,7 +14,7 @@ package etcd -import "hidevops.io/hiboot/pkg/at" +import "github.com/hidevopsio/hiboot/pkg/at" type cert struct { CertFile string `json:"cert_file" default:"config/certs/etcd.pem"` diff --git a/starter/gorm/autoconfigure.go b/starter/gorm/autoconfigure.go index 0c6ee8c..30a9452 100644 --- a/starter/gorm/autoconfigure.go +++ b/starter/gorm/autoconfigure.go @@ -15,36 +15,85 @@ package gorm import ( - "hidevops.io/hiboot/pkg/app" + "database/sql" + "fmt" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/crypto/rsa" + "gorm.io/driver/mysql" + "gorm.io/gorm" + "strings" ) const Profile = "gorm" +type DB struct { + at.Scope `value:"request"` + *gorm.DB +} + type configuration struct { - app.Configuration - // the properties member name must be Gorm if the mapstructure is gorm, - // so that the reference can be parsed - Properties *Properties + at.AutoConfiguration + + prop *properties + db *DB } -func newConfiguration(p *Properties) *configuration { - return &configuration{Properties: p} +func newConfiguration(prop *properties) *configuration { + return &configuration{prop: prop} } func init() { - app.Register(newConfiguration, new(Properties)) + app.Register(newConfiguration, new(properties)) } -func (c *configuration) dataSource() DataSource { - dataSource := GetDataSource() - if !dataSource.IsOpened() { - dataSource.Open(c.Properties) +func (c *configuration) DB() (db *DB, err error) { + var sqlDB *sql.DB + // return cached if it is healthy + if c.db != nil { + sqlDB, err = c.db.DB.DB() + if err == nil && sqlDB.Ping() == nil { + // If the connection is still alive, return the existing connection + db = c.db + return + } + log.Warnf("lost connection to database, attempting to reconnect...") + c.db = nil } - return dataSource -} -// Repository method name must be unique -func (c *configuration) Repository() Repository { - dataSource := c.dataSource() - return dataSource.Repository() + // create new connection if it is unhealthy + log.Infof("create a new database connection to %v@%v:%v", c.prop.Username, c.prop.Host, c.prop.Port) + db = new(DB) + password := c.prop.Password + if c.prop.Config.Decrypt { + var pwd []byte + pwd, err = rsa.DecryptBase64([]byte(password), []byte(c.prop.Config.DecryptKey)) + if err == nil { + password = string(pwd) + } + } + loc := strings.Replace(c.prop.Loc, "/", "%2F", -1) + databaseName := strings.Replace(c.prop.Database, "-", "_", -1) + + dsn := fmt.Sprintf( + "%v:%v@tcp(%v:%v)/%v?charset=%v&parseTime=%v&loc=%v", + c.prop.Username, + password, + c.prop.Host, + c.prop.Port, + databaseName, + c.prop.Charset, + c.prop.ParseTime, + loc, + ) + db.DB, err = gorm.Open(mysql.Open(dsn), &gorm.Config{}) + if err != nil { + log.Errorf("failed to connect db: %v", err) + return + } + log.Infof("database %v@%v:%v is connected", c.prop.Username, c.prop.Host, c.prop.Port) + + c.db = db + return } diff --git a/starter/gorm/autoconfigure_test.go b/starter/gorm/autoconfigure_test.go index c41aee9..eb8692a 100644 --- a/starter/gorm/autoconfigure_test.go +++ b/starter/gorm/autoconfigure_test.go @@ -22,7 +22,7 @@ import ( func TestConfiguration(t *testing.T) { // TODO: should test with fake data source - conf := newConfiguration(&Properties{ + conf := newConfiguration(&properties{ Type: "mysql", Host: "mysql-dev", Port: "3306", @@ -37,6 +37,7 @@ func TestConfiguration(t *testing.T) { }, }) - repo := conf.Repository() + repo, err := conf.DB() + assert.Nil(t, err) assert.NotEqual(t, nil, repo) } diff --git a/starter/gorm/datasource.go b/starter/gorm/datasource.go deleted file mode 100644 index 6cdefec..0000000 --- a/starter/gorm/datasource.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2018 John Deng (hi.devops.io@gmail.com). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gorm - -import ( - "errors" - "fmt" - "github.com/hidevopsio/gorm" - _ "github.com/hidevopsio/gorm/dialects/mssql" - _ "github.com/hidevopsio/gorm/dialects/mysql" - _ "github.com/hidevopsio/gorm/dialects/postgres" - _ "github.com/hidevopsio/gorm/dialects/sqlite" - "hidevops.io/hiboot/pkg/log" - "hidevops.io/hiboot/pkg/utils/crypto/rsa" - "strings" - "sync" - "time" -) - -type Repository interface { - gorm.Repository -} - -type DataSource interface { - Open(p *Properties) error - IsOpened() bool - Close() error - Repository() gorm.Repository -} - -type dataSource struct { - repository gorm.Repository -} - -var DatabaseIsNotOpenedError = errors.New("database is not opened") -var ds *dataSource -var dsOnce sync.Once - -func GetDataSource() DataSource { - dsOnce.Do(func() { - ds = new(dataSource) - }) - return ds -} - -func (d *dataSource) Init(repository Repository) { - d.repository = repository -} - -func (d *dataSource) Open(p *Properties) error { - var err error - err = d.Connect(p) - if err != nil { - return err - } - db := d.repository.SqlDB() - // SetConnMaxLifetime sets the maximum amount of time a connection may be reused. - duration, err := time.ParseDuration(p.ConnMaxLifetime) - if err != nil { - log.Errorf("dataSource parse duration failed: %v", err) - return err - } - db.SetConnMaxLifetime(duration) - // SetMaxIdleConns sets the maximum number of connections in the idle connection pool - db.SetMaxIdleConns(p.MaxIdleConns) - // SetMaxOpenConns sets the maximum number of open connections to the database. - db.SetMaxOpenConns(p.MaxOpenConns) - return nil -} - -func (d *dataSource) IsOpened() bool { - return d.repository != nil -} - -func (d *dataSource) Close() error { - if d.repository != nil { - err := d.repository.Close() - d.repository = nil - return err - } - return DatabaseIsNotOpenedError -} - -func (d *dataSource) Repository() gorm.Repository { - return d.repository -} - -func (d *dataSource) Interval(p *Properties) error { - duration, err := time.ParseDuration(p.Interval) - if err != nil { - log.Errorf("dataSource parse duration failed: %v", err) - return err - } - time.Sleep(duration) - return nil -} - -func (d *dataSource) Connect(p *Properties) (err error) { - password := p.Password - if p.Config.Decrypt { - pwd, err := rsa.DecryptBase64([]byte(password), []byte(p.Config.DecryptKey)) - if err == nil { - password = string(pwd) - } - } - loc := strings.Replace(p.Loc, "/", "%2F", -1) - databaseName := strings.Replace(p.Database, "-", "_", -1) - parseTime := "False" - if p.ParseTime { - parseTime = "True" - } - source := fmt.Sprintf("%v:%v@tcp(%v:%v)/%v?charset=%v&parseTime=%v&loc=%v", - p.Username, password, p.Host, p.Port, databaseName, p.Charset, parseTime, loc) - d.repository, err = gorm.Open(p.Type, source) - if err != nil { - log.Errorf("dataSource connection failed: %v (%v)", err, p) - if p.AutoReconnect { - // 重试间隔时间 - err := d.Interval(p) - if err != nil { - return err - } - if p.RetryTimes == -1 { - err = d.Connect(p) - } else if p.RetryTimes > p.NowRetryTimes { - p.NowRetryTimes++ - err = d.Connect(p) - } - - } else { - return err - } - } else { - log.Infof("connected to dataSource %v@%v:%v/%v", p.Username, p.Host, p.Port, databaseName) - } - return err -} \ No newline at end of file diff --git a/starter/gorm/datasource_test.go b/starter/gorm/datasource_test.go deleted file mode 100644 index abea5be..0000000 --- a/starter/gorm/datasource_test.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2018 John Deng (hi.devops.io@gmail.com). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gorm - -import ( - "github.com/hidevopsio/gorm" - "github.com/stretchr/testify/assert" - "hidevops.io/hiboot/pkg/log" - "testing" -) - -type User struct { - ID uint `gorm:"primary_key"` - Username string - Password string - Age int `gorm:"default:18"` - Gender int `gorm:"default:18"` -} - -func (User) TableName() string { - return "user" -} - -func init() { - log.SetLevel(log.DebugLevel) -} - -func TestDataSourceOpen(t *testing.T) { - prop := &Properties{ - Type: "mysql", - Host: "mysql-dev", - Port: "3306", - Username: "test", - Password: "LcNxqoI4zZjAnpiTD7JQxLJR/IgL2iTiSZ2nd7KPEBgxMV+FVhPSzM+fgH93XqZJNpboN4F/buX22yLTXK38AcVGTfID3rmQAOAc9A2DIWNy5v9+3NOY00M8z4dR1XHojheK0681cY9QVjtlJ70jFFDXb7PjFc2fQ0GIyIjBQDY=", - Database: "test", - ParseTime: true, - Charset: "utf8", - Loc: "Asia/Shanghai", - NowRetryTimes: 0, - RetryTimes: 2, - Interval: "1s", - AutoReconnect: true, - Config: Config{ - Decrypt: true, - }, - } - dataSource := new(dataSource) - - t.Run("should report error when close database if it's not opened", func(t *testing.T) { - err := dataSource.Close() - assert.Equal(t, DatabaseIsNotOpenedError, err) - }) - - err := dataSource.Open(prop) - t.Run("should open database", func(t *testing.T) { - assert.NotEqual(t, nil, err) - }) - - t.Run("should close database", func(t *testing.T) { - if dataSource.IsOpened() { - err := dataSource.Close() - assert.Equal(t, nil, err) - } - }) - - t.Run("should Init dataSource", func(t *testing.T) { - repo := new(gorm.FakeRepository) - dataSource.Init(repo) - - err := dataSource.Close() - assert.Equal(t, nil, err) - }) -} diff --git a/starter/gorm/fake/datasource.go b/starter/gorm/fake/datasource.go deleted file mode 100644 index bc375e5..0000000 --- a/starter/gorm/fake/datasource.go +++ /dev/null @@ -1,22 +0,0 @@ -package fake - -import "github.com/hidevopsio/gorm" - -type DataSource struct { -} - -func (d *DataSource) Open(dialect string, args ...interface{}) (db gorm.Repository, err error) { - return nil, nil -} - -func (d *DataSource) Close() error { - return nil -} - -func (d *DataSource) IsOpened() bool { - return false -} - -func (d *DataSource) Repository() gorm.Repository { - return nil -} diff --git a/starter/gorm/fake/datasource_test.go b/starter/gorm/fake/datasource_test.go deleted file mode 100644 index b665306..0000000 --- a/starter/gorm/fake/datasource_test.go +++ /dev/null @@ -1 +0,0 @@ -package fake diff --git a/starter/gorm/properties.go b/starter/gorm/properties.go index 32119be..64bf7ee 100644 --- a/starter/gorm/properties.go +++ b/starter/gorm/properties.go @@ -15,7 +15,7 @@ package gorm import ( - "hidevops.io/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/at" ) type Config struct { @@ -23,7 +23,7 @@ type Config struct { DecryptKey string `json:"decrypt_key"` } -type Properties struct { +type properties struct { // annotation ConfigurationProperties at.ConfigurationProperties `value:"gorm"` diff --git a/starter/kvrepository.go b/starter/kvrepository.go index a9c4304..a4d8d18 100644 --- a/starter/kvrepository.go +++ b/starter/kvrepository.go @@ -14,7 +14,7 @@ package data -import "hidevops.io/hiboot/pkg/utils/reflector" +import "github.com/hidevopsio/hiboot/pkg/utils/reflector" // KVRepository is the Key/Value Repository interface type KVRepository interface { diff --git a/starter/kvrepository_test.go b/starter/kvrepository_test.go index 022ef6d..8b213b1 100644 --- a/starter/kvrepository_test.go +++ b/starter/kvrepository_test.go @@ -15,8 +15,8 @@ package data import ( + "github.com/hidevopsio/hiboot/pkg/utils/reflector" "github.com/stretchr/testify/assert" - "hidevops.io/hiboot/pkg/utils/reflector" "testing" ) diff --git a/starter/mongo/autoconfigure.go b/starter/mongo/autoconfigure.go index deb462d..7426d34 100644 --- a/starter/mongo/autoconfigure.go +++ b/starter/mongo/autoconfigure.go @@ -1,7 +1,7 @@ package mongo import ( - "hidevops.io/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/app" ) const Profile = "mongo" diff --git a/starter/mongo/autoconfigure_test.go b/starter/mongo/autoconfigure_test.go index de67f6f..c14385b 100644 --- a/starter/mongo/autoconfigure_test.go +++ b/starter/mongo/autoconfigure_test.go @@ -1,15 +1,15 @@ package mongo import ( - "hidevops.io/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/log" "testing" ) func TestClient_Connect(t *testing.T) { log.SetLevel(log.DebugLevel) conf := newConfiguration(&Properties{ - Host: "127.0.0.1", - Port: 1111, + Host: "127.0.0.1", + Port: 1111, }) conf.Client() diff --git a/starter/mongo/client.go b/starter/mongo/client.go index 2e0536d..fc852da 100644 --- a/starter/mongo/client.go +++ b/starter/mongo/client.go @@ -3,11 +3,11 @@ package mongo import ( "context" "fmt" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/log" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readpref" - "hidevops.io/hiboot/pkg/at" - "hidevops.io/hiboot/pkg/log" "time" ) diff --git a/starter/mongo/client_test.go b/starter/mongo/client_test.go index 74a495c..41a46f5 100644 --- a/starter/mongo/client_test.go +++ b/starter/mongo/client_test.go @@ -1,8 +1,8 @@ package mongo import ( + "github.com/hidevopsio/hiboot/pkg/at" "github.com/magiconair/properties/assert" - "hidevops.io/hiboot/pkg/at" "testing" ) diff --git a/starter/redis/autoconfigure.go b/starter/redis/autoconfigure.go new file mode 100644 index 0000000..505d5e0 --- /dev/null +++ b/starter/redis/autoconfigure.go @@ -0,0 +1,92 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package redis + +import ( + "context" + "fmt" + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/crypto/rsa" + "github.com/redis/go-redis/v9" + "time" +) + +const Profile = "redis" + +type Client struct { + at.Scope `value:"request"` + + *redis.Client +} + +type configuration struct { + at.AutoConfiguration + + prop *properties + client *Client +} + +func newConfiguration(prop *properties) *configuration { + return &configuration{prop: prop} +} + +func init() { + app.Register(newConfiguration, new(properties)) +} + +func (c *configuration) Client() (cli *Client, err error) { + var redisCli *redis.Client + ctx, cancel := context.WithTimeout(context.Background(), time.Second*time.Duration(c.prop.Timeout)) + defer cancel() + // return cached if it is healthy + if c.client != nil { + _, err = c.client.Ping(ctx).Result() + if err == nil { + // If the connection is still alive, return the existing connection + cli = c.client + return + } + log.Warnf("lost connection to redis, attempting to reconnect...") + c.client = nil + } + + // create new connection if it is unhealthy + log.Infof("create a new database connection to %v:%v db: %v", c.prop.Host, c.prop.Port, c.prop.DB) + cli = new(Client) + password := c.prop.Password + if c.prop.Config.Decrypt { + var pwd []byte + pwd, err = rsa.DecryptBase64([]byte(password), []byte(c.prop.Config.DecryptKey)) + if err == nil { + password = string(pwd) + } + } + redisCli = redis.NewClient(&redis.Options{ + Addr: fmt.Sprintf("%v:%v", c.prop.Host, c.prop.Port), + Password: password, + DB: c.prop.DB, + }) + if err != nil { + log.Errorf("failed to connect to redis server: %v", err) + return + } + log.Infof("redis %v:%v is connected", c.prop.Host, c.prop.Port) + cli.Client = redisCli + c.client = cli + + return +} diff --git a/starter/redis/autoconfigure_test.go b/starter/redis/autoconfigure_test.go new file mode 100644 index 0000000..c53c755 --- /dev/null +++ b/starter/redis/autoconfigure_test.go @@ -0,0 +1,38 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package redis + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestConfiguration(t *testing.T) { + + // TODO: should test with fake data source + conf := newConfiguration(&properties{ + Host: "mysql-dev", + Port: "3306", + Password: "LcNxqoI4zZjAnpiTD7JQxLJR/IgL2iTiSZ2nd7KPEBgxMV+FVhPSzM+fgH93XqZJNpboN4F/buX22yLTXK38AcVGTfID3rmQAOAc9A2DIWNy5v9+3NOY00M8z4dR1XHojheK0681cY9QVjtlJ70jFFDXb7PjFc2fQ0GIyIjBQDY=", + DB: 0, + Config: Config{ + Decrypt: true, + }, + }) + + repo, err := conf.DB() + assert.Nil(t, err) + assert.NotEqual(t, nil, repo) +} diff --git a/starter/redis/properties.go b/starter/redis/properties.go new file mode 100644 index 0000000..3f7258a --- /dev/null +++ b/starter/redis/properties.go @@ -0,0 +1,35 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package redis + +import ( + "github.com/hidevopsio/hiboot/pkg/at" +) + +type Config struct { + Decrypt bool `json:"decrypt" default:"true"` + DecryptKey string `json:"decrypt_key"` +} + +type properties struct { + at.ConfigurationProperties `value:"redis"` + + Host string `json:"host" default:"redis-master"` + Port string `json:"port" default:"6379"` + Password string `json:"password"` + DB int `json:"client" default:"0"` + Config Config `json:"config"` + Timeout int `json:"timeout" default:"2"` +} diff --git a/starter/sqlx/autoconfigure.go b/starter/sqlx/autoconfigure.go new file mode 100644 index 0000000..603b488 --- /dev/null +++ b/starter/sqlx/autoconfigure.go @@ -0,0 +1,98 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sqlx + +import ( + "fmt" + _ "github.com/go-sql-driver/mysql" // MySQL 驱动 + "github.com/hidevopsio/hiboot/pkg/app" + "github.com/hidevopsio/hiboot/pkg/at" + "github.com/hidevopsio/hiboot/pkg/log" + "github.com/hidevopsio/hiboot/pkg/utils/crypto/rsa" + "github.com/jmoiron/sqlx" + _ "github.com/mattn/go-sqlite3" // SQLite 驱动 +) + +const Profile = "sqlx" + +type DB struct { + at.Scope `value:"request"` + *sqlx.DB +} + +type configuration struct { + at.AutoConfiguration + + prop *properties + db *DB +} + +func newConfiguration(prop *properties) *configuration { + return &configuration{prop: prop} +} + +func init() { + app.Register(newConfiguration, new(properties)) +} + +func (c *configuration) DB() (db *DB, err error) { + var sqlDB *sqlx.DB + // return cached if it is healthy + if c.db != nil { + sqlDB = c.db.DB + if err == nil && sqlDB.Ping() == nil { + // If the connection is still alive, return the existing connection + db = c.db + return + } + log.Warnf("lost connection to database, attempting to reconnect...") + c.db = nil + } + + db = new(DB) + + var dsn string + var report string + if c.prop.Type == "sqlite3" { + dsn = c.prop.Database + report = fmt.Sprintf("database %v %v", c.prop.Type, c.prop.Database) + } else { + password := c.prop.Password + if c.prop.Config.Decrypt { + var pwd []byte + pwd, err = rsa.DecryptBase64([]byte(password), []byte(c.prop.Config.DecryptKey)) + if err == nil { + password = string(pwd) + } + } + + dsn = fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?parseTime=true", + c.prop.Username, password, c.prop.Host, c.prop.Port, c.prop.Database) + report = fmt.Sprintf("database %v %v %v@%v:%v", c.prop.Type, c.prop.Database, c.prop.Username, c.prop.Host, c.prop.Port) + } + + // create new connection if it is unhealthy + log.Infof("create a new database connection to %v", report) + + db.DB, err = sqlx.Connect(c.prop.Type, dsn) + if err != nil { + log.Errorf("failed to connect db: %v", err) + return + } + log.Infof("%v is connected", report) + + c.db = db + return +} diff --git a/starter/sqlx/autoconfigure_test.go b/starter/sqlx/autoconfigure_test.go new file mode 100644 index 0000000..1eeb63a --- /dev/null +++ b/starter/sqlx/autoconfigure_test.go @@ -0,0 +1,43 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sqlx + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestConfiguration(t *testing.T) { + + // TODO: should test with fake data source + conf := newConfiguration(&properties{ + Type: "mysql", + Host: "mysql-dev", + Port: "3306", + Username: "test", + Password: "LcNxqoI4zZjAnpiTD7JQxLJR/IgL2iTiSZ2nd7KPEBgxMV+FVhPSzM+fgH93XqZJNpboN4F/buX22yLTXK38AcVGTfID3rmQAOAc9A2DIWNy5v9+3NOY00M8z4dR1XHojheK0681cY9QVjtlJ70jFFDXb7PjFc2fQ0GIyIjBQDY=", + Database: "test", + ParseTime: true, + Charset: "utf8", + Loc: "Asia/Shanghai", + Config: Config{ + Decrypt: true, + }, + }) + + repo, err := conf.DB() + assert.Nil(t, err) + assert.NotEqual(t, nil, repo) +} diff --git a/starter/sqlx/properties.go b/starter/sqlx/properties.go new file mode 100644 index 0000000..d044773 --- /dev/null +++ b/starter/sqlx/properties.go @@ -0,0 +1,47 @@ +// Copyright 2018 John Deng (hi.devops.io@gmail.com). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sqlx + +import ( + "github.com/hidevopsio/hiboot/pkg/at" +) + +type Config struct { + Decrypt bool `json:"decrypt" default:"true"` + DecryptKey string `json:"decrypt_key"` +} + +type properties struct { + // annotation ConfigurationProperties + at.ConfigurationProperties `value:"sqlx"` + + Type string `json:"type" default:"mysql"` // mysql, postgres, sqlite3, mssql, // mysql, postgres, sqlite3, mssql, + Host string `json:"host" default:"mysql"` + Port string `json:"port" default:"3306"` + Database string `json:"database"` + Username string `json:"username"` + Password string `json:"password"` + Charset string `json:"charset" default:"utf8"` + ParseTime bool `json:"parse_time" default:"true"` + Loc string `json:"loc" default:"Asia/Shanghai"` + Config Config `json:"config"` + ConnMaxLifetime string `json:"connMaxLifetime" default:"60s"` + MaxIdleConns int `json:"maxIdle_conns" default:"20"` + MaxOpenConns int `json:"maxOpen_conns" default:"200"` + AutoReconnect bool `json:"auto_reconnect" default:"true"` + RetryTimes int `json:"retry_times" default:"-1"` + Interval string `json:"interval" default:"3s"` + NowRetryTimes int `json:"now_retry_times" default:"0"` +}