render

package
v0.0.0-...-af76324 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Overview

Copyright (C) 2024 early (LGPL)

Copyright (C) 2024 early (LGPL)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID

func ID() string

Types

type Data

type Data map[string]any

func NewData

func NewData(r *http.Request) Data

func (Data) Get

func (d Data) Get(key string) any

func (Data) ID

func (d Data) ID() string

ID gets the *static* HTML id attribute of the component that owns this data. If the ID cannot be determined at compile time, this returns an empty string.

func (Data) IsSet

func (d Data) IsSet(key string) bool

func (Data) Request

func (d Data) Request() *http.Request

func (Data) Set

func (d Data) Set(key string, value any)

Set sets key to value.

type Loader

type Loader interface {
	Compute(r *http.Request) (Data, func(any) error, error)
}

type OnLoadFunc

type OnLoadFunc func(ctx context.Context, data Data) error

Jump to

Keyboard shortcuts

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