MongoConfig constructor

MongoConfig({
  1. String? host,
  2. List<String>? hosts,
  3. String? replica,
  4. required String database,
  5. String? user,
  6. String? password,
  7. bool secure = false,
})

Implementation

MongoConfig({
	this.host,
	this.hosts,
	this.replica,
	required this.database,
	this.user,
	this.password,
	this.secure = false,
}) {
	if (replica != null && hosts == null) throw Exception('Using MongoDB replica requires host list to be set');
	if (replica == null && host == null) throw Exception('MongoDB host parameter is not set');
}