frontend

package
v0.2.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2023 License: AGPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

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 Customer

func FrontendURLFunc

func FrontendURLFunc(c echo.Context) error

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

func URLFor

func URLFor(purl string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL