Route class

Constructors

Route({String? host, String? id, List<String> middlewares = const [], String? pathPrefix, int? priority, String? service, bool? tls})
Returns a new Route instance.

Properties

hashCode → int
The hash code for this object.
no setteroverride
host ↔ String?
Host is the exact hostname this route matches, lowercased with any trailing dot stripped. It is a GLOBALLY unique claim — one route across the whole edge may hold a host, so no tenant can hijack another's.
getter/setter pair
id ↔ String?
ID identifies the route within the org: A-Za-z0-9-_., at most 128 chars. A create that omits it gets a generated one.
getter/setter pair
middlewares ↔ List<String>
Middlewares are the ids of the edge transforms to apply, in this order, before the request reaches the service. At most 16.
getter/setter pair
pathPrefix ↔ String?
PathPrefix narrows the match to requests under this path; it must start with "/". Empty matches every path on the host.
getter/setter pair
priority ↔ int?
Priority orders routes that share a host: higher wins, and equal priorities fall back to the longer PathPrefix.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
service ↔ String?
Service is the id of the backend pool this route dispatches to. A route naming a service that does not exist is skipped at compile, not served.
getter/setter pair
tls ↔ bool?
TLS asks the edge to terminate TLS for Host with an ACME-managed certificate.
getter/setter pair

Methods

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

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Route?
Returns a new Route instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Route>
mapFromJson(dynamic json) → Map<String, Route>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Route>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.