Documentation
¶
Index ¶
Constants ¶
View Source
const PathGroups = "groups"
View Source
const PathHome = "home"
View Source
const PathRoles = "roles"
View Source
const PathUserCreate = "user-create"
View Source
const PathUserDelete = "user-delete"
View Source
const PathUserImpersonate = "user-impersonate"
View Source
const PathUserUpdate = "user-update"
View Source
const PathUsers = "users"
Variables ¶
View Source
var ScriptHtmx = `setTimeout(async function() { if (!window.htmx) { let script = document.createElement('script'); document.head.appendChild(script); script.type = 'text/javascript'; script.src = '` + cdn.Htmx_2_0_0() + `'; await script.onload } }, 1000);`
View Source
var ScriptSwal = `setTimeout(async function() { if (!window.Swal) { let script = document.createElement('script'); document.head.appendChild(script); script.type = 'text/javascript'; script.src = '` + cdn.Sweetalert2_11() + `'; await script.onload } }, 1000);`
Functions ¶
func AdminHeader ¶
func AdminHeader(config Config) hb.TagInterface
func Breadcrumbs ¶
func Breadcrumbs(config Config, pageBreadcrumbs []Breadcrumb) hb.TagInterface
Types ¶
type Breadcrumb ¶
type Config ¶
type Config struct {
ResponseWriter http.ResponseWriter
Request *http.Request
Logger *slog.Logger
Store userstore.StoreInterface
Layout func(http.ResponseWriter, *http.Request, LayoutOptions) string
AdminHomeURL string
WebsiteUrl string
TokenizedColumns []string
// TokenCreate func(columnName, columnValue string) (token string, err error)
// TokenDelete func(token string) (err error)
// TokenRead func(token string) (columnName, columnValue string, err error)
// TokenUpdate func(token string, columnName, columnValue string) (err error)
// TokensCreate func(columnValueMap map[string]string) (columnTokenMap map[string]string, err error)
// TokensUpdate func(tokenValueMap map[string]string) (err error)
TokensBulk func(tokensToCreate map[string]string, tokensToUpdate map[string]string, tokensToDelete []string) (createdTokens map[string]string, err error)
TokensRead func(columnTokenMap map[string]string) (columnValueMap map[string]string, err error)
}
type LayoutOptions ¶
type PageInterface ¶
type PageInterface interface {
ToTag(config Config) hb.TagInterface
}
Click to show internal directories.
Click to hide internal directories.