Documentation ¶
Index ¶
- type XTemplateModule
- func (XTemplateModule) CaddyModule() caddy.ModuleInfo
- func (m *XTemplateModule) Cleanup() error
- func (m *XTemplateModule) Provision(ctx caddy.Context) error
- func (m *XTemplateModule) ServeHTTP(w http.ResponseWriter, r *http.Request, _ caddyhttp.Handler) error
- func (m *XTemplateModule) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type XTemplateModule ¶
type XTemplateModule struct { // The root path from which to load template files within the selected // filesystem (the native filesystem by default). Default is the current // working directory. TemplateRoot string `json:"template_root,omitempty"` // The root path to reference files from within template funcs. The default, // empty string means the local filesystem funcs in templates are disabled. ContextRoot string `json:"context_root,omitempty"` // The template action delimiters. If set, must be precisely two elements: // the opening and closing delimiters. Default: `["{{", "}}"]` Delimiters []string `json:"delimiters,omitempty"` // The database driver and connection string. If set, must be precicely two // elements: the driver name and the connection string. Database struct { Driver string `json:"driver,omitempty"` Connstr string `json:"connstr,omitempty"` } `json:"database,omitempty"` Config map[string]string `json:"config,omitempty"` FuncsModules []string `json:"funcs_modules,omitempty"` // contains filtered or unexported fields }
func (XTemplateModule) CaddyModule ¶
func (XTemplateModule) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*XTemplateModule) Cleanup ¶
func (m *XTemplateModule) Cleanup() error
Cleanup discards resources held by t. Implements caddy.CleanerUpper.
func (*XTemplateModule) Provision ¶
func (m *XTemplateModule) Provision(ctx caddy.Context) error
Provision provisions t. Implements caddy.Provisioner.
func (*XTemplateModule) ServeHTTP ¶
func (m *XTemplateModule) ServeHTTP(w http.ResponseWriter, r *http.Request, _ caddyhttp.Handler) error
func (*XTemplateModule) Validate ¶
func (m *XTemplateModule) Validate() error
Validate ensures t has a valid configuration. Implements caddy.Validator.
Click to show internal directories.
Click to hide internal directories.