admin

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 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
	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
	URL                 func(endpoint string, path string, params map[string]string) string
	PathTemplateCreate  string
	PathTemplateDelete  string
	PathTemplateManager string
	PathTemplateUpdate  string
}

type UiInterface

type UiInterface interface {
	Endpoint() string
	Layout(w http.ResponseWriter, r *http.Request, webpageTitle, webpageHtml string, options struct {
		Styles     []string
		StyleURLs  []string
		Scripts    []string
		ScriptURLs []string
	}) string
	Logger() *slog.Logger
	PathTemplateCreate() string
	PathTemplateDelete() string
	PathTemplateManager() string
	PathTemplateUpdate() string
	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
	URL(endpoint string, path string, params map[string]string) string
}

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