Skip to content

Commit a4e0e31

Browse files
author
cg33
committed
update docs
1 parent 88eef93 commit a4e0e31

File tree

7 files changed

+63
-19
lines changed

7 files changed

+63
-19
lines changed

zh/README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33

44
```GoAdmin``` 是一个基于```golang```面向生产的数据可视化管理平台搭建框架,可以让你用极少的代码在极短时间内搭建起一个管理后台。
55

6-
一般开发管理后台需要至少一个后台工程师,一个前端工程师,花费至少一周时间才能搭建完成,搭建完成后我们需要分别去部署前端代码和后端代码。
7-
而利用```GoAdmin```,只需要一名```golang```后端工程师。在先花一点点时间了解掌握```GoAdmin```后,即可开发好一个面向生产环境的管理后台。而且所有的框架代码(包括前端文件)都将编译成一个二进制文件,直接放到任意服务器平台上即可运行,十分利于分发和部署。
6+
一般开发一套管理后台需要至少一个后台工程师,一个前端工程师,花费至少一周时间才能搭建完成,搭建完成后我们需要分别去部署前端代码和后端代码。
7+
而利用```GoAdmin```,只需要一名```golang```后端工程师。在先花一点点时间了解掌握```GoAdmin```后,即可开发好一个面向生产环境的管理后台。而且所有的框架代码(包括前端文件)都将编译成一个二进制文件,直接放到对应服务器上即可运行,十分利于分发和部署。
88

9-
对于功能需求```GoAdmin```目前支持对主流sql数据库增删改查的管理,更多的插件如:监控系统(类似grafana),服务器管理,api管理等等会陆续开发并开放
9+
功能需求方面```GoAdmin```目前内置支持对主流sql数据库(mysql/postgresql/sqlite)增删改查的管理,而更多的功能插件如:监控系统(类似grafana),版本发布系统,api管理系统,日志管理系统等等会陆续开发并开放
1010

11-
对于前端个性化需求,```GoAdmin```目前支持Adminlte和sword的主题,更多主题也在制作中。
11+
对于前端个性化需求,```GoAdmin```目前官方免费支持Adminlte、Sword两个主题,更多主题正在制作中。
12+
对应更多的登录界面组件也在制作中,复古的或现代的,酷炫的或保守的,敬请期待。
1213

13-
这里有一个极其简单的例子[https://github.com/GoAdminGroup/example](https://github.com/GoAdminGroup/example)
14+
这里有一个极易上手的例子[https://github.com/GoAdminGroup/example](https://github.com/GoAdminGroup/example)
1415

15-
**GoAdmin目前一周更新一个小版本,一个月更新一个较大版本。会备注是否推荐更新。**
16+
**GoAdmin目前保持一周更新一个小版本,一个月更新一个较大版本。会备注是否推荐更新。**
1617

1718
## 特性
1819

@@ -42,12 +43,13 @@
4243

4344
[社区](http://forum.go-admin.cn)
4445

45-
QQ群:756664859,请备注加群来意
46+
QQ群:756664859,为防广告,请备注加群来意,没备注不通过。
4647

4748
[微信群](http://quick.go-admin.cn/resource/wechat_qrcode.jpg)
4849

4950
## 支持
5051

51-
您的支持会帮助我更好的去完善项目,备注或告知我您的github/gitee用户名,我们根据意愿会列出捐赠者名单。🙏
52+
您的支持会帮助我更好的去完善项目,备注或告知我您的 github/gitee 用户名,我们根据意愿会列出捐赠者名单。🙏
53+
同时捐赠者可直接联系我进入捐赠者用户群,您的需求将第一时间得到反馈。
5254

5355
<img src="http://quick.go-admin.cn/official/assets/imgs/shoukuan.jpg" width="650" />

zh/development/adapter.md

+21-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---
33

44
适配器的作用是实现web框架context与GoAdmin自身context的转换。
5-
制作一个adapter需要实现三个方法
5+
制作一个adapter需要实现以下方法
66

77
```go
88
package adapter
@@ -18,12 +18,26 @@ import (
1818
// response to the corresponding context of framework.
1919
type WebFrameWork interface {
2020
Use(interface{}, []plugins.Plugin) error
21-
Content(interface{}, types.GetPanel)
21+
Content(interface{}, types.GetPanelFn)
22+
SetConnection(db.Connection)
23+
GetConnection() db.Connection
24+
SetContext(ctx interface{}) WebFrameWork
25+
GetCookie() (string, error)
26+
Path() string
27+
Method() string
28+
PjaxHeader() string
29+
Redirect()
30+
SetContentType()
31+
Write(body []byte)
32+
CookieKey() string
33+
HTMLContentType() string
34+
Name() string
35+
User(ci interface{}) (models.UserModel, bool)
36+
SetApp(app interface{}) error
37+
AddHandler(method, path string, plug plugins.Plugin)
2238
}
2339
```
2440

25-
除了```Use``````Content```外还需要实现```init```
26-
2741
## Use
2842

2943
**Use**接收两个参数,第一个参数类型为**interface{}**,是web框架的context,第二参数为插件数组。返回值是一个**error**
@@ -55,4 +69,6 @@ type GetPanel func(ctx interface{}) (Panel, error)
5569
func init() {
5670
engine.Register(new(Beego))
5771
}
58-
```
72+
```
73+
74+
更多请参考:[https://github.com/GoAdminGroup/go-admin/tree/master/adapter](https://github.com/GoAdminGroup/go-admin/tree/master/adapter)

zh/development/code_style.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# 代码规范
22
---
33

4-
```
4+
执行以下make命令,具体内容在框架的```Makefile```
5+
6+
```bash
57
make lint
68
```

zh/development/plugins.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
# 插件开发
22
---
33

4+
一个插件需要实现对应的三个接口,如:
5+
6+
```go
7+
// Plugin as one of the key components of goAdmin has three
8+
// methods. GetRequest return all the path registered in the
9+
// plugin. GetHandler according the url and method return the
10+
// corresponding handler. InitPlugin init the plugin which do
11+
// something like init the database and set the config and register
12+
// the routes. The Plugin must implement the three methods.
13+
type Plugin interface {
14+
15+
// 以下这两个接口内容基本是固定的,可参考后面的example插件,照写即可
16+
17+
// 获取请求
18+
GetRequest() []context.Path
19+
20+
// 获取控制器方法
21+
GetHandler(url, method string) context.Handlers
22+
23+
// 初始化插件,接口框架的服务列表
24+
InitPlugin(services service.List)
25+
}
26+
```
27+
428
参考例子:<br>
529

630
- [开发一个源码插件](https://github.com/GoAdminGroup/go-admin/blob/master/plugins/example/example.go)

zh/plan.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ GoAdmin项目需要更多的人才一同加入。
4444

4545
GoAdmin始终秉持开放开源的态度,欢迎有志有能力之士加入一块共谋项目和社区的发展,社区与个人相辅相成。
4646

47-
如果你看好GoAdmin的发展,并且愿意为他赌一把,用时间换取未来可能的财务或名誉度回报,而且你对你自己的能力有足够信心,那么你可以尝试充分阅读GoAdmin的代码,并理解GoAdmin的发展规划,为此做出你的贡献。前期代码缺陷漏洞大,可修改空间多,如果你有能力做出足够的贡献,将成为项目的**联合创始人****核心开发者**。到后期,代码完善度高,也仍然有改进空间,你可以通过提交修复成为**贡献者**。团队将会一直保持开放态度,接纳新成员。团队每一个付出努力的成员也会在将来根据付出比例公平地去收获项目给大家带来的一定的回报。
47+
如果你看好并喜欢GoAdmin的发展,那么你可以尝试充分阅读GoAdmin的代码,并理解GoAdmin的发展规划,为此做出你的贡献。前期代码缺陷漏洞大,可修改空间多,如果你有能力做出足够的贡献,将成为项目的**联合创始人****核心开发者**。到后期,代码完善度高,也仍然有改进空间,你可以通过提交修复成为**贡献者**。团队将会一直保持开放态度,接纳新成员。团队每一个付出努力的成员也会在将来根据付出比例公平地去收获项目给大家带来的一定的回报。
4848

4949
如果你没有足够的时间和精力,但有一定的资金,且同样看好GoAdmin发展,虽然GoAdmin尚未就此加入的方案拟定计划。但只要你有足够大的兴趣,也可以带上你的计划与我们进行洽谈。
5050

zh/plugins/plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 插件的使用
22
---
33

4-
框架的插件包括:控制器,路由以及视图。具体的插件开发在项目开发中会讲,这里演示如何进行使用。
4+
框架的插件内容包括:控制器,路由以及视图。具体的插件开发在项目开发中会讲,这里演示如何进行使用。
55

66
example插件是我们的演示例子。
77

zh/quick_start.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func main() {
7777
}
7878
```
7979

80-
请留意以上代码与注释,对应的步骤都加上了注释,使用十分简单,只需要:
80+
请<b>留意以上代码与注释</b>,对应的步骤都加上了注释,使用十分简单,只需要:
8181

8282
- 引入适配器,主题与数据库驱动
8383
- 设置全局的配置项
@@ -94,7 +94,7 @@ func main() {
9494

9595
- [vendor_v1.1.5.zip](http://file.go-admin.cn/go_admin/vendor/v1_1_5/vendor.zip)
9696

97-
其他框架的例子可以看[https://github.com/GoAdminGroup/go-admin/tree/master/examples](https://github.com/GoAdminGroup/go-admin/tree/master/examples)
97+
其他框架的例子可以参考[https://github.com/GoAdminGroup/go-admin/tree/master/examples](https://github.com/GoAdminGroup/go-admin/tree/master/examples)
9898

9999
## 添加自己的业务表进行管理
100100

@@ -129,7 +129,7 @@ type Database struct {
129129

130130
// 数据库配置
131131
// 为一个map,其中key为数据库连接的名字,value为对应的数据配置
132-
// key为default的数据库是默认数据库,也是框架所用的数据库,而你可以
132+
// 注意:key为default的数据库是默认数据库,也是框架所用的数据库,而你可以
133133
// 配置多个数据库,提供给你的业务表使用,实现对不同数据库的管理。
134134
type DatabaseList map[string]Database
135135

0 commit comments

Comments
 (0)