StorageDriverRegistry class

A registry for managing storage driver registrations.

Properties

drivers List<String>
Returns a list of all registered driver names.
no setter
entries Map<String, StorageDriverRegistration>
Provides direct access to the internal map of entries.
no setterinherited
entryNames Iterable<String>
An iterable of all entry names in the registry.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildDocContext(String driver, {required String pathBase}) StorageDriverDocContext
Builds a documentation context for driver rooted at pathBase.
builderFor(String driver) StorageDiskBuilder?
Retrieves the builder function for the storage driver with the given name.
clearEntries() → void
Clears all entries from the registry.
inherited
contains(String driver) bool
Checks if a storage driver with the given name is registered.
containsEntry(String name) bool
Checks if an entry with the given name exists in the registry.
inherited
createRegistration(StorageDiskBuilder builder, {DriverDocBuilder<StorageDriverDocContext>? documentation, StorageDriverValidator? validator, List<String> requiresConfig = const []}) → StorageDriverRegistration
Creates a registration object for the given driver builder.
documentation({required String pathBase}) List<ConfigDocEntry>
Collects documentation for every registered driver.
inherited
documentationFor(String driver, {required String pathBase}) List<ConfigDocEntry>
Collects documentation for a single driver, if provided.
inherited
driverNames({Iterable<String> include = const []}) Iterable<String>
Lists every driver name plus optional include identifiers.
inherited
duplicateDiagnostics(String name) String
Generates diagnostic information for duplicate entries with the given name.
inherited
entryOrigin(String name) StackTrace?
Retrieves the stack trace of the original registration for the given name.
inherited
getEntry(String name) → StorageDriverRegistration?
Retrieves the entry associated with the given name.
inherited
hasDriver(String name) bool
Whether a driver named name exists in the registry.
inherited
normalizeName(String name) String
Normalizes the given name by trimming and converting it to lowercase.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDuplicate(String name, StorageDriverRegistration existing, bool overrideExisting) bool
Handles duplicate entries with the given name and existing value.
register(String driver, StorageDiskBuilder builder, {StorageDriverDocBuilder? documentation, bool overrideExisting = true, StorageDriverValidator? validator, List<String> requiresConfig = const []}) → void
Registers a new storage driver.
registerDriver(String name, StorageDiskBuilder builder, {DriverDocBuilder<StorageDriverDocContext>? documentation, StorageDriverValidator? validator, List<String> requiresConfig = const [], bool overrideExisting = true}) bool
Registers builder under name, optionally attaching docs and validators.
inherited
registerDriverIfAbsent(String name, StorageDiskBuilder builder, {DriverDocBuilder<StorageDriverDocContext>? documentation, StorageDriverValidator? validator, List<String> requiresConfig = const []}) bool
Registers builder only when no existing driver uses name.
inherited
registerEntry(String name, StorageDriverRegistration value, {bool overrideExisting = true}) bool
Registers an entry with the given name and value.
inherited
registrationFor(String name) → StorageDriverRegistration?
Resolves the registration for name, or null when absent.
inherited
toString() String
A string representation of this object.
inherited
unregister(String driver) → void
Unregisters a storage driver by its name.
unregisterDriver(String name) → void
Removes the driver registered under name, if any.
inherited
unregisterEntry(String name) bool
Unregisters the entry with the given name.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance StorageDriverRegistry
The singleton instance of StorageDriverRegistry.
final