Documentation ¶
Index ¶
- func FromID(siteid string) *domain.Site
- func IntelliDuration(seconds int64) string
- func IntelliTime(t time.Time) string
- func OnlineStateChan() *(chan *Context)
- func RemoveSiteCache(host string)
- func RenderAt(text string) string
- func RenderFace(text string) string
- func RenderPageWithContext(text template.HTML, site *Context) template.HTML
- func RenderUBB(text string) string
- func ThreadContent(text string) string
- type BaseRender
- type Context
- type Engine
- func (r *Engine) DELETE(relativePath string, handler RequestHandler)
- func (r *Engine) GET(relativePath string, handler RequestHandler)
- func (r *Engine) GETPage(relativePath string, handler PageRequestHandler)
- func (r *Engine) GenericGET(relativePath string, handler GetRequestHandler)
- func (r *Engine) PATCH(relativePath string, handler RequestHandler)
- func (r *Engine) POST(relativePath string, handler RequestHandler)
- func (r *Engine) PUT(relativePath string, handler RequestHandler)
- func (r *Engine) Run(addr ...string) (err error)
- type GetRequestHandler
- type PageRequestHandler
- type RequestHandler
- type ThreadsRender
- type UBBRender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderPageWithContext ¶
RenderPageWithContext 在上下文渲染页面
Types ¶
type BaseRender ¶
BaseRender 基础UBB渲染器
type Context ¶
type Context struct { Host string RequestURI string UserAgent string ClientIP string Site *domain.Site MainSite *domain.Site Session *domain.Session }
Context 站点上下文
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine 站点引擎
func (*Engine) DELETE ¶
func (r *Engine) DELETE(relativePath string, handler RequestHandler)
DELETE DELETE
func (*Engine) GETPage ¶
func (r *Engine) GETPage(relativePath string, handler PageRequestHandler)
GETPage GETPage
func (*Engine) GenericGET ¶
func (r *Engine) GenericGET(relativePath string, handler GetRequestHandler)
GenericGET GenericGET
func (*Engine) PATCH ¶
func (r *Engine) PATCH(relativePath string, handler RequestHandler)
PATCH PATCH
type GetRequestHandler ¶
GetRequestHandler 站点请求处理器
type PageRequestHandler ¶
PageRequestHandler 站点请求处理器
type RequestHandler ¶
RequestHandler 站点请求处理器
Click to show internal directories.
Click to hide internal directories.