Documentation ¶
Index ¶
- type Module
- func (m *Module) CheckThemeForUpdate(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) Debug(rw http.ResponseWriter, req *http.Request, par router2.Params) error
- func (m *Module) DeleteData(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) DeleteFile(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) DeletePage(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) DeleteRoute(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) EnableTLS(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetBackup(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetData(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetFile(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetInfo(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetPage(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetRenderedPage(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetTLS(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetTemplate(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetTheme(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) GetUser(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) Init(c *service.Config)
- func (m *Module) InstallTheme(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) ListData(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) ListFiles(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) ListPages(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) ListRoutes(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) ListRoutesByPage(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) ListThemes(rw http.ResponseWriter, req *http.Request, _ router.Params) error
- func (m *Module) Logout(rw http.ResponseWriter, req *http.Request, _ router.Params) error
- func (m *Module) PublishPage(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) ThemeRegistry(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) UnpublishPage(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) UpdateData(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) UpdatePage(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) UpdateRoute(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) UpdateRoutesByPage(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) UpdateTheme(rw http.ResponseWriter, req *http.Request, par router.Params) error
- func (m *Module) UploadFile(rw http.ResponseWriter, req *http.Request, par router.Params) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct { Router *router.Module DB *db.Module Auth *users.Module Templates *templates.Module Content *content.Module Config *config.Module TLS *tls.Module Logger *logger.Module Files *files.Module // contains filtered or unexported fields }
func (*Module) CheckThemeForUpdate ¶ added in v0.2.0
func (*Module) DeleteData ¶ added in v0.2.0
func (*Module) DeleteFile ¶ added in v0.3.0
func (*Module) DeletePage ¶
DeletePage deletes the given page.
func (*Module) DeleteRoute ¶
DeleteRoute deletes the given route.
func (*Module) GetRenderedPage ¶
func (*Module) GetTemplate ¶
func (*Module) InstallTheme ¶
InstallTheme installs a theme from a registry
func (*Module) ListPages ¶
ListPages returns all pages, sorted by updated at. todo: pagination, filtering todo: error handling?
func (*Module) ListRoutes ¶
ListRoutes returns all routes.
func (*Module) ListRoutesByPage ¶
func (m *Module) ListRoutesByPage(rw http.ResponseWriter, req *http.Request, par router.Params) error
ListRoutesByPage returns all routes for a given page, identified by uuid in the parameter.
func (*Module) ListThemes ¶
func (*Module) PublishPage ¶
PublishPage sets the published time on a page to the current time.
func (*Module) ThemeRegistry ¶
func (*Module) UnpublishPage ¶
UnpublishPage sets published at to null, effectively unpublishing the page.
func (*Module) UpdateData ¶ added in v0.2.0
func (*Module) UpdatePage ¶
UpdatePage saves the given page to the DB. todo: nest response?
func (*Module) UpdateRoute ¶
UpdateRoute updates the given route. The path is sanitized, and the content router is reloaded after the route is saved.
func (*Module) UpdateRoutesByPage ¶
func (m *Module) UpdateRoutesByPage(rw http.ResponseWriter, req *http.Request, par router.Params) error
UpdateRoutesByPage takes a list of routes and sets it for the given page, deleting any existing routes that aren't in the new list.