Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetaString = 0 // a simple string to integrate into the code MetaURLParams = 1 // the full URL parameters list passed to the code runner [page]/value1/value2... MetaURLParam = 2 // one param of the URL parameters list, index-1 based [page]/value1/value2... MetaURLVariable = 3 // an URL variable coming through a query ?variable=value MetaParam = 4 // Parameter passed to the page Run by code MetaSysParam = 5 // System (site) parameter MetaPageParam = 6 // Main page called parameters (into .page file) MetaLocalPageParam = 7 // this page parameters (into .page file), same as Main page parameters if it's the external called page MetaInstanceParam = 8 // Main page instance called parameters (into .instance file) MetaLocalInstanceParam = 9 // this page instance parameters (into .instance file), same as Main page instance parameters if it's the external called page MetaSessionParam = 10 // Parameter into the session params MetaJS = 11 // Call a JS file to include into page headers MetaCSS = 12 // Call a CSS file to include into page headers MetaCall = 13 // Call a sub block to insert here MetaLanguage = 14 // Insert a language entry MetaComment = 15 // Comment, ignore it MetaBox = 16 // Nested box with inner data MetaTemporaryBoxStart = 101 // Temporal nested box start tag MetaTemporaryBoxEnd = 102 // Temporal nested box end tag MetaUnused = -1 // a "not used anymore" param to be freed )
Variables ¶
View Source
var CodeCache = xcore.NewXCache("code", 0, 0)
View Source
var Engine = &SimpleEngine{}
Functions ¶
This section is empty.
Types ¶
type SimpleEngine ¶
type SimpleEngine struct{}
func (*SimpleEngine) GetInstance ¶
func (re *SimpleEngine) GetInstance(Hostname string, PagesDir string, P string, i identity.Identity) assets.EngineInstance
func (*SimpleEngine) NeedInstance ¶
func (re *SimpleEngine) NeedInstance() bool
func (*SimpleEngine) Run ¶
func (se *SimpleEngine) Run(ctx *context.Context, s interface{}) interface{}
type SimpleEngineInstance ¶
type SimpleEngineInstance struct {
FilePath string
}
func (*SimpleEngineInstance) NeedLanguage ¶
func (p *SimpleEngineInstance) NeedLanguage() bool
func (*SimpleEngineInstance) NeedTemplate ¶
func (p *SimpleEngineInstance) NeedTemplate() bool
func (*SimpleEngineInstance) Run ¶
func (p *SimpleEngineInstance) Run(ctx *context.Context, template *xcore.XTemplate, language *xcore.XLanguage, e interface{}) interface{}
context contains all the page context and history params are an array of strings (if page from outside) or a mapped array of data (inner pages)
Click to show internal directories.
Click to hide internal directories.