Documentation ¶
Index ¶
- Constants
- Variables
- func Customer(c echo.Context) *dbschema.OfficialCustomer
- func FrontendURLFunc(c echo.Context) error
- func FrontendURLFuncMW() echo.MiddlewareFunc
- func InitWebServer()
- func MakeRouteRewriter() (cfg middleware.RewriteConfig, err error)
- func ResetRouteRewrite() error
- func URLFor(purl string) string
Constants ¶
View Source
const ( Name = `frontend` DefaultTemplateDir = `./template/` + Name DefaultAssetsDir = `./public/assets` DefaultAssetsURLPath = `/public/assets/frontend` RouteDefaultExtension = `.html` )
Variables ¶
View Source
var ( Prefix string StaticMW interface{} TemplateDir = DefaultTemplateDir //模板文件夹 AssetsDir = DefaultAssetsDir //素材文件夹 AssetsURLPath = DefaultAssetsURLPath StaticRootURLPath = `/public/` RendererDo = func(driver.Driver) {} DefaultMiddlewares = []interface{}{middleware.Log()} )
View Source
var ( IRegister = route.IRegister WithMeta = route.MetaHandler WithMetaAndRequest = route.MetaHandlerWithRequest WithRequest = route.HandlerWithRequest Pre = route.Pre Use = route.Use UseToGroup = route.UseToGroup Register = route.Register RegisterToGroup = route.RegisterToGroup Host = route.Host Apply = route.Apply )
View Source
var MinCustomerID = 1000
View Source
var TmplPathFixers = xtemplate.New(`frontend`)
TmplPathFixers 模版路径 {subdir:func}
Functions ¶
func FrontendURLFunc ¶
func FrontendURLFuncMW ¶
func FrontendURLFuncMW() echo.MiddlewareFunc
func InitWebServer ¶
func InitWebServer()
func MakeRouteRewriter ¶ added in v0.2.0
func MakeRouteRewriter() (cfg middleware.RewriteConfig, err error)
func ResetRouteRewrite ¶ added in v0.2.0
func ResetRouteRewrite() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.