Module class abstract

A Module represents a context of your software. Each Module have its own controllers and middlewares.
A Module needs to be extended and its preffix property will declare a part of your routes.

class AnyModule extends Module{
 AnyModule({super.preffix = "any"})

...
}

The example above will make every route inside any controller of it follow this format: /any/controller/route

Implementers

Constructors

Module.new({String? preffix, List<RestController> controllers = const [], List<HttpMiddleware> middlewares = const [], Future<void> init()?})

Properties

controllers List<RestController>
final
hashCode int
The hash code for this object.
no setterinherited
init Future<void> Function()?
This function will be executed when module is parsed, when application is upping.
You can use it to inject global scoped dependencies, for example.
final
middlewares List<HttpMiddleware>
final
preffix String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited