-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 for v0.10 Release
- Loading branch information
Showing
44 changed files
with
1,044 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
# Folders | ||
_obj | ||
_test | ||
vendor/*/ | ||
|
||
# test | ||
coverage.out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
// aah application initialization - configuration, server extensions, middleware's, etc. | ||
// Customize it per your application needs. | ||
|
||
package main | ||
|
||
import ( | ||
"aahframework.org/aah.v0"{{ if eq .AppType "web" }} | ||
|
||
// Registering HTML minifier for web application | ||
_ "github.com/aah-cb/minify"{{ end }}{{ if eq .AppViewEngine "pug" }} | ||
|
||
// Registering Pug View Engine (formerly known as Jade) | ||
_ "github.com/aah-cb/ve-pug"{{ end }} | ||
) | ||
|
||
func init() { | ||
|
||
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | ||
// Server Extensions | ||
// Doc: https://docs.aahframework.org/server-extension.html | ||
// | ||
// Best Practice: Define a function with meaningful name in a package and | ||
// register it here. Extensions function name gets logged in the log, | ||
// its very helpful to have meaningful log information. | ||
// | ||
// Such as: | ||
// - Dedicated package for config loading | ||
// - Dedicated package for datasource connections | ||
// - etc | ||
//__________________________________________________________________________ | ||
|
||
// Event: OnInit | ||
// Published right after the `aah.AppConfig()` is loaded. | ||
// | ||
// aah.OnInit(config.LoadRemote) | ||
|
||
// Event: OnStart | ||
// Published right before the start of aah go Server. | ||
// | ||
// aah.OnStart(db.Connect) | ||
// aah.OnStart(cache.Load) | ||
|
||
// Event: OnShutdown | ||
// Published on receiving OS Signals `SIGINT` or `SIGTERM`. | ||
// | ||
// aah.OnShutdown(cache.Flush) | ||
// aah.OnShutdown(db.Disconnect) | ||
|
||
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | ||
// Middleware's | ||
// Doc: https://docs.aahframework.org/middleware.html | ||
// | ||
// Executed in the order they are defined. It is recommended; NOT to change | ||
// the order of pre-defined aah framework middleware's. | ||
//__________________________________________________________________________ | ||
aah.Middlewares( | ||
aah.RouteMiddleware, | ||
aah.CORSMiddleware, | ||
aah.BindMiddleware,{{ if eq .AppType "web" }} | ||
aah.AntiCSRFMiddleware,{{ end }} | ||
aah.AuthcAuthzMiddleware, | ||
|
||
// | ||
// NOTE: Register your Custom middleware's right here | ||
// | ||
|
||
aah.ActionMiddleware, | ||
) | ||
|
||
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | ||
// Add Application Error Handler | ||
// Doc: https://docs.aahframework.org/error-handling.html | ||
//__________________________________________________________________________ | ||
// aah.SetErrorHandler(AppErrorHandler) | ||
|
||
{{- if eq .AppType "web" }} | ||
|
||
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | ||
// Add Custom Template Functions | ||
// Doc: https://docs.aahframework.org/template-funcs.html | ||
//__________________________________________________________________________ | ||
// aah.AddTemplateFunc(template.FuncMap{ | ||
// // ... | ||
// }) | ||
|
||
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | ||
// Add Custom Session Store | ||
// Doc: https://docs.aahframework.org/session.html | ||
//__________________________________________________________________________ | ||
// aah.AddSessionStore("redis", &RedisSessionStore{}){{ end }} | ||
|
||
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | ||
// Add Custom value Parser | ||
// Doc: https://docs.aahframework.org/request-parameters-auto-bind.html | ||
//__________________________________________________________________________ | ||
// if err := aah.AddValueParser(reflect.TypeOf(CustomType{}), customParser); err != nil { | ||
// log.Error(err) | ||
// } | ||
|
||
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | ||
// Add Custom Validation Functions | ||
// Doc: https://godoc.org/gopkg.in/go-playground/validator.v9 | ||
//__________________________________________________________________________ | ||
// Obtain aah validator instance, then add yours | ||
// validator := valpar.Validator() | ||
// | ||
// // Add your validation funcs | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1.66 KB
(130%)
aah/app-template/static/img/aah-framework-logo.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<link rel="icon" type="image/x-icon" href="/favicon.ico" /> | ||
<link href="/static/css/aah.css" rel="stylesheet" /> |
Oops, something went wrong.