Documentation
¶
Index ¶
- type Config
- type Document
- type Page
- func (s Page) AddTemplateFunc(name string, i interface{})
- func (s Page) DelTemplateCache(tmplKey string)
- func (s Page) DelTemplateFunc(name string)
- func (p *Page) GetController(urlPath string) interface{}
- func (s Page) GetTemplateCache(tmplKey string) templateCache
- func (p *Page) Init(w http.ResponseWriter, r *http.Request)
- func (p *Page) ListenAndServe(addr string, i interface{})
- func (p *Page) Load(configPath string)
- func (p *Page) LoadData(data string)
- func (p *Page) RegisterController(relUrlPath string, i interface{}) *Page
- func (p *Page) SetDefaultController(i interface{}) *Page
- func (p *Page) SetNotFoundController(i interface{}) *Page
- func (s Page) SetTemplateCache(tmplKey, tmplPath string)
- func (s Page) SetTemplateCacheObject(tmplKey, content string, modTime int64)
- func (p *Page) UpdateController(oldUrlPath, relUrlPath string, i interface{}) *Page
- type PageParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
SupportLog bool `json:"SupportLog"`
LogWriteTo string `json:"LogWriteTo"`
LogLevel string `json:"LogLevel"`
SupportTemplate bool `json:"SupportTemplate"`
SupportSession bool `json:"SupportSession"`
SupportCookieSession bool `json:"SupportCookieSession"`
SupportI18n bool `json:"SupportI18n"`
SupportStatic bool `json:"SupportStatic"`
SupportUrlManage bool `json:"SupportUrlManage"`
SupportUrlManageWithCache bool `json:"SupportUrlManageWithCache"`
SessionType string `json:"SessionType"`
RootStaticFiles string `json:"RootStaticFiles"`
DefaultLocalePath string `json:"DefaultLocalePath"`
DefaultLanguage string `json:"DefaultLanguage"`
AutoGenerateHtml bool `json:"AutoGenerateHtml"`
AutoGenerateHtmlCycleTime int64 `json:"AutoGenerateHtmlCycleTime"`
AutoLoadStaticHtml bool `json:"AutoLoadStaticHtml"`
LoadStaticHtmlWithLogic bool `json:"LoadStaticHtmlWithLogic"`
ChangeSiteRoot bool `json:"ChangeSiteRoot"`
AccessHtml bool `json:"AccessHtml"`
AutoJumpToHtml bool `json:"AutoJumpToHtml"`
AssetsDirectory string `json:"AssetsDirectory"`
StaticDirectory string `json:"StaticDirectory"`
ThemeDirectory string `json:"ThemeDirectory"`
Theme string `json:"Theme"`
StaticCssDirectory string `json:"StaticCssDirectory"`
StaticJsDirectory string `json:"StaticJsDirectory"`
StaticImgDirectory string `json:"StaticImgDirectory"`
HtmlDirectory string `json:"HtmlDirectory"`
TemplateDirectory string `json:"TemplateDirectory"`
TemplateGlobalDirectory string `json:"TemplateGlobalDirectory"`
TemplateGlobalFile string `json:"TemplateGlobalFile"`
TemporaryDirectory string `json:"TemporaryDirectory"`
UploadDirectory string `json:"UploadDirectory"`
IndexDirectory string `json:"IndexDirectory"`
IndexPage string `json:"IndexPage"`
SiteRoot string `json:"SiteRoot"`
Environment map[string]string `json:"Environment"`
Database map[string]string `json:"Database"`
UrlManageRule []string `json:"UrlManageRule"`
M map[string]interface{} `json:"Custom"`
// contains filtered or unexported fields
}
type Document ¶
type Document struct {
Close bool
GenerateHtml bool
Static string
Theme string
Attr map[string]string
Css map[string]string
Js map[string]string
Img map[string]string
GlobalCssFile string
GlobalJsFile string
GlobalIndexCssFile string
GlobalIndexJsFile string
IndexCssFile string
IndexJsFile string
Hide bool
Func template.FuncMap
Title string
Body interface{}
}
type Page ¶
type Page struct {
Config
Document
Controller map[string]interface{}
DefaultController interface{}
NotFoundtController interface{}
CurrentController string
CurrentAction string
Template string
MAX_FORM_SIZE int64
GET map[string]string
POST map[string]string
COOKIE map[string]string
SESSION map[string]interface{}
ONCE_SESSION interface{}
COOKIE_SESSION map[string]interface{}
LANG map[string]string
TARGET_LANG string
MemorySession *memorysession.SessionManager
FileSession *filesession.SessionManager
CookieSession *cookiesession.SessionManager
I18n *i18n.I18nManager
Validation validate.Validation
UrlManage *urlmanage.UrlManage
// contains filtered or unexported fields
}
func (Page) AddTemplateFunc ¶
func (s Page) AddTemplateFunc(name string, i interface{})
func (Page) DelTemplateCache ¶
func (s Page) DelTemplateCache(tmplKey string)
func (Page) DelTemplateFunc ¶
func (s Page) DelTemplateFunc(name string)
func (*Page) GetController ¶
func (Page) GetTemplateCache ¶
func (s Page) GetTemplateCache(tmplKey string) templateCache
func (*Page) ListenAndServe ¶
func (*Page) RegisterController ¶
func (*Page) SetDefaultController ¶
func (*Page) SetNotFoundController ¶
func (Page) SetTemplateCache ¶
func (s Page) SetTemplateCache(tmplKey, tmplPath string)
func (Page) SetTemplateCacheObject ¶
func (*Page) UpdateController ¶
Click to show internal directories.
Click to hide internal directories.