Versions in this module Expand all Collapse all v0 v0.1.1 Mar 6, 2026 Changes in this version + type ApplicationOption func(*NestApplication) + func WithIdleTimeout(timeout time.Duration) ApplicationOption + func WithPort(port int) ApplicationOption + func WithReadTimeout(timeout time.Duration) ApplicationOption + func WithShutdownTimeout(timeout time.Duration) ApplicationOption + func WithWriteTimeout(timeout time.Duration) ApplicationOption + type Context struct + Request *http.Request + Response http.ResponseWriter + func NewContext(w http.ResponseWriter, r *http.Request) *Context + func (c *Context) BindJSON(obj any) error + func (c *Context) Body() ([]byte, error) + func (c *Context) Context() context.Context + func (c *Context) Data(code int, contentType string, data []byte) error + func (c *Context) Get(key string) any + func (c *Context) GetBool(key string) bool + func (c *Context) GetInt(key string) int + func (c *Context) GetString(key string) string + func (c *Context) HTML(code int, html string) error + func (c *Context) Header(name string) string + func (c *Context) JSON(code int, obj any) error + func (c *Context) Method() string + func (c *Context) Param(name string) string + func (c *Context) Path() string + func (c *Context) Query(name string) string + func (c *Context) QueryDefault(name, defaultValue string) string + func (c *Context) Reset(w http.ResponseWriter, r *http.Request) + func (c *Context) Set(key string, value any) + func (c *Context) SetContext(ctx context.Context) + func (c *Context) SetHeader(name, value string) + func (c *Context) SetParam(name, value string) + func (c *Context) Status(code int) *Context + func (c *Context) StatusCode() int + func (c *Context) String(code int, format string, values ...any) error + type Controller interface + Routes func() []RouteDefinition + type ControllerMetadata struct + Description string + Path string + Tags []string + type ControllerRef struct + type HandlerFunc func(*Context) error + type LifecycleHookOrder int + const OnApplicationBootstrapOrder + const OnApplicationShutdownOrder + const OnModuleDestroyOrder + const OnModuleInitOrder + func (o LifecycleHookOrder) String() string + type LifecycleManager struct + func NewLifecycleManager() *LifecycleManager + func (lm *LifecycleManager) CallOnApplicationBootstrap(ctx context.Context) error + func (lm *LifecycleManager) CallOnApplicationShutdown(ctx context.Context) error + func (lm *LifecycleManager) CallOnModuleDestroy(ctx context.Context) error + func (lm *LifecycleManager) CallOnModuleInit(ctx context.Context) error + func (lm *LifecycleManager) RegisterModule(module *ModuleRef) + type MetadataKey string + const MetadataKeyCONTROLLER + const MetadataKeyGUARD + const MetadataKeyINTERCEPTOR + const MetadataKeyPARAM + const MetadataKeyPIPE + const MetadataKeyROUTE + const MetadataKeySWAGGER + type MetadataStorage struct + func NewMetadataStorage() *MetadataStorage + func (ms *MetadataStorage) Clear(target any) + func (ms *MetadataStorage) Delete(target any, key MetadataKey) + func (ms *MetadataStorage) Get(target any, key MetadataKey) (any, bool) + func (ms *MetadataStorage) GetAll(target any) map[MetadataKey]any + func (ms *MetadataStorage) Has(target any, key MetadataKey) bool + func (ms *MetadataStorage) Set(target any, key MetadataKey, value any) + type MiddlewareFunc func(HandlerFunc) HandlerFunc + type Module interface + Configure func(builder *ModuleBuilder) + type ModuleBuilder struct + func (b *ModuleBuilder) Controllers(controllers ...any) *ModuleBuilder + func (b *ModuleBuilder) Exports(exports ...any) *ModuleBuilder + func (b *ModuleBuilder) Imports(modules ...Module) *ModuleBuilder + func (b *ModuleBuilder) Providers(providers ...Provider) *ModuleBuilder + type ModuleCompiler struct + func NewModuleCompiler() *ModuleCompiler + func (mc *ModuleCompiler) Compile(module Module) (*ModuleRef, error) + func (mc *ModuleCompiler) Get(module Module) (*ModuleRef, bool) + func (mc *ModuleCompiler) GetAll() []*ModuleRef + type ModuleMetadata struct + type ModuleRef struct + func (mr *ModuleRef) ExportProvider(providerType reflect.Type, instance any) + func (mr *ModuleRef) GetControllers() []ControllerRef + func (mr *ModuleRef) GetProvider(providerType reflect.Type) (any, bool) + func (mr *ModuleRef) Name() string + func (mr *ModuleRef) RegisterController(instance any) error + func (mr *ModuleRef) RegisterProvider(providerType reflect.Type, instance any) + type NestApplication struct + func (app *NestApplication) Close() error + func (app *NestApplication) GetMetadata() *MetadataStorage + func (app *NestApplication) GetRouter() *Router + func (app *NestApplication) Listen(addr string) error + type NestFactory struct + func (f NestFactory) Create(rootModule Module, opts ...ApplicationOption) *NestApplication + type OnApplicationBootstrap interface + OnApplicationBootstrap func(ctx context.Context) error + type OnApplicationShutdown interface + OnApplicationShutdown func(ctx context.Context) error + type OnModuleDestroy interface + OnModuleDestroy func(ctx context.Context) error + type OnModuleInit interface + OnModuleInit func(ctx context.Context) error + type ParameterMetadata struct + Description string + Name string + Required bool + Schema any + Type string + type Provider any + type RouteDefinition struct + Handler HandlerFunc + Method string + Middlewares []MiddlewareFunc + Path string + type RouteMetadata struct + Deprecated bool + Description string + Method string + Path string + Summary string + Tags []string + type Router struct + func NewRouter() *Router + func (r *Router) Delete(path string, handler HandlerFunc, middlewares ...MiddlewareFunc) + func (r *Router) Get(path string, handler HandlerFunc, middlewares ...MiddlewareFunc) + func (r *Router) Head(path string, handler HandlerFunc, middlewares ...MiddlewareFunc) + func (r *Router) Options(path string, handler HandlerFunc, middlewares ...MiddlewareFunc) + func (r *Router) Patch(path string, handler HandlerFunc, middlewares ...MiddlewareFunc) + func (r *Router) Post(path string, handler HandlerFunc, middlewares ...MiddlewareFunc) + func (r *Router) Put(path string, handler HandlerFunc, middlewares ...MiddlewareFunc) + func (r *Router) Register(route RouteDefinition) + func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (r *Router) Use(middleware MiddlewareFunc)