Documentation
¶
Index ¶
- Constants
- func AdminBreadcrumbs(r *http.Request, pageBreadcrumbs []Breadcrumb, options struct{ ... }) hb.TagInterface
- func AdminHeader(store cmsstore.StoreInterface, logger *slog.Logger, r *http.Request) hb.TagInterface
- func AdminHomeURL(r *http.Request) string
- func Breadcrumbs(breadcrumbs []Breadcrumb) hb.TagInterface
- func CachedSiteByID(ctx context.Context, store cmsstore.StoreInterface, siteID string) (cmsstore.SiteInterface, error)
- func CachedSiteList(ctx context.Context, store cmsstore.StoreInterface) ([]cmsstore.SiteInterface, error)
- func CachedSiteURL(r *http.Request, store cmsstore.StoreInterface, siteID string) (string, error)
- func CachedSitesActive(ctx context.Context, store cmsstore.StoreInterface) ([]cmsstore.SiteInterface, error)
- func Endpoint(r *http.Request) string
- func FilterDescriptionSite(ctx context.Context, store cmsstore.StoreInterface, siteID string) hb.TagInterface
- func PageURL(r *http.Request, store cmsstore.StoreInterface, storeID string, ...) (string, error)
- func URL(endpoint string, path string, params map[string]string) string
- func URLR(r *http.Request, path string, params map[string]string) string
- type Admin
- type Breadcrumb
- type UiConfig
- type UiInterface
Constants ¶
View Source
const ERROR_LOGGER_IS_NIL = "logger cannot be nil"
View Source
const ERROR_STORE_IS_NIL = "store cannot be nil"
View Source
const KeyAdminHomeURL = "admin_home_uRL"
View Source
const KeyEndpoint = "endpoint"
View Source
const PathBlocksBlockCreate = "/blocks/block-create"
View Source
const PathBlocksBlockDelete = "/blocks/block-delete"
View Source
const PathBlocksBlockManager = "/blocks/block-manager"
View Source
const PathBlocksBlockUpdate = "/blocks/block-update"
View Source
const PathHome = "/"
View Source
const PathMenusMenuCreate = "/menus/menu-create"
View Source
const PathMenusMenuDelete = "/menus/menu-delete"
View Source
const PathMenusMenuManager = "/menus/menu-manager"
View Source
const PathMenusMenuUpdate = "/menus/menu-update"
View Source
const PathPagesPageCreate = "/pages/page-create"
View Source
const PathPagesPageDelete = "/pages/page-delete"
View Source
const PathPagesPageManager = "/pages/page-manager"
View Source
const PathPagesPageUpdate = "/pages/page-update"
View Source
const PathPagesPageVersioning = "/pages/page-versioning"
View Source
const PathSitesSiteCreate = "/sites/site-create"
View Source
const PathSitesSiteDelete = "/sites/site-delete"
View Source
const PathSitesSiteManager = "/sites/site-manager"
View Source
const PathSitesSiteUpdate = "/sites/site-update"
View Source
const PathTemplatesTemplateCreate = "/templates/template-create"
View Source
const PathTemplatesTemplateDelete = "/templates/template-delete"
View Source
const PathTemplatesTemplateManager = "/templates/template-manager"
View Source
const PathTemplatesTemplateUpdate = "/templates/template-update"
View Source
const PathTranslationsTranslationCreate = "/translations/translation-create"
View Source
const PathTranslationsTranslationDelete = "/translations/translation-delete"
View Source
const PathTranslationsTranslationManager = "/translations/translation-manager"
View Source
const PathTranslationsTranslationUpdate = "/translations/translation-update"
Variables ¶
This section is empty.
Functions ¶
func AdminBreadcrumbs ¶ added in v0.9.0
func AdminBreadcrumbs(r *http.Request, pageBreadcrumbs []Breadcrumb, options struct { SiteList []cmsstore.SiteInterface }) hb.TagInterface
func AdminHeader ¶ added in v0.9.0
func AdminHeader(store cmsstore.StoreInterface, logger *slog.Logger, r *http.Request) hb.TagInterface
func AdminHomeURL ¶ added in v0.10.0
func Breadcrumbs ¶
func Breadcrumbs(breadcrumbs []Breadcrumb) hb.TagInterface
func CachedSiteByID ¶ added in v0.13.0
func CachedSiteByID(ctx context.Context, store cmsstore.StoreInterface, siteID string) (cmsstore.SiteInterface, error)
CachedSiteFindByID returns a site by ID, caching the result for 2 minutes
func CachedSiteList ¶ added in v0.13.0
func CachedSiteList(ctx context.Context, store cmsstore.StoreInterface) ([]cmsstore.SiteInterface, error)
CachedSiteList returns a list of all sites, caching the result for 2 minutes
func CachedSiteURL ¶ added in v0.13.0
CachedSiteURL returns a site URL, caching the result for 2 minutes
func CachedSitesActive ¶ added in v0.13.0
func CachedSitesActive(ctx context.Context, store cmsstore.StoreInterface) ([]cmsstore.SiteInterface, error)
CachedSitesActive returns a list of active sites, caching the result for 2 minutes
func FilterDescriptionSite ¶ added in v0.13.0
func FilterDescriptionSite(ctx context.Context, store cmsstore.StoreInterface, siteID string) hb.TagInterface
Types ¶
type Admin ¶ added in v0.10.0
type Admin interface {
Handle(w http.ResponseWriter, r *http.Request)
}
type Breadcrumb ¶
type UiConfig ¶ added in v0.9.0
type UiConfig struct { BlockEditorDefinitions []blockeditor.BlockDefinition // Endpoint string Layout func(w http.ResponseWriter, r *http.Request, webpageTitle, webpageHtml string, options struct { Styles []string StyleURLs []string Scripts []string ScriptURLs []string }) string Logger *slog.Logger Store cmsstore.StoreInterface }
Click to show internal directories.
Click to hide internal directories.