Versions in this module Expand all Collapse all v1 v1.0.2 Apr 14, 2025 Changes in this version type Context + func (c *Context) SendJSONWithStatus(v any, statusCode int) error v1.0.1 Feb 28, 2025 Changes in this version type Context + Params router.Parameter v1.0.0 Feb 28, 2025 Changes in this version + const TAG_NAME + var ContextType = reflect.TypeOf((*Context)(nil)) + var DefaultKernel = NewKernel() + var KernelType = reflect.TypeOf((*Kernel)(nil)) + func DispatchNext(context *Context, name string, writer http.ResponseWriter, ...) error + func Env(def, key string, fallbacks ...string) string + func GetEnv(key string, fallbacks ...string) (value string) + func LookupEnv(Key string, fallbacks ...string) (value string, found bool) + type Component interface + Bootstrap func(app *Kernel) + func NewComponentBundle(components ...Component) Component + func NewControllerBundle(controllers ...Controller) Component + type ComponentBundle []Component + func (c ComponentBundle) Bootstrap(a *Kernel) + type ComponentFunc func(*Kernel) + func (component ComponentFunc) Bootstrap(a *Kernel) + type Context struct + Gen *link.URLGen + Name string + Parameters router.Parameter + Registry Registry + Request *http.Request + Response http.ResponseWriter + func GetContext(cdi Registry) *Context + func (c *Context) BindForm(target interface{}) error + func (c *Context) BindGetForm(target interface{}) error + func (c *Context) BindJSON(target interface{}) error + func (c *Context) GetBodyBytes() ([]byte, error) + func (c *Context) GetBodyReader() io.ReadCloser + func (c *Context) GetCookieValue(name string) (value string) + func (c *Context) GetGetValue(name string) string + func (c *Context) GetPostValue(name string) string + func (c *Context) GetURLParameter(name string) string + func (c *Context) GoContext() context.Context + func (c *Context) Next() error + func (c *Context) Printf(format string, v ...interface{}) (int, error) + func (c *Context) Redirect(urlStr string) + func (c *Context) RedirectStatus(urlStr string, httpStatus int) + func (c *Context) SendJSON(v any) error + func (c *Context) SendJSONStatusCode(statusCode int, v any) error + func (c *Context) SendTextWithStatus(statusCode int, content string) error + func (c *Context) WriteString(txt string) (int, error) + type Controller interface + Mx func(*Mapper) + type ControllerBundle []Controller + func (c ControllerBundle) Bootstrap(a *Kernel) + type ControllerURLGen struct + Parent link.URLGen + func (urlGen *ControllerURLGen) URL(dst string, v ...interface{}) string + type Handler interface + Handle func(*Context) + type HandlerFunc func(*Context) + func (fn HandlerFunc) Handle(c *Context) + type Kernel struct + Prefix string + Registry Registry + Router *router.Router + URLGen MapURLGen + func GetKernel(c Registry) *Kernel + func NewKernel() *Kernel + func (kernel *Kernel) AddComponents(b ...Component) + func (kernel *Kernel) AddControllers(contexts ...Controller) + func (kernel *Kernel) AddHandler(method, path string, handler Handler, filters ...Handler) + func (kernel *Kernel) AddHandlerContextName(registry Registry, name, method, path string, handler Handler, ...) + func (kernel *Kernel) AddHandlerFunc(method, path string, fn HandlerFunc, filters ...Handler) + func (kernel *Kernel) AddHandlerName(name, method, path string, handler Handler, filters ...Handler) + func (kernel *Kernel) Container() Registry + func (kernel *Kernel) Dispatch(eventName string, payload event.Payload) + func (kernel *Kernel) Dispose() + func (kernel *Kernel) Fork() *Kernel + func (kernel *Kernel) MustDispose() + func (kernel *Kernel) Root() *Kernel + func (kernel *Kernel) RunServer(host string) error + func (kernel *Kernel) RunServerTLS(host, certfile, keyfile string) error + func (kernel *Kernel) Snapshot() *Kernel + func (kernel *Kernel) Subscribe(eventName string, handler interface{}) + type MapURLGen map[string]string + func (urlGen MapURLGen) URL(dst string, v ...interface{}) string + type Mapper struct + Name string + Prefix string + Registry Registry + func (mx *Mapper) BindAction(method, path, action string, filters ...Handler) + type MiddlewareBundle struct + func (filterHandlers *MiddlewareBundle) AddMiddleware(filters ...Handler) + func (filterHandlers *MiddlewareBundle) AddMiddlewareFunc(filters ...HandlerFunc) + func (filterHandlers *MiddlewareBundle) ClearMiddlewares() + type Registry = registry.Interface + type RunServerEvent struct + Host string + Port string + type RunServerEventTLS struct + CertFile string + Host string + KeyFile string