actions

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package actions provides experimental render-time action hooks for partials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionHTML

func ActionHTML(ctx ...*partial.RenderContext) template.HTML

ActionHTML renders the configured template action for a render context.

go-doc:sig func() html/template.HTML

func ActionHeader

func ActionHeader(ctx ...*partial.RenderContext) string

ActionHeader returns the connector action header name.

go-doc:sig func() string

func ActionIs

func ActionIs(values ...string) bool

ActionIs reports whether the current action value matches any provided value.

go-doc:sig func(values ...string) bool

func ActionValue

func ActionValue(ctx ...*partial.RenderContext) string

ActionValue returns the selected action value from the current request.

go-doc:sig func() string

func FuncMap

func FuncMap() template.FuncMap

FuncMap returns placeholders for the action template helpers.

func Stage

func Stage() partial.RenderStage

Stage installs action helpers and executes configured partial actions.

func WithAction

func WithAction(p *partial.Partial, action Action) *partial.Partial

WithAction configures a partial-level action that may replace the partial before its template is rendered.

func WithTemplateAction

func WithTemplateAction(p *partial.Partial, action Action) *partial.Partial

WithTemplateAction configures the action template helper for a partial.

Types

type Action

type Action func(ctx context.Context, p *partial.Partial, runtime *partial.Runtime) (*partial.Partial, error)

Action can replace or render a partial during a request-aware render.

Jump to

Keyboard shortcuts

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