Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExampleAdminSetup ¶
func ExampleAdminSetup()
ExampleAdminSetup demonstrates how to set up custom entity admin controllers
func ExampleMultipleEntityTypes ¶
func ExampleMultipleEntityTypes()
ExampleMultipleEntityTypes shows how to set up multiple custom entity types
Types ¶
type EntityCreateController ¶
type EntityCreateController struct {
// contains filtered or unexported fields
}
EntityCreateController handles entity creation
func NewEntityCreateController ¶
func NewEntityCreateController(ui UiInterface, definition cmsstore.CustomEntityDefinition) *EntityCreateController
NewEntityCreateController creates a new create controller
func (*EntityCreateController) Handler ¶
func (c *EntityCreateController) Handler(w http.ResponseWriter, r *http.Request) string
Handler handles both GET (show form) and POST (process form)
type EntityDeleteController ¶
type EntityDeleteController struct {
// contains filtered or unexported fields
}
EntityDeleteController handles entity deletion
func NewEntityDeleteController ¶
func NewEntityDeleteController(ui UiInterface, definition cmsstore.CustomEntityDefinition) *EntityDeleteController
NewEntityDeleteController creates a new delete controller
func (*EntityDeleteController) Handler ¶
func (c *EntityDeleteController) Handler(w http.ResponseWriter, r *http.Request) string
Handler handles both GET (show confirmation) and POST (process deletion)
type EntityEditController ¶
type EntityEditController struct {
// contains filtered or unexported fields
}
EntityEditController handles entity editing
func NewEntityEditController ¶
func NewEntityEditController(ui UiInterface, definition cmsstore.CustomEntityDefinition) *EntityEditController
NewEntityEditController creates a new edit controller
func (*EntityEditController) Handler ¶
func (c *EntityEditController) Handler(w http.ResponseWriter, r *http.Request) string
Handler handles both GET (show form) and POST (process form)
type EntityListController ¶
type EntityListController struct {
// contains filtered or unexported fields
}
EntityListController handles the list view for a custom entity type
func NewEntityListController ¶
func NewEntityListController(ui UiInterface, definition cmsstore.CustomEntityDefinition) *EntityListController
NewEntityListController creates a new list controller
func (*EntityListController) Handler ¶
func (c *EntityListController) Handler(w http.ResponseWriter, r *http.Request) string
Handler renders the entity list page
type ExampleUI ¶
type ExampleUI struct {
// contains filtered or unexported fields
}
ExampleUI implements the UiInterface for custom entity controllers
func (*ExampleUI) Layout ¶
func (ui *ExampleUI) Layout() hb.TagInterface
func (*ExampleUI) Store ¶
func (ui *ExampleUI) Store() cmsstore.StoreInterface
type UiInterface ¶
type UiInterface interface {
Store() cmsstore.StoreInterface
Layout() hb.TagInterface
Logger() any
}
UiInterface defines the interface for custom entity admin UI