admin

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ActionModalPageFilterShow = "modal_template_filter_show"
View Source
const VIEW_CONTENT = "content"
View Source
const VIEW_SETTINGS = "settings"

Variables

This section is empty.

Functions

func NewTemplateCreateController

func NewTemplateCreateController(ui UiInterface) *templateCreateController

func NewTemplateDeleteController

func NewTemplateDeleteController(ui UiInterface) *templateDeleteController

func NewTemplateManagerController

func NewTemplateManagerController(ui UiInterface) *templateManagerController

func NewTemplateUpdateController

func NewTemplateUpdateController(ui UiInterface) *templateUpdateController

Types

type UiConfig

type UiConfig struct {
	Endpoint    string
	AdminHeader hb.TagInterface
	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
}

type UiInterface

type UiInterface interface {
	Endpoint() string
	AdminHeader() hb.TagInterface
	Layout(w http.ResponseWriter, r *http.Request, webpageTitle, webpageHtml string, options struct {
		Styles     []string
		StyleURLs  []string
		Scripts    []string
		ScriptURLs []string
	}) string
	Logger() *slog.Logger
	TemplateCreate(w http.ResponseWriter, r *http.Request)
	TemplateManager(w http.ResponseWriter, r *http.Request)
	TemplateDelete(w http.ResponseWriter, r *http.Request)
	TemplateUpdate(w http.ResponseWriter, r *http.Request)
	Store() cmsstore.StoreInterface
}

func UI

func UI(config UiConfig) UiInterface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL