gin-frame

module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT

README

说明

gin的基础骨架封装,结合了mysql、redis的连接池,日志,配置读取,平滑重启等。

部署与管理

  • 本地编译
go get github.com/13sai/gin-frame

配置参考:

name: demo
db:
  name: blog
  host: 127.0.0.1:3306
  username: root
  password: 111111
  charset: utf8mb4
  MaxIdleConns: 10
  MaxOpenConns: 2
  log: true
redis:
  host: 127.0.0.1
  port: 6379
  auth:
mode: debug
addr: :8080
max_ping_count: 4
log:
  level: debug
  file_format: "%Y%m%d"
  max_save_days: 30
  file_type: one #one, level

main.go可参照cmd/demo/main.go

router和controller建议自定义。

Directories

Path Synopsis
cmd
internal
db

Jump to

Keyboard shortcuts

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