Versions in this module Expand all Collapse all v5 v5.0.1 Jul 28, 2026 Changes in this version + const ReturnToParam — js/wasm + func BuildMetadataNode(parseRouterMetadata Metadata) *runtime.Element + func BuildRouteService() pluginruntime.RouteService + func DecodeQuery[T any](parseValues url.Values) (T, error) + func EncodeQuery(parseValue any) url.Values + func FragmentHref(parseFragment string) string + func GetCurrentPath() string — js/wasm + func Href(parsePath string) string + func Navigate(parsePath string) — js/wasm + func NavigateReplace(parsePath string) — js/wasm + func OnNavigate(parseFn func(Location)) func() + func PreserveReturnTo(parsePath string, parseQuery url.Values) string — js/wasm + func ReadReturnTo(parseQuery url.Values, parseFallback string) string — js/wasm + func RegisterElementRoute(parsePath string, parseElemRef js.Value) — js/wasm + func RegisterLazyRoute(parsePath string, parseComponent interface{}, parseChunk RouteChunk, ...) — js/wasm + func RegisterRoute(parsePath string, parseComponent interface{}, parseOptions ...Options) — js/wasm + func RegisteredRoutes() []string + func RetryLoader(parseKey string) error — js/wasm + func Revalidate() — js/wasm + type AsyncGuardFunc func(context.Context, RouteContext) GuardDecision — js/wasm + type AsyncLeaveGuardFunc func(context.Context, RouteContext, RouteContext) GuardDecision — js/wasm + type Attrs = map[string]interface — js/wasm + func UseRouteData() Attrs + type Component = func(Attrs) *Element — js/wasm + type Element = runtime.Element — js/wasm + func GetOutlet() *Element + func GetRoute() *Element + func UseOutlet() *Element + type GuardDecision struct — js/wasm + Blocked bool + Denied bool + Reason string + Redirect string + Retryable bool + type GuardFunc func(RouteContext) GuardResult — js/wasm + type GuardResult struct — js/wasm + Blocked bool + Reason string + Redirect string + func AllowNavigation() GuardResult + func BlockNavigation(parseReason string) GuardResult + func RedirectNavigation(parsePath string) GuardResult + type LeaveGuardFunc func(current RouteContext, next RouteContext) GuardResult — js/wasm + type LoaderFunc func(context.Context, RouteContext) (Attrs, error) — js/wasm + type Location struct + Params map[string]string + Path string + Query string + func UseLocation() Location + func UseRoute() Location + func (parseLoc Location) Param(parseKey string) string + type Metadata struct + CanonicalURL string + Description string + Title string + type Navigator struct — js/wasm + func UseNavigate() Navigator + func (parseN Navigator) Navigate(parsePath string) + func (parseN Navigator) Replace(parsePath string) + type Options struct — js/wasm + Authorizing interface{} + BeforeEnter GuardFunc + BeforeEnterAsync AsyncGuardFunc + BeforeLeave LeaveGuardFunc + BeforeLeaveAsync AsyncLeaveGuardFunc + CanonicalURL string + Chunk RouteChunk + Description string + Error interface{} + GuardPending interface{} + Layout bool + Loader LoaderFunc + Loading interface{} + Redirect string + Title string + Unauthorized interface{} + type Params struct — js/wasm + func UseParams() Params + func (parseP Params) Bool(parseKey string) (bool, bool) + func (parseP Params) Get(parseKey string) string + func (parseP Params) Has(parseKey string) bool + func (parseP Params) Int(parseKey string) (int, bool) + func (parseP Params) Values() map[string]string + type Query struct — js/wasm + func UseQuery() Query + func (parseQ Query) Bool(parseKey string) (bool, bool) + func (parseQ Query) Encode() string + func (parseQ Query) Get(parseKey string) string + func (parseQ Query) Has(parseKey string) bool + func (parseQ Query) Int(parseKey string) (int, bool) + func (parseQ Query) Values() url.Values + type Revalidator struct — js/wasm + func UseRevalidator() Revalidator + func (parseR Revalidator) Loading() bool + func (parseR Revalidator) Revalidate() + type RouteChunk struct — js/wasm + Error interface{} + ID string + Loader RouteChunkLoader + Loading interface{} + Scripts []string + type RouteChunkLoader func(context.Context, RouteContext) error — js/wasm + type RouteContext struct — js/wasm + Params Params + Path string + Query Query + type RouteContract struct + func DefineRoute(parsePattern string) (RouteContract, error) + func MustDefineRoute(parsePattern string) RouteContract + func (parseC RouteContract) Href(parseParams map[string]string, parseQuery url.Values) (string, error) + func (parseC RouteContract) HrefFor(parseParams RouteParamsProvider, parseQuery RouteQueryProvider) (string, error) + func (parseC RouteContract) MustHref(parseParams map[string]string, parseQuery url.Values) string + func (parseC RouteContract) MustHrefFor(parseParams RouteParamsProvider, parseQuery RouteQueryProvider) string + func (parseC RouteContract) MustPath(parseParams map[string]string) string + func (parseC RouteContract) MustPathFor(parseParams RouteParamsProvider) string + func (parseC RouteContract) ParamNames() []string + func (parseC RouteContract) Path(parseParams map[string]string) (string, error) + func (parseC RouteContract) PathFor(parseParams RouteParamsProvider) (string, error) + func (parseC RouteContract) Pattern() string + type RouteInspection struct — js/wasm + LastRedirect RouteRedirectInspection + Loaders []RouteLoaderInspection + Loading bool + Metadata Metadata + Params map[string]string + Path string + Query url.Values + Stack []RouteStackInspection + func InspectCurrentRoute() RouteInspection + type RouteLoaderInspection struct — js/wasm + Error string + HasData bool + Key string + Path string + Pending bool + type RouteParamsProvider interface + RouteParams func() map[string]string + type RouteQueryProvider interface + RouteQuery func() url.Values + type RouteRedirectInspection struct — js/wasm + Cause string + From string + To string + type RouteStackInspection struct — js/wasm + HasBeforeEnter bool + HasBeforeLeave bool + HasLoader bool + ID string + Metadata Metadata + Params map[string]string + Path string + type Router struct — js/wasm + func GetRouter() *Router + func NewHashRouter(parseOptions ...RouterOptions) *Router + func NewHistoryRouter(parseOptions ...RouterOptions) *Router + func (parseR *Router) Current() *Element + func (parseR *Router) GetCurrentPath() string + func (parseR *Router) GetCurrentRouterPath() string + func (parseR *Router) GoGetRoute() *Element + func (parseR *Router) GoRegisterRoute(parsePath string, parseComponent interface{}, parseOptions ...Options) + func (parseR *Router) HydrateMount(parseSelector string) + func (parseR *Router) HydrateMountElement(parseElem js.Value) + func (parseR *Router) IsLoading() bool + func (parseR *Router) Mount(parseSelector string) + func (parseR *Router) MountElement(parseElem js.Value) + func (parseR *Router) Navigate(parsePath string) + func (parseR *Router) NavigateReplace(parsePath string) + func (parseR *Router) Register(parsePath string, parseComponent interface{}, parseOptions ...Options) + func (parseR *Router) RegisterLazy(parsePath string, parseComponent interface{}, parseChunk RouteChunk, ...) + func (parseR *Router) RegisteredRoutes() []string + func (parseR *Router) RetryLoader(parseKey string) error + func (parseR *Router) Revalidate() + func (parseR *Router) SetFocusManagement(parseEnabled bool) + func (parseR *Router) SetViewTransitions(parseEnabled bool) + type RouterOptions struct — js/wasm + DefaultRoute string + type SearchParams struct — js/wasm + func UseSearchParams() SearchParams + func (parseS SearchParams) Bool(parseKey string) (bool, bool) + func (parseS SearchParams) Delete(parseKey string) + func (parseS SearchParams) Encode() string + func (parseS SearchParams) Get(parseKey string) string + func (parseS SearchParams) Has(parseKey string) bool + func (parseS SearchParams) Int(parseKey string) (int, bool) + func (parseS SearchParams) Navigate(parseValues url.Values) + func (parseS SearchParams) Replace(parseKey, parseValue string) + func (parseS SearchParams) ReplaceAll(parseValues url.Values) + func (parseS SearchParams) Set(parseKey, parseValue string) + func (parseS SearchParams) Values() url.Values Other modules containing this package github.com/monstercameron/GoWebComponents github.com/monstercameron/GoWebComponents/v4