api_dartdoku library

api_dartdoku

A conduit web server.

Classes

APIConfiguration
A Configuration to represent an external HTTP API.
ApiDartdokuChannel
This type initializes an application.
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.
AuthUtility
Exposes static utility methods for password, salt and API credential generation.
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.
BytesBuilder
Builds a list of bytes, allowing bytes and lists of bytes to be added at the end.
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.
Completer<T>
A way to produce Future objects and to complete them later with a value or error.
CompressionOptions
Options controlling compression in a WebSocket.
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
ConnectionTask<S>
A cancelable connection attempt.
ContentType
A MIME/IANA media type used as the value of the HttpHeaders.contentTypeHeader header.
Controller
Base class for request handling objects.
ControllerRuntime
Representation of a cookie. For cookies received by the server as Cookie header values only name and value properties will be set. When building a cookie for the 'set-cookie' header in the server and when receiving cookies in the client as 'set-cookie' headers all fields can be used.
CORSPolicy
Describes a CORS policy for a Controller.
DatabaseConfiguration
A Configuration to represent a database connection configuration.
Datagram
A data packet received by a RawDatagramSocket.
Directory
A reference to a directory (or folder) on the file system.
Document
Allows storage of unstructured data in a ManagedObject property.
EventSink<T>
A Sink that supports adding errors.
File
A reference to a file on the file system.
FileController
Serves files from a directory on the filesystem.
FileLock
Type of lock when requesting a lock on a file.
FileMode
The modes in which a File can be opened.
FileStat
The result of calling the POSIX stat() function on a file system object.
FileSystemCreateEvent
File system event for newly created file system objects.
FileSystemDeleteEvent
File system event for deletion of file system objects.
FileSystemEntity
The common superclass of File, Directory, and Link.
FileSystemEntityType
The type of an entity on the file system, such as a file, directory, or link.
FileSystemEvent
Base event class emitted by FileSystemEntity.watch.
FileSystemModifyEvent
File system event for modifications of file system objects.
FileSystemMoveEvent
File system event for moving of file system objects.
Future<T>
The result of an asynchronous computation.
FutureOr<T>
A type representing values that are either Future<T> or T.
GZipCodec
The GZipCodec encodes raw bytes to GZip compressed bytes and decodes GZip compressed bytes to raw bytes.
HeaderValue
Representation of a header value in the form:
HelloController
HttpClient
An HTTP client for communicating with an HTTP server.
HttpClientBasicCredentials
Represents credentials for basic authentication.
HttpClientCredentials
HttpClientDigestCredentials
Represents credentials for digest authentication. Digest authentication is only supported for servers using the MD5 algorithm and quality of protection (qop) of either "none" or "auth".
HttpClientRequest
HTTP request for a client connection.
HttpClientResponse
HTTP response for a client connection.
HttpConnectionInfo
Information about an HttpRequest, HttpResponse, HttpClientRequest, or HttpClientResponse connection.
HttpConnectionsInfo
Summary statistics about an HttpServers current socket connections.
HttpDate
Utility functions for working with dates with HTTP specific date formats.
HttpHeaders
Headers for HTTP requests and responses.
HttpOverrides
This class facilitates overriding HttpClient with a mock implementation. It should be extended by another class in client code with overrides that construct a mock implementation. The implementation in this base class defaults to the actual HttpClient implementation. For example:
HttpRequest
A server-side object that contains the content of and information about an HTTP request.
HttpResponse
An HTTP response, which returns the headers and data from the server to the client in response to an HTTP request.
HttpServer
A server that delivers content, such as web pages, using the HTTP protocol.
HttpSession
The HttpRequest.session of an HttpRequest.
HttpStatus
HTTP status codes. Exported in dart:io and dart:html.
InternetAddress
An internet address or a Unix domain address.
InternetAddressType
The type, or address family, of an InternetAddress.
IOOverrides
Facilities for overriding various APIs of dart:io with mock implementations.
IOSink
A combined byte and text output.
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.
References to filesystem links.
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.
MultiStreamController<T>
An enhanced stream controller provided by Stream.multi.
NetworkInterface
A NetworkInterface represents an active network interface on the current system. It contains a list of InternetAddresses that are bound to the interface.
Operation
Binds an instance method in ResourceController to an operation.
PersistentStore
An interface for implementing persistent storage.
Pipe
An anonymous pipe that can be used to send data in a single direction i.e. data written to write can be read using read.
Platform
Information about the environment in which the current program is running.
PostgreSQLErrorCode
Commonly used error codes from PostgreSQL.
PostgreSQLPersistentStore
The database layer responsible for carrying out Querys against PostgreSQL databases.
Process
The means to execute a program.
ProcessInfo
Methods for retrieving information about the current process.
ProcessResult
The result of running a non-interactive process started with Process.run or Process.runSync.
ProcessSignal
On Posix systems, ProcessSignal is used to send a specific signal to a child process, see Process.kill.
ProcessStartMode
Modes for running a new process.
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.
QueryPredicate
A predicate contains instructions for filtering rows when performing a Query.
QueryReduceOperation<T extends ManagedObject>
Executes aggregate functions like average, count, sum, etc.
RandomAccessFile
Random access to the data in a file.
RawDatagramSocket
An unbuffered interface to a UDP socket.
RawSecureServerSocket
A server socket providing a stream of low-level RawSecureSockets.
RawSecureSocket
RawSecureSocket provides a secure (SSL or TLS) network connection.
RawServerSocket
A listening socket.
RawSocket
A TCP connection.
RawSocketEvent
Events for the RawDatagramSocket, RawSecureSocket, and RawSocket.
RawSocketOption
The RawSocketOption is used as a parameter to Socket.setRawOption and RawSocket.setRawOption to customize the behaviour of the underlying socket.
RawSynchronousSocket
A low-level class for communicating synchronously over a TCP socket.
RawZLibFilter
The RawZLibFilter class provides a low-level interface to zlib.
ReadPipe
The "read" end of an Pipe created by Pipe.create.
Recyclable<T>
An interface that Controller subclasses implement to generate a controller for each request.
RedirectInfo
Redirect information.
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
ResourceHandle
A wrapper around OS resource handle so it can be passed via Socket as part of SocketMessage.
ResourceOwner
The properties of an OAuth 2.0 Resource Owner.
Response
Represents the information in an HTTP response.
Rollback
Throw this object to roll back a ManagedContext.transaction.
Router
Determines which Controller should receive a Request based on its path.
SameSite
Cookie cross-site availability configuration.
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.
SecureServerSocket
A server socket, providing a stream of high-level Sockets.
SecureSocket
A TCP socket using TLS and SSL.
SecurityContext
The object containing the certificates to trust when making a secure client connection, and the certificate chain and private key to serve from a secure server.
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.
ServerSocket
A listening socket.
ServiceRegistry
An object that manages the cleanup of service objects when an application is stopped.
Socket
A TCP connection between two sockets.
SocketControlMessage
Control message part of the SocketMessage received by a call to RawSocket.readMessage.
SocketDirection
The SocketDirection is used as a parameter to Socket.close and RawSocket.close to close a socket in the specified direction(s).
SocketMessage
A socket message received by a RawDatagramSocket.
SocketOption
An option for a socket which is configured using Socket.setOption.
Stdin
The standard input stream of the process.
StdioType
The type of object a standard IO stream can be attached to.
Stdout
An IOSink connected to either the standard out or error of the process.
Stream<T>
A source of asynchronous data events.
StreamConsumer<S>
Abstract interface for a "sink" accepting multiple entire streams.
StreamController<T>
A controller with the stream it controls.
StreamIterator<T>
An Iterator-like interface for the values of a Stream.
StreamSink<S>
A object that accepts stream events both synchronously and asynchronously.
StreamSubscription<T>
A subscription on events from a Stream.
StreamTransformer<S, T>
Transforms a Stream.
StreamTransformerBase<S, T>
Base class for implementing StreamTransformer.
StreamView<T>
Stream wrapper that only exposes the Stream interface.
SudokuController
SynchronousStreamController<T>
A stream controller that delivers its events synchronously.
SystemEncoding
The system encoding is the current code page on Windows and UTF-8 on Linux and Mac.
Table
Annotation to configure the table definition of a ManagedObject.
Timer
A countdown timer that can be configured to fire once or repeatedly.
Validate
Add as metadata to persistent properties to validate their values before insertion or updating.
ValidationContext
Information about a validation being performed.
WebSocket
A two-way HTTP communication object for client or server applications.
WebSocketStatus
WebSocket status codes used when closing a WebSocket connection.
WebSocketTransformer
The WebSocketTransformer provides the ability to upgrade a HttpRequest to a WebSocket connection. It supports both upgrading a single HttpRequest and upgrading a stream of HttpRequests.
WritePipe
The "write" end of an Pipe created by Pipe.create.
X509Certificate
X509Certificate represents an SSL certificate, with accessors to get the fields of the certificate.
ZLibCodec
The ZLibCodec encodes raw bytes to ZLib compressed bytes and decodes ZLib compressed bytes to raw bytes.
ZLibDecoder
The ZLibDecoder is used by ZLibCodec and GZipCodec to decompress data.
ZLibEncoder
The ZLibEncoder encoder is used by ZLibCodec and GZipCodec to compress data.
ZLibOption
Exposes ZLib options for input parameters.
Zone
A zone represents an environment that remains stable across asynchronous calls.
ZoneDelegate
An adapted view of the parent zone.
ZoneSpecification
A parameter object with custom zone function handlers for Zone.fork.

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.
HttpClientResponseCompressionState
Enum that specifies the compression state of the byte stream of an HttpClientResponse.
ManagedPropertyType
Possible data types for ManagedEntity attributes.
ManagedRelationshipType
The possible database relationships.
PersistentStoreQueryReturnType
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.

Extensions

FutureExtensions on Future<T>
Convenience methods on futures.
FutureIterable on Iterable<Future<T>>
FutureRecord2 on (Future<T1>, Future<T2>)
Parallel operations on a record of futures.
FutureRecord3 on (Future<T1>, Future<T2>, Future<T3>)
Parallel operations on a record of futures.
FutureRecord4 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>)
Parallel operations on a record of futures.
FutureRecord5 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>)
Parallel operations on a record of futures.
FutureRecord6 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>)
Parallel operations on a record of futures.
FutureRecord7 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>)
Parallel operations on a record of futures.
FutureRecord8 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>)
Parallel operations on a record of futures.
FutureRecord9 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>, Future<T9>)
Parallel operations on a record of futures.

Constants

defaultLevel → const Level
The default Level.
gzip → const GZipCodec
An instance of the default implementation of the GZipCodec.
optionalConfiguration → const ConfigurationItemAttribute
A ConfigurationItemAttribute for optional properties.
primaryKey → const Column
Primary key annotation for a ManagedObject table definition property.
requiredBinding → const RequiredBinding
Marks an ResourceController property binding as required.
requiredConfiguration → const ConfigurationItemAttribute
A ConfigurationItemAttribute for required properties.
systemEncoding → const SystemEncoding
The current system encoding.
zlib → const ZLibCodec
An instance of the default implementation of the ZLibCodec.

Properties

exitCode int
Get the global exit code for the Dart VM.
getter/setter pair
hierarchicalLoggingEnabled bool
Whether to allow fine-grain logging and configuration of loggers in a hierarchy.
getter/setter pair
pid int
Returns the PID of the current process.
no setter
recordStackTraceAtLevel Level
Automatically record stack traces for any message of this level or above.
getter/setter pair
stderr Stdout
The standard output stream of errors written by this program.
no setter
stdin Stdin
The standard input stream of data read by this program.
no setter
stdout Stdout
The standard output stream of data written by this program.
no setter

Functions

exit(int code) → Never
Exit the Dart VM process immediately with the given exit code.
getHour(int hour) int
getMonth(int month) String
getWeekday(int weekday) String
runZoned<R>(R body(), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification, Function? onError}) → R
Runs body in its own zone.
runZonedGuarded<R>(R body(), void onError(Object error, StackTrace stack), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification}) → R?
Runs body in its own error zone.
scheduleMicrotask(void callback()) → void
Runs a function asynchronously.
sleep(Duration duration) → void
Sleep for the duration specified in duration.
stdioType(dynamic object) StdioType
Whether a stream is attached to a file, pipe, terminal, or something else.
unawaited(Future<void>? future) → void
Explicitly ignores a future.

Typedefs

BadCertificateCallback = bool Function(X509Certificate cr, String host, int port)
ControllerCallback = void Function()
Type of a stream controller's onListen, onPause and onResume callbacks.
ControllerCancelCallback = FutureOr<void> Function()
Type of stream controller onCancel callbacks.
CreatePeriodicTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer))
The type of a custom Zone.createPeriodicTimer implementation function.
CreateTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration duration, void f())
The type of a custom Zone.createTimer implementation function.
ErrorCallbackHandler = AsyncError? Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace? stackTrace)
The type of a custom Zone.errorCallback implementation function.
ForkHandler = Zone Function(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification? specification, Map<Object?, Object?>? zoneValues)
The type of a custom Zone.fork implementation function.
HandleUncaughtErrorHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace)
The type of a custom Zone.handleUncaughtError implementation function.
PrintHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, String line)
The type of a custom Zone.print implementation function.
RegisterBinaryCallbackHandler = ZoneBinaryCallback<R, T1, T2> Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2))
The type of a custom Zone.registerBinaryCallback implementation function.
RegisterCallbackHandler = ZoneCallback<R> Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.registerCallback implementation function.
RegisterUnaryCallbackHandler = ZoneUnaryCallback<R, T> Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg))
The type of a custom Zone.registerUnaryCallback implementation function.
RunBinaryHandler = R Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2), T1 arg1, T2 arg2)
The type of a custom Zone.runBinary implementation function.
RunHandler = R Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.run implementation function.
RunUnaryHandler = R Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg)
The type of a custom Zone.runUnary implementation function.
ScheduleMicrotaskHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, void f())
The type of a custom Zone.scheduleMicrotask implementation function.
ZoneBinaryCallback<R, T1, T2> = R Function(T1, T2)
ZoneCallback<R> = R Function()
ZoneUnaryCallback<R, T> = R Function(T)

Exceptions / Errors

ApplicationStartupException
Thrown when an application encounters an exception during startup.
AsyncError
An error and a stack trace.
AuthorizationParserException
An exception indicating why Authorization parsing failed.
AuthServerException
An exception thrown by AuthServer.
AuthUtilityException
CertificateException
An exception that happens in the handshake phase of establishing a secure network connection, when looking up or verifying a certificate.
DeferredLoadException
Thrown when a deferred library fails to load.
FileSystemException
Exception thrown when a file operation fails.
HandlerException
HandshakeException
An exception that happens in the handshake phase of establishing a secure network connection.
HttpException
HTTPStreamingException
IOException
Base class for all IO related exceptions.
ManagedDataModelError
Thrown when a ManagedDataModel encounters an error.
MigrationException
Thrown when Migration encounters an error.
OSError
An Exception holding information about an error from the operating system.
ParallelWaitError<V, E>
Error thrown when waiting for multiple futures, when some have errors.
PathAccessException
Exception thrown when a file operation fails because the necessary access rights are not available.
PathExistsException
Exception thrown when a file operation fails because the target path already exists.
PathNotFoundException
Exception thrown when a file operation fails because a file or directory does not exist.
ProcessException
QueryException<T>
An exception describing an issue with a query.
RedirectException
SchemaException
Thrown when a Schema encounters an error.
SerializableException
SignalException
SocketException
Exception thrown when a socket operation fails.
StdinException
Exception thrown by some operations of Stdin
StdoutException
Exception thrown by some operations of Stdout
TimeoutException
Thrown when a scheduled timeout happens while waiting for an async result.
TlsException
A secure networking exception caused by a failure in the TLS/SSL protocol.
ValidateCompilationError
An error thrown during validator compilation.
ValidationException
An exception thrown when an ORM property validator is violated.
WebSocketException