fennec library
Fennec is a dart web framework with the principal goal make web server side more easy and fast to develop.
Classes
- Actor
- Actor is an abstract superclass, where all their subclasses will be executed separately in each instance. Actor is used to ensure sharing Data between multiples Isolates. All subclasses of Actor will be accessible in each server Instance.
- ActorAction
- ActorAction is an abstract class to determine different Agent Actions.
- ActorContainer
- ActorContainer used to send different events to connected Agents depending on Action using SendPort
- ActorContainers
- ActorContainers contains all ActorContainer that are used to send Data to actors
- ActorDisposed
- ActorEvent
- ActorExecution
- ActorGet
- ActorGetInstance
- ActorGetResult
- ActorInitialized
- ActorInitState
- Actors
- Actors is used to initialize all Connected Actors.
- ActorTaskHandler
- Application
- Application is a class that contains the application.
- ARoute
- ARouter
- AuthenticationProvider
- AuthenticationProvider is a abstract class that contains the authentication provider.
- BodyParser
- BodyParser is a class that contains the body parser. It's used to parse the body of the request.
- CorsOptions
- Engine
- Engine is a class that contains the engine.
-
ExceptionAndErrorResponse<
T extends FennecException, V extends FennecError> - FileInfo
- FileInfo is a class that contains information about the file.
- FileRepository
- FileRepository is a abstract class that contains the file repository.
- FileRepositoryImpl
- FileRepositoryImpl is a class that contains the file repository implementation.
- HtmlEngine
- HtmlEngine is a class that contains the html engine. It's used to get the html engine.
- IsolateAction
- IsolateContext
- IsolateDispose
- IsolateDisposed
- IsolateError
- IsolateEvent
- IsolateEvent is an abstract class to define all Event of Isolate.
- IsolateHandler
- IsolateHandler is a class for handling different events between isolates.
- IsolateInitialized
- IsolatePause
- IsolatePaused
- IsolateResume
- IsolateResumed
- IsolateServerInfo
-
IsolateServerIfo
a class that contains an instance of ServerInfo that will be shared between isolates. - IsolateSpawnMessage
- IsolateStart
- IsolateStarted
- IsolateStop
- IsolateStopped
- IsolateSupervisor
- IsolateTaskHandler
- IsolateTaskHandler is an abstract class that will handle different Task of isolates.
- Middleware
- Middleware is an abstract class that contains the response of the middleware
- MiddleWareResponse
- MiddleWareResponse is a class that contains the response of the middleware
- Next
- Request
- Request is a class that contains information about the request. It's used to get information about the request.
- RequestMethod
- RequestMethod is a class that contains information about the request method.
- Response
- Response is a class that contains the response of the server. It's used to get the response of the server.
- Route
- Router
- RoutesHandler
- RoutesHandler is a class that is used to handle routes.
- Server
- Server is a class that contains information about the server.
- ServerConfig
- ServerContext
- ServerInfo
- ServerInfo is a class that contains information about the server. It's used to get information about the server.
- ServerInput
- ServerTaskHandler
- Stop
- TemplateRender
- TemplateRender is a class that will be used to rendering templates with html extensions and contains caching if it's enabled.
-
TypeHelper<
T> - UpgradedWebSocket
- UpgradedWebSocket is a class that contains the upgraded websocket. It's used to get the upgraded websocket.
- UserDetails
- UserDetails is a abstract class that contains the user details.
- UserRepository
- UserRepository is a abstract class that contains the user repository.
- Utils
- View
- View is a class that contains the view.
- WebsocketRoute
Enums
- MiddleWareResponseEnum
-
MiddleWareResponseEnum is a
enum
that contains the different response types of the middleware.
Functions
-
badRequestException(
HttpResponse response, String message) → void -
cors(
CorsOptions corsOptions) → FutureOr< Middleware> Function(Request request, Response response) -
isPreflight(
Request req) → bool -
methodNotAllowedException(
HttpResponse response, String path, String method) → void - methodNotAllowedException is a public function that is used throw a method not allowed exception.
-
routeNotFoundException(
HttpResponse response, String path, String method) → void - routeNotFoundException is a public function that is used throw a route not found exception.
Typedefs
-
EngineHandler
= dynamic Function(String filePath, Map<
String, dynamic> ? locals, EngineHandlerCallback cb, Map<String, dynamic> ? parameters) -
EngineHandler is a
typedef
that is used to define a Engine Handler.filePath
is a String that is the file path.locals
is a Map that is the locals.cb
is a EngineHandlerCallback that is the callback. - EngineHandlerCallback = dynamic Function(dynamic e, String? rendered)
-
EngineHandlerCallback is a
typedef
that is used to define a callback for Engine Handler. -
IsolateMessageHandler<
T> = FutureOr< void> Function(T message) -
MiddlewareHandler
= FutureOr<
Middleware> Function(ServerContext serverContext, Request req, Response res) -
MiddlewareHandler is a
typedef
.req
is a Request that is the request.res
is a Response that is the response. returns FutureOr of Next. -
MiddleWareRequestByLoadUser
= FutureOr<
UserDetails?> Function(Request req, Response res, AuthenticationProvider authenticationProvider) -
MiddleWareRequestByLoadUser is a
typedef
that is used to define a callback.req
is a Request that is the request.res
is a Response that is the response.authenticationProvider
is a AuthenticationProvider that is the authentication provider. -
RequestHandler
= FutureOr<
Response> Function(ServerContext serverContext, Request req, Response res) -
RequestHandler is a
typedef
that is used to define a callback for a request.req
is a Request that is the request.res
is a Response that is the response. - RouteNotFoundException = void Function(Response response, String path, String method)
-
RouteNotFoundException is a
typedef
.response
is a Response that is the response.path
is a String that is the path.method
is a String that is the method name. - RouterInitState = FutureOr Function(ServerContext serverContext)
-
SocketIOHandler
= FutureOr<
void> Function(ServerContext serverContext, HttpRequest request) -
WebsocketHandler
= FutureOr<
void> Function(ServerContext serverContext, HttpRequest request)
Exceptions / Errors
- FennecError
- FennecException
- UserNotFoundException
- UserNotFoundException is a class that is used to define a user not found exception. it implements Exception. message is a String that contains the message.
- ViewException
- ViewException is a class that is used to define a view exception. it implements Error. view is a View that contains the view. directory is a String that contains the directory.