From 21e814083b5eaf61ece8839fc6a09e91ef9509b2 Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 19 Dec 2019 11:47:01 +0800 Subject: [PATCH] add readme --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++-- base/cli/cli.go | 3 ++- base/ctx/ctx.go | 3 ++- base/gdb/gdb.go | 1 + base/log/log.go | 3 ++- base/mdb/mdb.go | 1 + base/tcp/tcp.go | 1 + core/chat/chat.go | 3 ++- core/code/code.go | 3 ++- core/mall/mall.go | 4 +++- core/shy.go | 11 +++++++++ core/team/team.go | 4 +++- core/wiki/wiki.go | 6 +++-- demo/main.go | 6 +---- 14 files changed, 92 insertions(+), 16 deletions(-) create mode 100644 core/shy.go diff --git a/README.md b/README.md index 9f63b95b..ce3677f2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,57 @@ -# icebergs -后端 冰山架 Back End Frame +# Icebergs.go + +icebergs是一个后端框架,通过模块化、集群化实现资源的无限的扩展与自由的组合。 + +## 1 原型 type.go +### 1.1 msg.Detail +### 1.2 msg.Option +### 1.3 msg.Append +### 1.4 msg.Result +### 1.5 msg.Travel +### 1.6 msg.Search +### 1.7 msg.Conf +### 1.8 msg.Cmd +### 1.9 msg.Cap + +## 2 框架 base.go +### 2.1 注册模块 Register +### 2.2 创建资源 Begin +### 2.3 加载配置 _init +### 2.4 启动服务 Start +### 2.5 保存配置 _exit +### 2.6 释放资源 Close + +## 3 基础模块 base/ +### 3.1 模块中心 base/ctx +### 3.2 命令中心 base/cli +### 3.3 认证中心 base/aaa +### 3.4 网页中心 base/web + +### 3.5 词法中心 base/lex +### 3.6 语法中心 base/yac +### 3.7 事件中心 base/gdb +### 3.8 日志中心 base/log + +### 3.9 网络中心 base/tcp +### 3.10 文件中心 base/nfs +### 3.11 终端中心 base/ssh +### 3.12 数据中心 base/mdb + +## 4 核心模块 core/ +### 4.1 编程中心 core/code +### 4.2 文档中心 core/wiki +### 4.3 聊天中心 core/chat +### 4.4 团队中心 core/team +### 4.5 贸易中心 core/mall + +## 5 配置 conf.go +### 5.1 环境 init +### 5.2 主机 host +### 5.3 启动 boot +### 5.4 节点 node +### 5.5 用户 user +### 5.6 群组 work +### 5.7 认证 auth +### 5.8 数据 data +### 5.9 文件 file + diff --git a/base/cli/cli.go b/base/cli/cli.go index a20bdf50..474f25b5 100644 --- a/base/cli/cli.go +++ b/base/cli/cli.go @@ -1,9 +1,10 @@ package cli import ( - "bytes" "github.com/shylinux/icebergs" "github.com/shylinux/toolkits" + + "bytes" "os" "os/exec" "os/user" diff --git a/base/ctx/ctx.go b/base/ctx/ctx.go index 37a20e66..be325644 100644 --- a/base/ctx/ctx.go +++ b/base/ctx/ctx.go @@ -1,9 +1,10 @@ package ctx import ( - "encoding/json" "github.com/shylinux/icebergs" "github.com/shylinux/toolkits" + + "encoding/json" "os" "sort" ) diff --git a/base/gdb/gdb.go b/base/gdb/gdb.go index e474a68a..d5661dae 100644 --- a/base/gdb/gdb.go +++ b/base/gdb/gdb.go @@ -3,6 +3,7 @@ package gdb import ( "github.com/shylinux/icebergs" "github.com/shylinux/toolkits" + "os" "os/signal" "syscall" diff --git a/base/log/log.go b/base/log/log.go index bb8f1a66..4b2e6e3f 100644 --- a/base/log/log.go +++ b/base/log/log.go @@ -1,9 +1,10 @@ package log import ( - "fmt" "github.com/shylinux/icebergs" "github.com/shylinux/toolkits" + + "fmt" "os" "path" ) diff --git a/base/mdb/mdb.go b/base/mdb/mdb.go index d9bfdb12..1604ad03 100644 --- a/base/mdb/mdb.go +++ b/base/mdb/mdb.go @@ -3,6 +3,7 @@ package mdb import ( "github.com/shylinux/icebergs" "github.com/shylinux/toolkits" + "strings" ) diff --git a/base/tcp/tcp.go b/base/tcp/tcp.go index c0325e57..9e0caf1a 100644 --- a/base/tcp/tcp.go +++ b/base/tcp/tcp.go @@ -2,6 +2,7 @@ package tcp import ( "github.com/shylinux/icebergs" + "net" "strings" ) diff --git a/core/chat/chat.go b/core/chat/chat.go index f8ab1f5f..f1df57bb 100644 --- a/core/chat/chat.go +++ b/core/chat/chat.go @@ -1,10 +1,11 @@ package chat import ( + "github.com/shylinux/toolkits" + "github.com/shylinux/icebergs" _ "github.com/shylinux/icebergs/base" "github.com/shylinux/icebergs/base/web" - "github.com/shylinux/toolkits" ) var Index = &ice.Context{Name: "chat", Help: "聊天模块", diff --git a/core/code/code.go b/core/code/code.go index 2cfddefa..c67c1275 100644 --- a/core/code/code.go +++ b/core/code/code.go @@ -1,10 +1,11 @@ package code import ( + "github.com/shylinux/toolkits" + "github.com/shylinux/icebergs" _ "github.com/shylinux/icebergs/base" "github.com/shylinux/icebergs/base/web" - "github.com/shylinux/toolkits" "os" "os/exec" diff --git a/core/mall/mall.go b/core/mall/mall.go index 1ae87279..9b89f2cb 100644 --- a/core/mall/mall.go +++ b/core/mall/mall.go @@ -1,10 +1,12 @@ package team import ( + "github.com/shylinux/toolkits" + "github.com/shylinux/icebergs" _ "github.com/shylinux/icebergs/base" "github.com/shylinux/icebergs/base/web" - "github.com/shylinux/toolkits" + "os" "path" "strings" diff --git a/core/shy.go b/core/shy.go new file mode 100644 index 00000000..ca832118 --- /dev/null +++ b/core/shy.go @@ -0,0 +1,11 @@ +package shy + +import ( + _ "github.com/shylinux/icebergs/base" + + _ "github.com/shylinux/icebergs/core/chat" + _ "github.com/shylinux/icebergs/core/code" + _ "github.com/shylinux/icebergs/core/mall" + _ "github.com/shylinux/icebergs/core/team" + _ "github.com/shylinux/icebergs/core/wiki" +) diff --git a/core/team/team.go b/core/team/team.go index 70391b52..640f8bdd 100644 --- a/core/team/team.go +++ b/core/team/team.go @@ -1,10 +1,12 @@ package mall import ( + "github.com/shylinux/toolkits" + "github.com/shylinux/icebergs" _ "github.com/shylinux/icebergs/base" "github.com/shylinux/icebergs/base/web" - "github.com/shylinux/toolkits" + "os" "path" "strings" diff --git a/core/wiki/wiki.go b/core/wiki/wiki.go index 8dabe054..4d100f97 100644 --- a/core/wiki/wiki.go +++ b/core/wiki/wiki.go @@ -1,12 +1,14 @@ package wiki import ( - "bytes" "github.com/gomarkdown/markdown" + "github.com/shylinux/toolkits" + "github.com/shylinux/icebergs" _ "github.com/shylinux/icebergs/base" "github.com/shylinux/icebergs/base/web" - "github.com/shylinux/toolkits" + + "bytes" "path" "strings" ) diff --git a/demo/main.go b/demo/main.go index 8ba486d3..67884809 100644 --- a/demo/main.go +++ b/demo/main.go @@ -2,11 +2,7 @@ package main import ( "github.com/shylinux/icebergs" - _ "github.com/shylinux/icebergs/core/chat" - _ "github.com/shylinux/icebergs/core/code" - _ "github.com/shylinux/icebergs/core/mall" - _ "github.com/shylinux/icebergs/core/team" - _ "github.com/shylinux/icebergs/core/wiki" + _ "github.com/shylinux/icebergs/core" ) func main() {