-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Init project structure. #16
Conversation
Project structure. .
├── LICENSE
├── README.md
├── cmd
│ └── gopcomm
│ ├── community_yap.gox
│ ├── config.yaml
│ ├── gop_autogen.go
│ └── yap
│ ├── article_yap.html
│ ├── edit_yap.html
│ ├── home_yap.html
│ ├── static
│ └── user_yap.html
├── docs
│ ├── account-design.md
│ ├── distribute-design.md
│ ├── markdown-design.md
│ ├── mysql-framework.md
│ ├── share-design.md
│ └── web-framework.md
├── go.mod
├── go.sum
└── internal
├── config
│ └── config.gop
└── core
├── article.gop
├── community.gop
├── gop_autogen.go
└── models.gop |
DesignDOM-like Core Handlers DesignTop core handler
type communityHandler interface {
GetArticleHandler() articleHandler
}
Article handler
All sub handlers(like type articleHandler interface {
GetArticle(id string) (Article, error)
} Config Design
In View Design
Core web-framework is powered by In each router, we will get the top handler from config := &core.Config{
core.ArticleConfig{},
}
community := core.New(config)
get "/article/:id", ctx => {
param := ctx.param("id")
println "Visiting article " + param
h := community.GetArticleHandler()
info, _ := h.GetArticle(param)
ctx.yap "article", {
"id": info.Id,
"title": info.Title,
"content": info.Content,
}
} |
bugfix: fix the bug in cloning specific branch
bugfix: fix the bug in cloning specific branch
docs: Update markdown module.
Init basic goplus community project structure. Still in progress :)