console-core-go

module
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT

README

What is console-core-go?

console-core-go is a modular design API framework based on Gin, which encapsulates commonly used functions, is simple to use, and is committed to fast business Research and development, while adding more restrictions, restrict the development members of the project team, avoid chaos, disorder and free and arbitrary coding.

Features:

  1. Rate-limited APIs supported by rate
  2. Email notification when panic occurs
  3. Cross-Origin Resource Sharing supported by cors
  4. Metrics monitoring and alerting by Prometheus
  5. Automatically generate RESTful API documentation supported by Swagger
  6. Trace project internal invoking
  7. Visualized performance analysis supported by pprof
  8. Uniformly defined error codes supported by err-no
  9. Blazing fast, structured, leveled logging system by zap
  10. Complete configuration solution supported by viper
  11. Developer Friendly ORM library supported by gorm
  12. Redis supported by go-redis
  13. Standard RESTful API return value
  14. CURD code generator , controller generator, etc.

work steps

go run -v .\cmd\mysqlmd\main.go  -addr 127.0.0.1:3306 -name hi_node -user root -pass ""
#touch %GOPATH%\bin\.env #GO_GORM_MONGO=0/1
go build -o gormgen .\cmd\gormgen\main.go
del %GOPATH%\bin\gormgen.exe
move gormgen %GOPATH%\bin\gormgen.exe
go generate ./...
# modify %GOPATH%\bin\.env, change GO_GORM_MONGO=1 then run go generate ./... again
# GO_GORM_MONGO=0 generate mysql code, GO_GORM_MONGO=1, generate mongo code
#go run -v .\cmd\mfmt\main.go
#only auto generated code need to format
#go run -v .\cmd\mfmt\main.go -src ./
go run -v .\cmd\mfmt\main.go -src ./internal/repository/mysql
go run -v .\cmd\mfmt\main.go -src ./internal/repository/mongo
go run -v .\cmd\mfmt\main.go -src ./internal/repository/model
go install github.com/swaggo/swag/cmd/swag@v1.16.3
swag init

websocket hub

https://github.com/eleven26/go-pusher

winipcfg is copying from:

golang.zx2c4.com/wireguard/windows golang.zx2c4.com/wireguard/windows/tunnel/winipcfg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL