render

package
v0.0.2-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 27 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanToast

func CleanToast(ctx context.Context, w http.ResponseWriter)

func Error500

func Error500(w http.ResponseWriter, r *http.Request)

func Forbidden

func Forbidden(w http.ResponseWriter, r *http.Request)

func HTML

HTML get at templ component and renders to response writer

func HTMLWithBreadCrumb

func HTMLWithBreadCrumb(ctx context.Context, w http.ResponseWriter, c templ.Component)

func HTMLWithToastError

func HTMLWithToastError(ctx context.Context, w http.ResponseWriter, c templ.Component, toastMsg string)

HTMLWithToastError function renders the template component with the error toast

func NotFound

func NotFound(w http.ResponseWriter, r *http.Request)

func Page

func Redirect

func Redirect(w http.ResponseWriter, redirectTo string)

Redirect makes a client side redirection

func RedirectExternal

func RedirectExternal(w http.ResponseWriter, r *http.Request, redirectTo string)

RedirectExternal makes a redirection to an external url

func RedirectWithRefresh

func RedirectWithRefresh(w http.ResponseWriter, redirectTo string)

RedirectWithRefresh redirects the client with a full page refresh, used mostly on error pages

func RootWithNav

func RootWithNav(ctx context.Context, w http.ResponseWriter, c templ.Component, url string)

func RootWithoutNav

func RootWithoutNav(ctx context.Context, w http.ResponseWriter, c templ.Component, url string)

func StreamSSE

func StreamSSE[T *sse.Event | *types.LogLine | *types.ArtifactLogLine](
	ctx context.Context,
	w http.ResponseWriter,
	chStop <-chan struct{},
	chEvents <-chan T,
	chErr <-chan error,
	renderInit func(ctx context.Context, w io.Writer) error,
	renderFunc func(ctx context.Context, w io.Writer, event T) error,
)

func ToastError

func ToastError(ctx context.Context, w http.ResponseWriter, err error)

func ToastErrorMsg

func ToastErrorMsg(ctx context.Context, w http.ResponseWriter, msg string)

func ToastErrorWithValidation

func ToastErrorWithValidation(ctx context.Context, w http.ResponseWriter, model any, err error)

func ToastSuccess

func ToastSuccess(ctx context.Context, w http.ResponseWriter, msg string)

func WriteMesageHeader

func WriteMesageHeader(w io.Writer) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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