2016-05-02 22:28:14 +00:00
|
|
|
part of angel_framework.http;
|
|
|
|
|
2016-06-21 22:56:04 +00:00
|
|
|
/// Annotation to map middleware onto a handler.
|
2016-05-02 22:28:14 +00:00
|
|
|
class Middleware {
|
|
|
|
final List handlers;
|
|
|
|
|
|
|
|
const Middleware(List this.handlers);
|
|
|
|
}
|
|
|
|
|
2016-06-21 22:56:04 +00:00
|
|
|
/// Annotation to set a service up to release hooks on every action.
|
2016-05-02 22:28:14 +00:00
|
|
|
class Hooked {
|
|
|
|
const Hooked();
|
2016-06-27 00:20:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Expose {
|
|
|
|
final String method;
|
|
|
|
final Pattern path;
|
|
|
|
final List middleware;
|
|
|
|
final String as;
|
|
|
|
final List<String> allowNull;
|
|
|
|
|
|
|
|
const Expose(Pattern this.path,
|
|
|
|
{String this.method: "GET",
|
|
|
|
List this.middleware: const [],
|
|
|
|
String this.as: null,
|
|
|
|
List<String> this.allowNull: const[]});
|
2016-05-02 22:28:14 +00:00
|
|
|
}
|