hooks

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PadCopyString = "padCopy"
View Source
const PadCreateString = "padCreate"
View Source
const PadDefaultContentString = "padDefaultContent"
View Source
const PadLoadString = "padLoad"
View Source
const PadRemoveString = "padRemove"
View Source
const PadUpdateString = "padUpdate"
View Source
const PreAuthorizeString = "preAuthorize"
View Source
const PreAuthzFailureString = "preAuthzFailure"

Variables

View Source
var AllLocales = map[string]map[string]string{}

AllLocales holds every loaded locale's translation map keyed by language tag (e.g. "en", "de"). Each value is map[string]string. Populated by ExpressPreSession at startup. Server-side renderers (e.g. socialmeta) look up translations here without re-parsing the embedded locale files. Upstream #7635 (refactor that exposes i18n.locales for server use).

View Source
var AvailableLangs = map[string]LanguageInfo{}
View Source
var SortedAvailableLangs []LanguageEntry

Functions

func ExpressPreSession

func ExpressPreSession(app *fiber.App, uiAssets embed.FS)

func IsValid

func IsValid(langcode string) bool

Types

type AttributeContainer

type AttributeContainer struct {
	// contains filtered or unexported fields
}

type Hook

type Hook struct {
	// contains filtered or unexported fields
}

func NewHook

func NewHook() Hook

func (*Hook) DequeueHook

func (h *Hook) DequeueHook(key, id string)

func (*Hook) EnqueueGetLineHtmlForExportHook added in v0.0.4

func (h *Hook) EnqueueGetLineHtmlForExportHook(ctx func(ctx any))

func (*Hook) EnqueueGetPluginTranslationHooks added in v0.0.4

func (h *Hook) EnqueueGetPluginTranslationHooks(cb func(ctx *events.LocaleLoadContext))

func (*Hook) EnqueueHook

func (h *Hook) EnqueueHook(key string, ctx func(ctx any)) string

func (*Hook) EnqueuePreAuthorizeHook added in v0.6.3

func (h *Hook) EnqueuePreAuthorizeHook(cb func(ctx *events.PreAuthorizeContext)) string

EnqueuePreAuthorizeHook registers a callback for the preAuthorize hook, which lets plugins permit or deny a request before authentication runs (see events.PreAuthorizeContext).

func (*Hook) EnqueuePreAuthzFailureHook added in v0.6.3

func (h *Hook) EnqueuePreAuthzFailureHook(cb func(ctx *events.PreAuthzFailureContext)) string

EnqueuePreAuthzFailureHook registers a callback for the preAuthzFailure hook, which lets plugins override the default 403 response after a preAuthorize deny (see events.PreAuthzFailureContext).

func (*Hook) ExecuteGetLineHtmlForExportHooks added in v0.0.4

func (h *Hook) ExecuteGetLineHtmlForExportHooks(ctx any)

func (*Hook) ExecuteGetPluginTranslationHooks added in v0.0.4

func (h *Hook) ExecuteGetPluginTranslationHooks(ctx *events.LocaleLoadContext)

func (*Hook) ExecuteHooks

func (h *Hook) ExecuteHooks(key string, ctx any)

func (*Hook) ExecutePreAuthorizeHooks added in v0.6.3

func (h *Hook) ExecutePreAuthorizeHooks(ctx *events.PreAuthorizeContext)

func (*Hook) ExecutePreAuthzFailureHooks added in v0.6.3

func (h *Hook) ExecutePreAuthzFailureHooks(ctx *events.PreAuthzFailureContext)

type LanguageContainer

type LanguageContainer struct {
	// contains filtered or unexported fields
}

type LanguageEntry added in v0.6.0

type LanguageEntry struct {
	Code string
	Info LanguageInfo
}

LanguageEntry is the ordered (code, info) pair used by templates that render the language dropdown. Go maps have no stable iteration order, so SortedAvailableLangs provides the alphabetical-by-native-name ordering that upstream #7477 added on the Node side.

type LanguageInfo

type LanguageInfo struct {
	LanguageCode string
	Direction    string
	Attribute    string
	DisplayName  string
}

type Locales

type Locales = map[string]interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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