欠落しているゴランデータ管理パネルビルダーツール。
ドキュメンテーション |中文文档 |中文介绍 |デモ |中文デモ |ツイッター |フォーラム
ララベル管理者に触発された
GoAdmin は、golang アプリのデータ視覚化管理パネルを構築するのに役立つツールキットです。
オンラインデモ:https://demo.go-admin.com
クイックフォローアップの例:https://github.com/GoAdminGroup/example
GoAdmin+vueの例: https://github.com/GoAdminGroup/goadmin-vue-example
私たちはあなたの助けが必要です:https://github.com/GoAdminGroup/docs/issues/1
それを実行するために3つのステップに従います。
注:これで、次のようにすることですぐに始めることができます。
$ go install github.com/GoAdminGroup/adm@latest
$ mkdir new_project && cd new_project
$ adm init
または(v1.2.16以降のバージョンのadmを使用してください)
$ mkdir new_project && cd new_project
$ go install github.com/GoAdminGroup/adm@latest
$ adm init web
package main
import (
"github.com/gin-gonic/gin"
_ "github.com/GoAdminGroup/go-admin/adapter/gin"
_ "github.com/GoAdminGroup/go-admin/modules/db/drivers/mysql"
"github.com/GoAdminGroup/go-admin/engine"
"github.com/GoAdminGroup/go-admin/plugins/admin"
"github.com/GoAdminGroup/go-admin/modules/config"
"github.com/GoAdminGroup/themes/adminlte"
"github.com/GoAdminGroup/go-admin/template"
"github.com/GoAdminGroup/go-admin/template/chartjs"
"github.com/GoAdminGroup/go-admin/template/types"
"github.com/GoAdminGroup/go-admin/examples/datamodel"
"github.com/GoAdminGroup/go-admin/modules/language"
)
func main() {
r := gin.Default()
eng := engine.Default()
// global config
cfg := config.Config{
Databases: config.DatabaseList{
"default": {
Host: "127.0.0.1",
Port: "3306",
User: "root",
Pwd: "root",
Name: "goadmin",
MaxIdleConns: 50,
MaxOpenConns: 150,
ConnMaxLifetime: time.Hour,
Driver: "mysql",
},
},
UrlPrefix: "admin",
// STORE is important. And the directory should has permission to write.
Store: config.Store{
Path: "./uploads",
Prefix: "uploads",
},
Language: language.EN,
// debug mode
Debug: true,
// log file absolute path
InfoLogPath: "/var/logs/info.log",
AccessLogPath: "/var/logs/access.log",
ErrorLogPath: "/var/logs/error.log",
ColorScheme: adminlte.ColorschemeSkinBlack,
}
// add component chartjs
template.AddComp(chartjs.NewChart())
_ = eng.AddConfig(&cfg).
AddGenerators(datamodel.Generators).
// add generator, first parameter is the url prefix of table when visit.
// example:
//
// "user" => http://localhost:9033/admin/info/user
//
AddGenerator("user", datamodel.GetUserTable).
Use(r)
// customize your pages
eng.HTML("GET", "/admin", datamodel.GetContent)
_ = r.Run(":9033")
}
その他のフレームワークの例: https://github.com/GoAdminGroup/go-admin/tree/master/examples
GO111MODULE=on go run main.go
訪問: http://localhost:9033/admin
アカウント: 管理者 パスワード: 管理者
詳細については、ドキュメントを参照してください。
あなたのサポートは私がより良くするのを助けます![支援者になる]]
開発チームに参加するには、こちら