FaunaConfig class

Configuration for a FaunaClient.

It is recommended to use FaunaConfig.build to build a configuration.

Constructors

FaunaConfig({required String secret, Scheme scheme = Scheme.HTTPS, String domain = 'db.fauna.com', int port = 443, Map<String, String> headers = const <String, String>{}, Duration timeout = const Duration(minutes: 1), Duration? queryTimeout})
FaunaConfig.build({required String secret, Scheme scheme = Scheme.HTTPS, String domain = 'db.fauna.com', int? port, Map<String, String> headers = const {}, Duration timeout = const Duration(minutes: 1), Duration? queryTimeout})
Builds a FaunaConfig with sensible defaults. A FaunaDB secret must be provided.
factory

Properties

authToken String
Base64 encoded Basic auth token. Built from secret.
no setter
baseUrl Uri
The computed URL to send query requests to. Built from scheme, domain, port.
no setter
domain String
FaunaDB URL domain.
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
HTTP request headers.
final
port int
FaunaDB URL port.
final
queryTimeout Duration?
Max amount of time to wait for query execution on server.
final
requestHeaders Map<String, String>
Headers that are applied to every request this client makes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheme Scheme
FaunaDB URL scheme (http, https).
final
secret String
FaunaDB secret.
final
timeout Duration
Max amount of time to wait for query response.
final

Methods

merge(FaunaConfig mergeWith) FaunaConfig
Returns a FaunaConfig created by merging this configuration with mergeWith.
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

Constants

APIVersion → const int
Query API Version to target.