Documentation
¶
Index ¶
- type API
- type CaptchaConfig
- type Page
- type Static
- type Web
- func (web *Web) AddAPI(api *API) *Web
- func (web *Web) AddAPIs(apis []*API) *Web
- func (web *Web) AddPage(page *Page) *Web
- func (web *Web) AddPages(pages []*Page) *Web
- func (web *Web) AddStatic(static *Static) *Web
- func (web *Web) AddStatics(statics []*Static) *Web
- func (web *Web) Debug(debug bool) *Web
- func (web *Web) GetSessionStore(sessionName string) *session.CookieStore
- func (web *Web) Handler() http.Handler
- func (web *Web) NewAPIFunc(api *API) http.HandlerFunc
- func (web *Web) NewCaptchaFunc(page *Page) http.HandlerFunc
- func (web *Web) NewLoginFunc(page *Page) http.HandlerFunc
- func (web *Web) NewLogoutFunc(page *Page) http.HandlerFunc
- func (web *Web) NewPageFunc(page *Page) http.HandlerFunc
- func (web *Web) NewRestartFunc(page *Page) http.HandlerFunc
- func (web *Web) PageInject(name string, value interface{}) *Web
- func (web *Web) PageInjectIncludeData(name, includeData string) *Web
- func (web *Web) PageInjectIncludeDataMap(dataMap map[string]string) *Web
- func (web *Web) PageInjectMap(dataMap map[string]interface{}) *Web
- func (web *Web) PageInjectSession(name, sessionName string) *Web
- func (web *Web) PageInjectSessionMap(sessionMap map[string]string) *Web
- func (web *Web) Reload(webRoot, host string, config *WebConfig)
- func (web *Web) RouteHandler(router *mux.Router) http.Handler
- func (web *Web) SetSessionDomain(sessionDomain string)
- type WebConfig
- func (wc *WebConfig) GetAPIs() []*API
- func (wc *WebConfig) GetBaseUrl() string
- func (wc *WebConfig) GetDebug() bool
- func (wc *WebConfig) GetPageInjectData() map[string]interface{}
- func (wc *WebConfig) GetPageInjectIncludeData() map[string]string
- func (wc *WebConfig) GetPageInjectSessions() map[string]string
- func (wc *WebConfig) GetPages() []*Page
- func (wc *WebConfig) GetStatics() []*Static
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptchaConfig ¶
type CaptchaConfig struct {
// contains filtered or unexported fields
}
type Web ¶
type Web struct { ServerName string RestartFunc func() // contains filtered or unexported fields }
func (*Web) AddStatics ¶
AddStatics add new static paths to web.
func (*Web) GetSessionStore ¶
func (web *Web) GetSessionStore(sessionName string) *session.CookieStore
func (*Web) NewAPIFunc ¶
func (web *Web) NewAPIFunc(api *API) http.HandlerFunc
func (*Web) NewCaptchaFunc ¶
func (web *Web) NewCaptchaFunc(page *Page) http.HandlerFunc
func (*Web) NewLoginFunc ¶
func (web *Web) NewLoginFunc(page *Page) http.HandlerFunc
func (*Web) NewLogoutFunc ¶
func (web *Web) NewLogoutFunc(page *Page) http.HandlerFunc
func (*Web) NewPageFunc ¶
func (web *Web) NewPageFunc(page *Page) http.HandlerFunc
func (*Web) NewRestartFunc ¶
func (web *Web) NewRestartFunc(page *Page) http.HandlerFunc
func (*Web) PageInject ¶
PageInject will inject data to all page.
func (*Web) PageInjectIncludeData ¶
PageInjectIncludeData will inject include data to all page.
func (*Web) PageInjectIncludeDataMap ¶
PageInjectIncludeDataMap will inject include data map to all page.
func (*Web) PageInjectMap ¶
PageInjectMap will inject data map to all page.
func (*Web) PageInjectSession ¶
PageInjectSession will inject session data to all page.
func (*Web) PageInjectSessionMap ¶
PageInjectSessionMap will inject session map to all page.
func (*Web) SetSessionDomain ¶
type WebConfig ¶
func (*WebConfig) GetBaseUrl ¶
func (*WebConfig) GetPageInjectData ¶
func (*WebConfig) GetPageInjectIncludeData ¶
func (*WebConfig) GetPageInjectSessions ¶
func (*WebConfig) GetStatics ¶
Click to show internal directories.
Click to hide internal directories.