conduit
command line tool creates, runs and documents Conduit applications; manages database migrations; and manages OAuth client identifiers. Install by running pub global activate conduit
on a machine with Dart installed.handle
method. This method either returns a response or a request. If a response is returned, that response is sent to the client. If the request is returned, the linked controller handles the request.HandlerException
to provide error response customization for application-specific exceptions.POST /projects
, GET /projects
and GET /projects/1
- is mapped to methods in a subclass. Parameters of those methods are annotated to bind the values of the request when the method is invoked.ManagedObjectController<T>
s are ResourceController
s that automatically map a REST interface to database queries; e.g. POST
inserts a row, GET
gets all row of a type. They do not need to be subclassed, but can be to provide customization.Configuration
and declare a property for each key in your configuration file:config.yaml
, but can be changed at the command-line. You create an instance of your configuration from the configuration file path from your application options:conduit serve
command line tool. You can attach debugging and instrumentation tools and specify how many threads the application should run on:Query<T>
class configures and executes database queries. Its type argument determines what table is to be queried and the type of object you will work with in your code.WHERE
clause - are configured through a fluent, type-safe syntax. A property selector identifies which column of the table to apply an expression to. The following query fetches all project's due in the next week and includes their tasks by joining the related table.Query<T>
s can perform sorting, joining and paging queries.ManagedObject<T>
. A subclass maps to a table in the database, each instance maps to a row, and each property is a column. The following declaration will map to a table named _project
with columns id
, name
and dueDate
.ManagedObject<T>
s are serializable and can be directly read from a request body, or encoded as a response body.conduit db validate
to ensure the changes still yield the same schema. Be sure to keep generated files in version control.AuthServer
and its delegate as services in your application. The delegate is configurable and manages how tokens are generated and stored. By default, access tokens are a random 32-byte string and client identifiers, tokens and access codes are stored in your database using the ORM.AuthController
and AuthCodeController
. Authorizer
s are middleware that require a valid access token to access their linked controller.ApplicationChannel
to write log messages to the console or another medium.Agent
for executing requests. An Agent
can be configured to have default headers, and multiple agents can be used within the same test.conduit document
command.conduit document client
command creates a web page that can be used to configure issue requests specific to your application.