-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Gin-based API server implement and Redis-based cache implement. * feat: add gin server & add some test * feat!: update server init * feat!: update server interface * feat!: update error * feat: update log level * feat!: update server with customization * feat!: remove server interface * feat: add gin fx * feat: add gin token middleware * feat: add gin token const * feat!: move init config & add cache init * feat!: update repository + config * feat: go mod update
- Loading branch information
Showing
27 changed files
with
1,055 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
all: test | ||
|
||
.PHONY: test | ||
test: | ||
# Don't use parallel because of config tests share the same os environment | ||
GOARCH=amd64 ginkgo -gcflags=all=-l -r --output-dir=test/report/ -covermode count --coverpkg=./config |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,72 @@ | ||
module github.com/kovercjm/tool-go | ||
|
||
go 1.20 | ||
go 1.21 | ||
|
||
require ( | ||
github.com/glebarez/sqlite v1.7.0 | ||
github.com/go-sql-driver/mysql v1.7.0 | ||
github.com/google/uuid v1.3.0 | ||
github.com/agiledragon/gomonkey/v2 v2.10.1 | ||
github.com/gin-gonic/gin v1.9.1 | ||
github.com/glebarez/sqlite v1.9.0 | ||
github.com/go-redis/redis v6.15.9+incompatible | ||
github.com/go-sql-driver/mysql v1.7.1 | ||
github.com/google/uuid v1.3.1 | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 | ||
github.com/joho/godotenv v1.5.1 | ||
github.com/kelseyhightower/envconfig v1.4.0 | ||
github.com/onsi/ginkgo/v2 v2.13.0 | ||
github.com/onsi/gomega v1.28.1 | ||
github.com/pkg/errors v0.9.1 | ||
go.uber.org/fx v1.19.2 | ||
go.uber.org/zap v1.24.0 | ||
google.golang.org/grpc v1.54.0 | ||
google.golang.org/protobuf v1.30.0 | ||
gorm.io/driver/mysql v1.4.7 | ||
gorm.io/gorm v1.24.6 | ||
gorm.io/plugin/dbresolver v1.4.1 | ||
go.uber.org/fx v1.20.1 | ||
go.uber.org/zap v1.26.0 | ||
google.golang.org/grpc v1.59.0 | ||
google.golang.org/protobuf v1.31.0 | ||
gorm.io/driver/mysql v1.5.2 | ||
gorm.io/gorm v1.25.5 | ||
gorm.io/plugin/dbresolver v1.4.7 | ||
) | ||
|
||
require ( | ||
github.com/bytedance/sonic v1.9.1 // indirect | ||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect | ||
github.com/dustin/go-humanize v1.0.1 // indirect | ||
github.com/glebarez/go-sqlite v1.20.3 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/gabriel-vasile/mimetype v1.4.2 // indirect | ||
github.com/gin-contrib/sse v0.1.0 // indirect | ||
github.com/glebarez/go-sqlite v1.21.2 // indirect | ||
github.com/go-logr/logr v1.2.4 // indirect | ||
github.com/go-playground/locales v0.14.1 // indirect | ||
github.com/go-playground/universal-translator v0.18.1 // indirect | ||
github.com/go-playground/validator/v10 v10.14.0 // indirect | ||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect | ||
github.com/goccy/go-json v0.10.2 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/go-cmp v0.6.0 // indirect | ||
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 // indirect | ||
github.com/jinzhu/inflection v1.0.0 // indirect | ||
github.com/jinzhu/now v1.1.5 // indirect | ||
github.com/mattn/go-isatty v0.0.17 // indirect | ||
github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578 // indirect | ||
go.uber.org/atomic v1.7.0 // indirect | ||
go.uber.org/dig v1.16.1 // indirect | ||
go.uber.org/multierr v1.6.0 // indirect | ||
golang.org/x/net v0.8.0 // indirect | ||
golang.org/x/sys v0.6.0 // indirect | ||
golang.org/x/text v0.8.0 // indirect | ||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect | ||
modernc.org/libc v1.22.2 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/klauspost/cpuid/v2 v2.2.4 // indirect | ||
github.com/leodido/go-urn v1.2.4 // indirect | ||
github.com/mattn/go-isatty v0.0.19 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/onsi/ginkgo v1.16.5 // indirect | ||
github.com/pelletier/go-toml/v2 v2.0.8 // indirect | ||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect | ||
github.com/rogpeppe/go-internal v1.11.0 // indirect | ||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect | ||
github.com/ugorji/go/codec v1.2.11 // indirect | ||
go.uber.org/dig v1.17.0 // indirect | ||
go.uber.org/multierr v1.10.0 // indirect | ||
golang.org/x/arch v0.3.0 // indirect | ||
golang.org/x/crypto v0.14.0 // indirect | ||
golang.org/x/net v0.17.0 // indirect | ||
golang.org/x/sys v0.13.0 // indirect | ||
golang.org/x/text v0.13.0 // indirect | ||
golang.org/x/tools v0.12.0 // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
modernc.org/libc v1.22.5 // indirect | ||
modernc.org/mathutil v1.5.0 // indirect | ||
modernc.org/memory v1.5.0 // indirect | ||
modernc.org/sqlite v1.20.3 // indirect | ||
modernc.org/sqlite v1.23.1 // indirect | ||
) |
Oops, something went wrong.