conduitcommand line tool creates, runs and documents Conduit applications; manages database migrations; and manages OAuth client identifiers. Install by running
pub global activate conduiton a machine with Dart installed.
handlemethod. 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.
HandlerExceptionto provide error response customization for application-specific exceptions.
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.
ResourceControllers that automatically map a REST interface to database queries; e.g.
POSTinserts a row,
GETgets all row of a type. They do not need to be subclassed, but can be to provide customization.
Configurationand 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 servecommand 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.
WHEREclause - 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
ManagedObject<T>s are serializable and can be directly read from a request body, or encoded as a response body.
conduit db validateto ensure the changes still yield the same schema. Be sure to keep generated files in version control.
AuthServerand 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.
Authorizers are middleware that require a valid access token to access their linked controller.
ApplicationChannelto write log messages to the console or another medium.
Agentfor executing requests. An
Agentcan be configured to have default headers, and multiple agents can be used within the same test.
conduit document clientcommand creates a web page that can be used to configure issue requests specific to your application.