Versions in this module Expand all Collapse all v0 v0.0.6 Jun 11, 2024 Changes in this version type CaesarCtx + func (ctx *CaesarCtx) SendSSE(name string, data string) error + func (ctx *CaesarCtx) SetSSEHeaders() v0.0.5 Jun 9, 2024 Changes in this version type CaesarCtx + func (ctx *CaesarCtx) RedirectBack() error v0.0.4 Jun 6, 2024 Changes in this version type AppConfig + Debug bool v0.0.3 Jun 3, 2024 Changes in this version type CaesarCtx + func (c *CaesarCtx) WantsJSON() bool v0.0.2 May 29, 2024 Changes in this version type CaesarCtx + func (c *CaesarCtx) Next() v0.0.1 May 20, 2024 Changes in this version + func NewHTTPMux(router *Router, errorHandler *ErrorHandler) *http.ServeMux + func NewHTTPServer(lc fx.Lifecycle, mux *http.ServeMux) *http.Server + func RetrieveErrorCode(err error) int + func ServeStaticAssets(fs embed.FS) func(r *Router) + func ValidateEnvironmentVariables[T interface{}]() *T + func Validate[T interface{}](ctx *CaesarCtx) (data *T, validationErrors map[string]string, ok bool) + type App struct + Config *AppConfig + Invokers []any + Providers []any + func NewApp(cfg *AppConfig) *App + func (app *App) RegisterInvokers(invokers ...any) + func (app *App) RegisterProviders(providers ...any) + func (app *App) RetrieveRouter() *Router + func (app *App) Run() + type AppConfig struct + Addr string + type CaesarCtx struct + Request *http.Request + ResponseWriter http.ResponseWriter + func (c *CaesarCtx) Context() context.Context + func (c *CaesarCtx) DecodeJSON(v any) error + func (c *CaesarCtx) PathValue(key string) string + func (c *CaesarCtx) Render(component templ.Component) error + func (c *CaesarCtx) SendJSON(v interface{}, statuses ...int) error + func (c *CaesarCtx) SendText(text string, statuses ...int) error + func (c *CaesarCtx) WithStatus(statusCode int) *CaesarCtx + func (ctx *CaesarCtx) GetHeader(key string) string + func (ctx *CaesarCtx) Redirect(to string) error + func (ctx *CaesarCtx) SetHeader(key string, value string) + type Error struct + Code int + func NewError(code int) *Error + func (e *Error) Error() string + type ErrorHandler struct + Handle func(c *CaesarCtx, err error) + type Handler func(*CaesarCtx) error + type Route struct + Handler Handler + Method string + Middleware []Handler + Pattern string + func (route *Route) Use(handler Handler) *Route + type Router struct + Middleware []Handler + Mux *http.ServeMux + Routes []*Route + func NewRouter() *Router + func (r *Router) Any(pattern string, handler Handler) *Route + func (r *Router) Delete(pattern string, handler Handler) *Route + func (r *Router) Get(pattern string, handler Handler) *Route + func (r *Router) Patch(pattern string, handler Handler) *Route + func (r *Router) Post(pattern string, handler Handler) *Route + func (r *Router) Put(pattern string, handler Handler) *Route + func (r *Router) Render(pattern string, component templ.Component) *Route + func (r *Router) Use(handler Handler)