types

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PageConfig

type PageConfig struct {
	ComponentPath    string
	Mode             PageMode
	PropsLoader      PropsLoader
	StaticDataLoader StaticDataLoader
}

type PageMode

type PageMode int
const (
	ModeSSR PageMode = iota
	ModeClientOnly
	ModeStaticPrerender
)

type PageOption

type PageOption func(*PageConfig)

func WithClient added in v0.1.4

func WithClient() PageOption

func WithLoader added in v0.1.4

func WithLoader(loader PropsLoader) PageOption

func WithStatic added in v0.1.4

func WithStatic() PageOption

func WithStaticData added in v0.1.4

func WithStaticData(loader StaticDataLoader) PageOption

type PropsLoader

type PropsLoader func(*http.Request) (map[string]any, error)

type RedirectError

type RedirectError interface {
	RedirectURL() string
	RedirectStatusCode() int
}

type RenderedPage

type RenderedPage struct {
	Body string
	Head string
}

type StaticDataLoader

type StaticDataLoader func(context.Context) ([]StaticPathData, error)

type StaticPathData

type StaticPathData struct {
	Path  string
	Props map[string]any
}

Jump to

Keyboard shortcuts

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