Documentation
¶
Index ¶
- func CleanToast(ctx context.Context, w http.ResponseWriter)
- func Error500(w http.ResponseWriter, r *http.Request)
- func Forbidden(w http.ResponseWriter, r *http.Request)
- func HTML(ctx context.Context, w http.ResponseWriter, c templ.Component)
- func HTMLWithBreadCrumb(ctx context.Context, w http.ResponseWriter, c templ.Component)
- func HTMLWithToastError(ctx context.Context, w http.ResponseWriter, c templ.Component, toastMsg string)
- func NotFound(w http.ResponseWriter, r *http.Request)
- func Page(ctx context.Context, w http.ResponseWriter, c templ.Component)
- func Redirect(w http.ResponseWriter, redirectTo string)
- func RedirectExternal(w http.ResponseWriter, r *http.Request, redirectTo string)
- func RedirectWithRefresh(w http.ResponseWriter, redirectTo string)
- func ResetValidationErrors(ctx context.Context, w http.ResponseWriter)
- func RootWithNav(ctx context.Context, w http.ResponseWriter, c templ.Component, url string)
- func RootWithoutNav(ctx context.Context, w http.ResponseWriter, c templ.Component, url string)
- func StreamSSE[T *sse.Event | *types.LogLine | *types.ArtifactLogLine](ctx context.Context, w http.ResponseWriter, chStop <-chan struct{}, ...)
- func ToastError(ctx context.Context, w http.ResponseWriter, err error)
- func ToastErrorMsg(ctx context.Context, w http.ResponseWriter, msg string)
- func ToastSuccess(ctx context.Context, w http.ResponseWriter, msg string)
- func ValidationError(ctx context.Context, w http.ResponseWriter, key string, msg string)
- func ValidationErrors(ctx context.Context, w http.ResponseWriter, errs map[string]string)
- func WriteMesageHeader(w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanToast ¶
func CleanToast(ctx context.Context, w http.ResponseWriter)
func HTMLWithBreadCrumb ¶
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 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 ResetValidationErrors ¶
func ResetValidationErrors(ctx context.Context, w http.ResponseWriter)
func RootWithNav ¶
func RootWithoutNav ¶
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 ToastSuccess ¶
func ToastSuccess(ctx context.Context, w http.ResponseWriter, msg string)
func ValidationError ¶
func ValidationErrors ¶
func WriteMesageHeader ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.