遗失的Golang语言编写的数据可视化与管理平台构建框架
goAdmin 可以帮助你的golang应用快速实现数据可视化,搭建一个数据管理平台。
demo: http://demo.go-admin.cn/admin 账号:admin 密码:admin
- 使用adminlte构建的漂亮的管理界面
- 大量插件供使用
- 完善的认证系统
- 支持多个web框架:gin, beego, echo...
详见 wiki
go get -v -u github.com/chenhg5/go-admin
https://github.com/chenhg5/go-admin/blob/master/examples/datamodel/admin.sql
go install github.com/chenhg5/go-admin/admincli
admincli generate -h=127.0.0.1 -p=3306 -P=root -n=godmin -pa=main -o=./model
package main
import (
"github.com/gin-gonic/gin"
_ "github.com/chenhg5/go-admin/adapter/gin"
"github.com/chenhg5/go-admin/engine"
"github.com/chenhg5/go-admin/plugins/admin"
"github.com/chenhg5/go-admin/modules/config"
"github.com/chenhg5/go-admin/examples/datamodel"
)
func main() {
r := gin.Default()
eng := engine.Default()
// global config
cfg := config.Config{
DATABASE: []config.Database{
{
HOST: "127.0.0.1",
PORT: "3306",
USER: "root",
PWD: "root",
NAME: "godmin",
MAX_IDLE_CON: 50,
MAX_OPEN_CON: 150,
DRIVER: "mysql",
},
},
DOMAIN: "localhost",
PREFIX: "admin",
STORE: config.Store{
PATH: "./uploads",
PREFIX: "uploads",
},
LANGUAGE: "cn",
}
// Generators: 详见 https://github.com/chenhg5/go-admin/blob/master/examples/datamodel/tables.go
adminPlugin := admin.NewAdmin(datamodel.Generators)
eng.AddConfig(cfg).AddPlugins(adminPlugin).Use(r)
r.Run(":9033")
}
其他例子: https://github.com/chenhg5/go-admin/tree/master/examples
非常欢迎提pr,这里可以加入开发小组
QQ群: 756664859
inspired by laravel-admin