conduit library Null safety

The core libraries of the Conduit framework.

See documentation guides at https://conduit.io/docs/.

Classes

APIConfiguration
A Configuration to represent an external HTTP API.
Application<T extends ApplicationChannel>
This object starts and stops instances of your ApplicationChannel.
ApplicationChannel
An object that defines the behavior specific to your application.
ApplicationMessageHub
An object that sends and receives messages between ApplicationChannels.
ApplicationOptions
An object that contains configuration values for an Application.
ApplicationServer
Listens for HTTP requests and delivers them to its ApplicationChannel instance.
AuthBasicCredentials
A structure to hold Basic authorization credentials.
AuthClient
Represents an OAuth 2.0 client ID and secret pair.
AuthCode
Represents an OAuth 2.0 authorization code.
AuthCodeController
Controller for issuing OAuth 2.0 authorization codes.
AuthCodeControllerDelegate
Provides AuthCodeController with application-specific behavior.
AuthController
Controller for issuing and refreshing OAuth 2.0 access tokens.
Authorization
Authorization information for a Request after it has passed through an Authorizer.
AuthorizationBasicParser
Parses a Basic Authorization header.
AuthorizationBearerParser
Parses a Bearer token from an Authorization header.
AuthorizationParser<T>
Authorizer
A Controller that validates the Authorization header of a request.
AuthRedirectController
Controller for issuing OAuth 2.0 authorization codes and tokens.
AuthRedirectControllerDelegate
Provides AuthRedirectController with application-specific behavior.
AuthScope
Instances represent OAuth 2.0 scope.
AuthServer
A OAuth 2.0 authorization server.
AuthServerDelegate
The methods used by an AuthServer to store information and customize behavior related to authorization.
AuthToken
Represents an OAuth 2.0 token.
AuthValidator
Instances that implement this type can be used by an Authorizer to determine authorization of a request.
Bind
Binds elements of an HTTP request to a ResourceController's operation method arguments and properties.
BodyDecoder
Decodes bytes according to contentType.
CachePolicy
Instances of this type provide configuration for the 'Cache-Control' header.
ChannelRuntime
CodecRegistry
Provides encoding and decoding services based on the ContentType of a Request or Response.
Column
Metadata to describe the behavior of the underlying database column of a persistent property in ManagedObject subclasses.
ComparisonExpression
ConduitCompiler
Configuration
Subclasses of Configuration read YAML strings and files, assigning values from the YAML document to properties of an instance of this type.
ConfigurationCompiler
ConfigurationError
Thrown when Configuration subclass is invalid and requires a change in code.
ConfigurationException
Thrown when reading data into a Configuration fails.
ConfigurationItemAttribute
Configuration properties may be attributed with these.
ConfigurationRuntime
Controller
Base class for request handling objects.
ControllerRuntime
CORSPolicy
Describes a CORS policy for a Controller.
DatabaseConfiguration
A Configuration to represent a database connection configuration.
Document
Allows storage of unstructured data in a ManagedObject property.
FileController
Serves files from a directory on the filesystem.
KeyPath
Level
Levels to control logging output. Logging can be enabled to include all levels above certain Level. Levels are ordered using an integer value Level.value. The predefined Level constants below are sorted as follows (in descending order): Level.SHOUT, Level.SEVERE, Level.WARNING, Level.INFO, Level.CONFIG, Level.FINE, Level.FINER, Level.FINEST, and Level.ALL.
Linkable
An interface for linking controllers.
Logger
Use a Logger to log debug messages.
LogRecord
A log entry representation used to propagate information from Logger to individual handlers.
ManagedAttributeDescription
Stores the specifics of database columns in ManagedObjects as indicated by Column.
ManagedBacking
Instances of this class provide storage for ManagedObjects.
ManagedContext
A service object that handles connecting to and sending queries to a database.
ManagedDataModel
Instances of this class contain descriptions and metadata for mapping ManagedObjects to database rows.
ManagedEntity
Mapping information between a table in a database and a ManagedObject object.
ManagedEntityRuntime
ManagedObject<T>
An object that represents a database row.
ManagedObjectController<InstanceType extends ManagedObject>
A Controller that implements basic CRUD operations for a ManagedObject.
ManagedPropertyDescription
Contains database column information and metadata for a property of a ManagedObject object.
ManagedRelationshipDescription
Contains information for a relationship property of a ManagedObject.
ManagedSet<InstanceType extends ManagedObject>
Instances of this type contain zero or more instances of ManagedObject and represent has-many relationships.
ManagedType
Complex type storage for ManagedEntity attributes.
ManagedValidator
Validates properties of ManagedObject before an insert or update Query.
Migration
The base class for migration instructions.
NullCheckExpression
Operation
Binds an instance method in ResourceController to an operation.
PersistentStore
An interface for implementing persistent storage.
PredicateExpression
Query<InstanceType extends ManagedObject>
An object for configuring and executing a database query.
QueryController<InstanceType extends ManagedObject>
A partial class for implementing an ResourceController that has a few conveniences for executing Querys.
QueryExpression<T, InstanceType>
Contains methods for adding logical expressions to properties when building a Query.
QueryExpressionJunction<T, InstanceType>
Contains binary logic operations to be applied to a QueryExpression.
QueryMixin<InstanceType extends ManagedObject>
QueryPredicate
A predicate contains instructions for filtering rows when performing a Query.
QueryReduceOperation<T extends ManagedObject>
Executes aggregate functions like average, count, sum, etc.
RangeExpression
Recyclable<T>
An interface that Controller subclasses implement to generate a controller for each request.
Relate
Metadata to configure property of ManagedObject as a foreign key column.
Request
A single HTTP request.
RequestBody
Objects that represent a request body, and can be decoded into Dart objects.
RequestOrResponse
The unifying protocol for Request and Response classes.
RequestPath
Stores path info for a Request.
RequiredBinding
See requiredBinding.
ResourceController
Controller for operating on an HTTP Resource.
ResourceControllerDocumenter
ResourceControllerOperation
ResourceControllerOperationInvocationArgs
ResourceControllerParameter
ResourceControllerRuntime
ResourceOwner
The properties of an OAuth 2.0 Resource Owner.
Response
Represents the information in an HTTP response.
ResponseKey
An annotation used to specify how a field is serialized in API responses.
ResponseModel
An annotation used to specify how a Model is serialized in API responses.
Rollback
Throw this object to roll back a ManagedContext.transaction.
RouteNode
Router
Determines which Controller should receive a Request based on its path.
RouteSegment
RouteSpecification
Specifies a matchable route path.
Schema
A portable representation of a database schema.
SchemaBuilder
Generates SQL or Dart code that modifies a database schema.
SchemaColumn
A portable representation of a database column.
SchemaColumnDifference
The difference between two compared SchemaColumns.
SchemaDifference
The difference between two compared Schemas.
SchemaTable
A portable representation of a database table.
SchemaTableDifference
The difference between two SchemaTables.
SchemaTableUniqueSetDifference
Difference between two SchemaTable.uniqueColumnSets.
Scope
Allows ResourceControllers to have different scope for each operation method.
Serializable
Interface for serializable instances to be decoded from an HTTP request body and encoded to an HTTP response body.
SerializableRuntime
Serialize
Annotation for ManagedObject properties that allows them to participate in ManagedObject.asMap and/or ManagedObject.readFromMap.
SetMembershipExpression
StringExpression
Table
Annotation to configure the table definition of a ManagedObject.
Validate
Add as metadata to persistent properties to validate their values before insertion or updating.
ValidationContext
Information about a validation being performed.

Constants

defaultLevel → const Level
The default Level.
Level.INFO
optionalConfiguration → const ConfigurationItemAttribute
A ConfigurationItemAttribute for optional properties.
ConfigurationItemAttribute._(ConfigurationItemAttributeType.optional)
primaryKey → const Column
Primary key annotation for a ManagedObject table definition property.
Column(primaryKey: true, databaseType: ManagedPropertyType.bigInteger, autoincrement: true, validators: [Validate.constant()])
requiredBinding → const RequiredBinding
Marks an ResourceController property binding as required.
requiredConfiguration → const ConfigurationItemAttribute
A ConfigurationItemAttribute for required properties.
ConfigurationItemAttribute._(ConfigurationItemAttributeType.required)

Properties

hierarchicalLoggingEnabled bool
Whether to allow fine-grain logging and configuration of loggers in a hierarchy.
read / write
recordStackTraceAtLevel Level
Automatically record stack traces for any message of this level or above.
read / write

Functions

generateAPICredentialPair(String? clientID, String? secret, {String? redirectURI, int hashLength = 32, int hashRounds = 1000, Hash? hashFunction}) AuthClient
A utility method to generate a ClientID and Client Secret Pair.
generatePasswordHash(String password, String salt, {int hashRounds = 1000, int hashLength = 32, Hash? hashFunction}) String
A utility method to generate a password hash using the PBKDF2 scheme.
generateRandomSalt({int hashLength = 32}) String
A utility method to generate a random base64 salt.
randomStringOfLength(int length) String
startApplication<T extends ApplicationChannel>(Application<T> app, int isolateCount, SendPort parentPort) Future

Enums

AuthorizationParserExceptionReason
The reason either AuthorizationBearerParser or AuthorizationBasicParser failed.
AuthRequestError
The possible errors as defined by the OAuth 2.0 specification.
BindingType
ConfigurationItemAttributeType
Possible options for a configuration item property's optionality.
DeleteRule
Possible values for a delete rule in a Relate.
ManagedPropertyType
Possible data types for ManagedEntity attributes.
ManagedRelationshipType
The possible database relationships.
PersistentStoreQueryReturnType
PredicateOperator
The operator in a comparison matcher.
PredicateStringOperator
The operator in a string matcher.
QueryExceptionEvent
Categorizations of query failures for QueryException.
QuerySortOrder
Order value for Query.pageBy and Query.sortBy.
Validating
Types of operations ManagedValidators will be triggered for.

Exceptions / Errors

ApplicationStartupException
Thrown when an application encounters an exception during startup.
AuthorizationParserException
An exception indicating why Authorization parsing failed.
AuthServerException
An exception thrown by AuthServer.
HandlerException
HTTPStreamingException
ManagedDataModelError
Thrown when a ManagedDataModel encounters an error.
MigrationException
Thrown when Migration encounters an error.
QueryException<T>
An exception describing an issue with a query.
SchemaException
Thrown when a Schema encounters an error.
SerializableException
ValidateCompilationError
An error thrown during validator compilation.
ValidationException
An exception thrown when an ORM property validator is violated.