model

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractPage

type AbstractPage struct {
	Expr     ast.Expr
	TypeName string

	Methods       []*Handler
	EventHandlers []*EventHandler
	Embeds        []*AbstractPage
}

type App

type App struct {
	Fset    *token.FileSet
	PkgPath string
	Expr    ast.Expr

	PageIndex    *Page
	PageError404 *Page
	PageError500 *Page

	Recover500          ast.Expr // Nullable.
	GlobalHeadGenerator ast.Expr // Nullable.

	Session *SessionType // Nullable.

	Pages   []*Page
	Events  []*Event
	Actions []*Handler // App-level POST/PUT/DELETE actions.
}

type Event

type Event struct {
	Expr ast.Expr

	TypeName string
	Subject  string

	HasTargetUserIDs bool
}

type EventHandler

type EventHandler struct {
	Expr ast.Expr

	Name          string
	EventTypeName string

	InputEvent        *Input
	InputSSE          *Input
	InputSessionToken *Input
	InputSession      *Input
	InputSignals      *Input

	OutputErr *Output
}

type Handler

type Handler struct {
	Expr ast.Expr

	Name string

	HTTPMethod string
	Route      string

	InputRequest      *Input
	InputSSE          *Input
	InputSessionToken *Input
	InputSession      *Input
	InputPath         *Input
	InputQuery        *Input
	InputSignals      *Input
	InputDispatch     *InputDispatch

	OutputBody           *TemplComponent // templ.Component body (actions only)
	OutputRedirect       *Output
	OutputRedirectStatus *Output
	OutputNewSession     *Output
	OutputCloseSession   *Output
	OutputEnableBgStream *Output
	OutputDisableRefresh *Output
	OutputErr            *Output
}

type HandlerGET

type HandlerGET struct {
	*Handler
	OutputBody *TemplComponent
	OutputHead *TemplComponent
}

type Input

type Input struct {
	Expr ast.Expr

	Name string
	Type Type
}

type InputDispatch

type InputDispatch struct {
	Expr           ast.Expr
	Name           string
	Type           Type
	EventTypeNames []string
}

type Output

type Output struct {
	Expr ast.Expr

	Name string

	Type Type
}

type Page

type Page struct {
	Expr     ast.Expr
	TypeName string
	Route    string

	PageSpecialization PageSpecialization

	GET           *HandlerGET
	Actions       []*Handler
	EventHandlers []*EventHandler
	Embeds        []*AbstractPage
}

type PageSpecialization

type PageSpecialization int8
const (
	PageTypeIndex PageSpecialization
	PageTypeError404
	PageTypeError500
)

type SessionType

type SessionType struct {
	Expr ast.Expr
}

type TemplComponent

type TemplComponent struct {
	*Output
}

type Type

type Type struct {
	Resolved types.Type
	TypeExpr ast.Expr
}

Jump to

Keyboard shortcuts

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