Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AdminSite_Name = "Admin" AdminSite_URL = "/admin" AdminSite_Logger request.Logger = &request.NopLogger{} AdminSite_ExtensionTemplateManager *templates.Manager AdminSite_ExtensionOptions *extensions.Options )
View Source
var (
PermissionViewAdminSite = "view_admin_site"
)
Functions ¶
func Register ¶
func Register[T ModelInterface[T]](m AdminOptions[T])
func RegisterExtension ¶
func RegisterExtension(ext extensions.Extension)
Register an extension to the admin site.
Extensions are separate templates that can be used to add extra functionality ¶
These templates are embedded into the admin site's base template.
func Unauthorized ¶
Unauthorized redirects the user to the unauthorized page. It will also log a stacktrace of the code that called this function.
Types ¶
type AdminDisplayer ¶ added in v1.6.2
type AdminDisplayer interface {
AdminDisplay() string
}
type AdminOptions ¶ added in v1.6.2
type AdminOptions[T ModelInterface[T]] struct { FormFields []string ListFields []string Model T }
type Application ¶ added in v1.6.2
type Model ¶ added in v1.6.2
type Model struct { Name string Pkg string URL_List routevars.URLFormatter URL_Create routevars.URLFormatter URL_Update routevars.URLFormatter URL_Delete routevars.URLFormatter Model any Permissions Permissions }
type ModelInterface ¶ added in v1.6.2
type ModelInterface[T any] interface { interfaces.Saver interfaces.Deleter interfaces.StringGetter[T] interfaces.Lister[T] }
Click to show internal directories.
Click to hide internal directories.