Documentation
¶
Index ¶
- type Handler
- func (p Handler) AfterRequest(w http.ResponseWriter, r *http.Request)
- func (p Handler) BeforeRequest(w http.ResponseWriter, r *http.Request)
- func (p Handler) PageData(r *http.Request, pd structs.PageData) structs.PageData
- func (p Handler) PageHandler(w http.ResponseWriter, r *http.Request) (handled bool)
- type Plugin
- type PluginSite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler holds all the needed information for plugins to function in Beubo
func (Handler) AfterRequest ¶
func (p Handler) AfterRequest(w http.ResponseWriter, r *http.Request)
AfterRequest is called by Beubo at the last possible place in the request stack before returning the response writer
func (Handler) BeforeRequest ¶
func (p Handler) BeforeRequest(w http.ResponseWriter, r *http.Request)
BeforeRequest is called by Beubo as early as possible in the request stack after other middlewares have executed
func (Handler) PageData ¶
PageData allows the modification of page data before it is passed to the execute function of the template handler
func (Handler) PageHandler ¶
PageHandler is called when a non-default route is called in Beubo, returning true will prevent any other handler from executing
type PluginSite ¶
type PluginSite struct { gorm.Model Site structs.Site SiteID uint PluginIdentifier string Active bool }
PluginSite defines which site a plugin is activated for
func FetchPluginSites ¶
func FetchPluginSites(db *gorm.DB, plugin string) (ps []PluginSite)
FetchPluginSites gets a PluginSite definition based on the specified plugin identifier