FaunaConfig.build constructor
FaunaConfig.build({})
Builds a FaunaConfig with sensible defaults. A FaunaDB secret
must be provided.
Docs on how to create a secret can be found here.
By default, baseUrl is https://db.fauna.com:443. This is the URL the FaunaClient will query.
Implementation
factory 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,
}) {
return FaunaConfig(
scheme: scheme,
domain: domain,
port: port ?? ((scheme == Scheme.HTTPS) ? 443 : 80),
secret: secret,
headers: headers,
timeout: timeout,
queryTimeout: queryTimeout,
);
}