package turbo
import "github.com/a-h/templ/turbo"
Index ¶
- func Append(w http.ResponseWriter, target string, template templ.Component) error
- func AppendWithContext(ctx context.Context, w http.ResponseWriter, target string, template templ.Component) error
- func IsTurboRequest(r *http.Request) bool
- func Prepend(w http.ResponseWriter, target string, template templ.Component) error
- func PrependWithContext(ctx context.Context, w http.ResponseWriter, target string, template templ.Component) error
- func Remove(w http.ResponseWriter, target string) error
- func RemoveWithContext(ctx context.Context, w http.ResponseWriter, target string) error
- func Replace(w http.ResponseWriter, target string, template templ.Component) error
- func ReplaceWithContext(ctx context.Context, w http.ResponseWriter, target string, template templ.Component) error
- func Update(w http.ResponseWriter, target string, template templ.Component) error
- func UpdateWithContext(ctx context.Context, w http.ResponseWriter, target string, template templ.Component) error
Functions ¶
func Append ¶
Append adds an append action to the output stream.
func AppendWithContext ¶
func AppendWithContext(ctx context.Context, w http.ResponseWriter, target string, template templ.Component) error
AppendWithContext adds an append action to the output stream.
func IsTurboRequest ¶
IsTurboRequest returns true if the incoming request is able to receive a Turbo stream. This is determined by checking the request header for "text/vnd.turbo-stream.html"
func Prepend ¶
Prepend adds a prepend action to the output stream.
func PrependWithContext ¶
func PrependWithContext(ctx context.Context, w http.ResponseWriter, target string, template templ.Component) error
PrependWithContext adds a prepend action to the output stream.
func Remove ¶
func Remove(w http.ResponseWriter, target string) error
Remove adds a remove action to the output stream.
func RemoveWithContext ¶
RemoveWithContext adds a remove action to the output stream.
func Replace ¶
Replace adds a replace action to the output stream.
func ReplaceWithContext ¶
func ReplaceWithContext(ctx context.Context, w http.ResponseWriter, target string, template templ.Component) error
ReplaceWithContext adds a replace action to the output stream.
func Update ¶
Update adds an update action to the output stream.
func UpdateWithContext ¶
func UpdateWithContext(ctx context.Context, w http.ResponseWriter, target string, template templ.Component) error
UpdateWithContext adds an update action to the output stream.
Source Files ¶
- Version
- v0.3.857 (latest)
- Published
- Mar 25, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 2 weeks ago –
Tools for package owners.