serverpod
library
Classes
$UndefinedBit
An omitted bit-vector argument in generated copyWith methods.
$UndefinedDateTime
An omitted date-time argument in generated copyWith methods.
$UndefinedDuration
An omitted duration argument in generated copyWith methods.
$UndefinedGeographyGeometryCollection
An omitted geography collection argument in generated copyWith methods.
$UndefinedGeographyLineString
An omitted geography line-string argument in generated copyWith methods.
$UndefinedGeographyPoint
An omitted geography point argument in generated copyWith methods.
$UndefinedGeographyPolygon
An omitted geography polygon argument in generated copyWith methods.
$UndefinedHalfVector
An omitted half-vector argument in generated copyWith methods.
$UndefinedList <T >
An omitted list argument in generated copyWith methods.
$UndefinedMap <K , V >
An omitted map argument in generated copyWith methods.
$UndefinedSet <T >
An omitted set argument in generated copyWith methods.
$UndefinedSparseVector
An omitted sparse-vector argument in generated copyWith methods.
$UndefinedUri
An omitted URI argument in generated copyWith methods.
$UndefinedUuidValue
An omitted UUID argument in generated copyWith methods.
$UndefinedVector
An omitted vector argument in generated copyWith methods.
A class representing the HTTP Accept-Encoding header.
A class representing the HTTP Accept header.
A class representing the HTTP Accept-Language header.
A class representing the HTTP Accept-Ranges header.
A class representing the HTTP Access-Control-Allow-Headers header.
A class representing the HTTP Access-Control-Allow-Methods header.
The HTTP Access-Control-Allow-Origin response header.
A class representing the HTTP Access-Control-Expose-Headers header.
AccessorState <K , R >
Holds the externalized state for ReadOnlyAccessor instances in a map.
Adapter
An interface for adapters that bridge Relic to specific server implementations.
AdapterCapabilities
What an Adapter can do beyond a plain request and response.
AdapterExchange
One request and its response.
AnyExpression <T >
A database expression that returns all rows where any of the related rows
match the filtering criteria.
AsEventHandler <T extends DiagnosticEvent >
Adapter class to use an EventHandlerFunction as a DiagnosticEventHandler .
Since this class inherits TypedEventHandler it can filter on event type.
A class representing the HTTP Authentication header.
AuthenticationInfo
Holds the id for an authenticated user and which scopes it can access.
Allowed scopes are defined for each Endpoint .
AuthenticationParameter
A class representing a key-value pair parameter for authentication.
An abstract base class representing an HTTP Authorization header.
BadRequestMessage
A message sent when a bad request is received.
BaseMigrationArtifactStore
Base class for a migration artifacts storage.
Represents Basic authentication using a username and password.
Represents a Bearer token for HTTP Authorization.
BinaryDataReceived
Binary data received from the peer through the WebSocket.
BinaryUploadDescription
Description for an upload using a binary HTTP request.
Bit
Represents a binary vector, where each element is either true or false.
Body
The body of a request or response.
BodyType
A body type that combines MIME type and encoding information.
A HeaderStore that kept the wire bytes of its fields, so a typed
header can decode from them without a String in between.
A HeaderStore over the bytes of a request head.
Cache <K , V >
Abstract cache interface.
CacheBustingConfig
Cache-busting for asset URLs that embed a content hash.
A class representing the HTTP Cache-Control header.
CacheMissHandler <T extends Object >
A CacheMissHandler is used to define a function that is called when a
cache miss occurs. The function is expected to return a new object that
will be stored in the cache.
Cascade
A helper that calls several handlers in sequence and returns the first
acceptable response.
A class representing the HTTP Clear-Site-Data header.
ClearSiteDataType
A class representing a single Clear-Site-Data type.
ClientCallOpContext
The context of a client call operation.
Subclasses represent web, method, and method streaming calls.
ClientDatabaseSession
A DatabaseSession backed by a local SQLite file, for client-side models
(database: client / database: all).
CloseMethodStreamCommand
A message sent over a websocket connection to close a websocket stream of
data to an endpoint method.
CloseReceived
A close notification (Close frame) received from the peer through the
WebSocket or a failure indication.
CloudStorage
The CloudStorage provides a standardized interface to store binary files
in the cloud. The default implementation is to use the database for binary
storage, but it can be extended to support Google Cloud, Amazon S3, or any
other cloud storage service.
Column <T >
Abstract class representing a database Column . Subclassed by the different
supported column types such as ColumnInt or ColumnString .
ColumnBigInt
A Column holding BigInt .
ColumnBit
A Column holding a Bit vector from pgvector.
ColumnBool
A Column holding an bool .
ColumnByteData
A Column holding ByteData .
ColumnComparable <T >
A Column whose values can be compared equal or unequal to other values.
Attends full specification of default PG comparison operations:
https://www.postgresql.org/docs/current/functions-comparison.html#FUNCTIONS-COMPARISON-OP-TABLE
ColumnCount
A Column holding a count of rows.
ColumnDateTime
A Column holding an DateTime . In the database it is stored as a
timestamp without time zone.
ColumnDouble
A Column holding an double .
ColumnDuration
A Column holding Duration .
ColumnEnum <E extends Enum >
A Column holding an enum.
ColumnEnumExtended <E extends Enum >
Intended for internal use only
ColumnExpression <T >
Database expression for a column.
ColumnGeographyDistance
A Column representing the result of ST_Distance between a geography
column and a fixed geometry. Extends ColumnDouble so it can be used
directly in orderBy.
ColumnGeographyGeometryCollection
A Column holding a GeographyGeometryCollection from PostGIS.
ColumnGeographyLineString
A Column holding a GeographyLineString from PostGIS.
ColumnGeographyPoint
A Column holding a GeographyPoint from PostGIS.
ColumnGeographyPolygon
A Column holding a GeographyPolygon from PostGIS.
ColumnHalfVector
A Column holding a HalfVector from pgvector.
ColumnInt
A Column holding an int .
ColumnSerializable <T >
A Column holding an SerializableModel . The entity will be stored in the
database as a json column.
ColumnSparseVector
A Column holding a SparseVector from pgvector.
ColumnString
A Column holding an String .
ColumnStructured <T >
A Column holding a SerializableModel . The entity will be stored in the
database as a binary-encoded object that retains the JSON structure.
Stored as JSONB on Postgres (with indexing support) and BLOB on SQLite.
ColumnUri
A Column holding Uri .
ColumnUuid
A Column holding UuidValue .
ColumnValue <T , V >
Represents a column-value pair for database updates.
ColumnVector
A Column holding a Vector from pgvector.
ColumnVectorDistance <T >
A Column holding the result of a vector distance operation.
A class representing the HTTP Connection header.
A class representing the type of connection directives for the Connection header.
ConnectionInfo
Represents the connection information of a network request.
Can be HTTP but also other types of network connections.
Constant
A constant Expression .
A class representing the HTTP Content-Disposition header.
ContentDispositionParameter
A class representing a parameter for the Content-Disposition header.
ContentEncoding
A class representing valid content encodings.
A class representing the HTTP Content-Encoding header.
A class representing the HTTP Content-Language header.
A class representing an HTTP Content-Range header for byte ranges.
ContentSecurityPolicyDirective
A class representing a single CSP directive.
A class representing the HTTP Content-Security-Policy (CSP) header.
A class representing the HTTP Content-Type header.
ContextProperty <T extends Object >
Manages a piece of data associated with a specific Request .
Cookie
A class representing a single cookie.
A class representing the HTTP Cookie header.
Cron
Represents a cron schedule.
CronFutureCallScheduling
A class representing the HTTP Cross-Origin-Embedder-Policy header.
A class representing the HTTP Cross-Origin-Opener-Policy header.
A class representing the HTTP Cross-Origin-Resource-Policy header.
Database
Provides easy access to the database in relation to the current DatabaseSession .
DatabaseAnalyzer
Analyzes the structure of Database s.
DatabaseCloudStorage
The DatabaseCloudStorage uses the standard Serverpod database to store
binary files. It's the default CloudStorage interface of Serverpod, but
you may want to replace it with a more robust service depending on your
needs, especially in your production environment.
DatabaseConfig
Configuration for a database.
DatabaseDefinitionRestrictions
Restrictions on the database definition for the current dialect.
DatabaseHealthIndicator
Built-in health indicator that checks database connectivity.
DatabaseProtocolDeserializationProvider
Optional typed routing for generated database protocols.
DatabaseResult
Database result.
DatabaseResultRow
Database result row.
DatabaseResultSchema
Database result schema.
DatabaseResultSchemaColumn
Database result schema column.
DatabaseSerializationManager
The SerializationManager is responsible for creating objects from a
serialization, but also for serializing objects. This class is typically
overridden by generated code. DatabaseSerializationManager is an
extension to also handle Table s.
DatabaseSession
Interface for accessing the database.
DatabaseUtil
Provides utility functions for working with the Database .
DeepCollectionEquality
Deep equality on collections.
DeveloperTools
Developer tools for inspecting and debugging a RelicApp .
DiagnosticEvent
Base interface for all diagnostic events.
DiagnosticEventContext
Base class for information about the context in which
a DiagnosticEvent was submitted.
DiagnosticEventHandler
Base interface for DiagnosticEvent handlers.
DiagnosticEventRecord <E extends DiagnosticEvent >
A record with a submitted diagnostic event.
Represents Digest authentication for HTTP Authorization.
DoubleFormField
A form field accessor that parses values as double .
DoublePathParam
A path parameter accessor that parses values as double .
DoubleQueryParam
A query parameter accessor that parses values as double .
EncodingQuality
A class representing an encoding with an optional quality value.
Endpoint
The Endpoint is an entrypoint to the Server . To add a custom Endpoint
to a Server , create a subclass and place it in the endpoints directory.
Code will generated that builds the corresponding client library. To add
methods that can be accessed from the client, make sure that the first
argument of the method is a Session parameter.
EndpointConnector
The EndpointConnector associates a name with and endpoint and its
EndpointMethodConnector s.
EndpointDispatch
The EndpointDispatch is responsible for directing requests to the Server
to the correct Endpoint and method. Typically, this class is overridden
by an Endpoints class that is generated.
EndpointMethodConnector
The EndpointMethodConnector is a base class for connectors that connect
methods their implementation.
EscapedExpression
A database expression that is escaped. This is used to escape values that
are not expressions, such as strings and numbers.
Base class for ETag-based conditional headers (If-Match and If-None-Match).
A class representing the HTTP ETag header.
ETagValue
An HTTP entity-tag per RFC 9110 section 8.8.3 .
EveryExpression <T >
A database expression that returns all rows where all of the related rows
match the filtering criteria.
ExceptionEvent
An event that represents an exception that occurred in the server.
ExceptionHandler
A DiagnosticEventHandler that handles ExceptionEvent instances.
A class representing the HTTP Expect header.
ExperimentalApi
Experimental API for Serverpod.
ExperimentalFeatures
Setup of experimental features.
Expression <T >
A database Expression .
FallbackMiddleware
Middleware that falls back to an alternative handler when a response
matches a condition.
FileFieldEntry
A file field entry.
FileInfo
Cached file information including MIME type, file stats, and ETag.
FileMetadata
Portable metadata that can be attached to a stored file.
FileStat
Metadata and properties reported for a stored file.
FlutterRoute
Route for serving Flutter web applications.
FormData
Parsed HTML form data.
FormEntry
A single form entry.
FormField <T extends Object >
A read-only accessor for a typed form field.
FormFieldEntry
A text field entry.
FormFields
Text form fields, read through FormField accessors.
FormFile
A read-only accessor for an uploaded file.
FormLimits
Limits used while parsing HTML forms and multipart uploads.
ForwardedElement
Represents one forwarded-element in the Forwarded header.
Typed representation of the Forwarded HTTP header.
It's a list of ForwardedElement s.
ForwardedIdentifier
Represents a node identifier in the Forwarded header, as per RFC 7239 Section 6.
This can be an IP address (v4 or v6), "unknown", or an obfuscated identifier,
optionally with a port.
A class representing the HTTP From header.
FunctionAccessor <T extends Object , K , R >
A ReadOnlyAccessor that decodes with a function.
FutureCall <T extends SerializableModel >
Superclass for future calls. Extend this class and declare public
Future<void> methods that take a Session as their first parameter to
create custom future calls. Type-safe methods for scheduling the calls are
generated when running serverpod generate.
FutureCallConfig
Configuration for future call handling.
FutureCallDispatch <T >
Provides type-safe access to future calls on the server.
Typically, this class is overriden by a FutureCalls class that is generated.
FutureCallManager
The FutureCallManager is responsible for managing and executing
FutureCall s in the Serverpod framework. A FutureCall is a task
that is scheduled to run at a specific time in the future. These tasks
are persistent, meaning they are stored in the database and will still
execute even if the server is restarted.
FutureCallOpContext
The context of a future call operation.
FutureCallSession
Created when a FutureCall is being made. It contains all data associated
with the current call and provides easy access to the database.
Geography
Abstract base class for all PostGIS geography types.
GeographyGeometryCollection
Represents a PostGIS GeometryCollection — a heterogeneous collection of
Geography values (points, line strings, polygons).
GeographyLineString
Represents a geographic line string (sequence of points) for use with PostGIS.
GeographyPoint
Represents a geographic point with longitude, latitude, and spatial
reference system identifier (SRID) for use with PostGIS.
GeographyPolygon
Represents a geographic polygon (exterior ring + optional holes) for PostGIS.
HalfVector
Represents a vector of half-precision float values.
HandlerObject
An abstract base class for classes that behave like Handler s.
A typed header, the HeaderName and the HeaderCodec that reads and
writes it.
A specialized codec for HTTP headers that defines conversion between a typed
value T and its string representation in headers.
An interned HTTP header name.
Headers is an immutable, case-insensitive view over a HeaderStore .
A cursor-based scanner for HTTP header field values.
Read access to the header fields of a message.
HealthCheckResult
Result of a single health indicator check.
HealthCheckService
Service that manages health checks for the server.
HealthConfig
Configuration for the health check system.
HealthIndicator <T extends Object >
Base class for health indicators that check service dependencies.
HealthResponse
Aggregated response from multiple health indicators.
Hijack
A Result indicating that the underlying connection has been
hijacked.
HnswIndexQueryOptions
Query options for the HNSW index.
Host
An HTTP host reference per RFC 3986 section 3.2.2, used by Host headers,
the Domain attribute of cookies, and the host=/for= values in
Forwarded.
Wanna-be RFC3986 compliant 'Host' header.
A class representing the HTTP If-Match header.
A class representing the HTTP If-None-Match header.
A class representing the HTTP If-Range header.
Include
The base include class, should not be used directly.
IncludeList
Defines what tables to join when querying a table.
IncludeObject
Defines what tables to join when querying a table.
InjectableIn <T >
Interface for objects that can be injected in others. This allows
an object to delegate setup to another object.
InternalSession
A Session used internally in the ServerPod. Typically used to access
the database and do logging for events that are not triggered from a call,
or a stream.
IntervalFutureCallScheduling
IntFormField
A form field accessor that parses values as int .
IntPathParam
A path parameter accessor that parses values as int .
IntQueryParam
A query parameter accessor that parses values as int .
InvokableFutureCall <T extends SerializableModel >
A FutureCall that can be invoked by the server when its scheduled time
arrives. Implemented by the future call wrappers generated when running
serverpod generate; not intended to be implemented directly by users.
IOAdapter
An Adapter implementation for dart:io HttpServer .
IORelicWebSocket
A dart-io-based RelicWebSocket implementation.
IPAddress
Represents an IPv4 or IPv6 address, optionally with a CIDR prefix length.
IPv4Address
Represents an IPv4 address with optional CIDR prefix.
IPv6Address
Represents an IPv6 address with optional CIDR prefix.
IsolatedObject <T >
IvfflatIndexQueryOptions
Query options for the IVFFLAT index.
JsonWidget
A WebWidget that renders JSON output. The output will be the result of passing
the provided object to jsonEncode .
LanguageQuality
A class representing a language with an optional quality value.
LanguageTag
A BCP 47 language tag per RFC 5646 , used by Content-Language
(RFC 9110 8.5) and Accept-Language (RFC 9110 12.5.4).
Listener
One bound socket of an Adapter .
ListWidget
Combines a List of WebWidget s into a single WebWidget .
LookupResult <T extends Object >
Represents the result of looking up a route in the router.
LruCache <K , V >
A simple Least Recently Used (LRU) cache implementation.
ManyRelation <T extends Table >
Many relation field between two tables.
The reference MutableHeaderStore , a map from name to values.
MapRuntimeParameters
Runtime parameters that can be built from a map of options.
MediaRange
A class representing a media range with an optional quality value.
MemoryUploadedFile
Uploaded file backed by memory.
MemoryUploadStorage
In-memory uploaded file storage.
Message
MessageCentral
The MessageCentral handles communication within the server, and between
servers in a cluster. It is especially useful when working with streaming
endpoints. The message central can pass on any serializable to a channel.
The channel can be listened to by from any place in the server.
MessageCentralAccess
Provides access to the Serverpod's MessageCentral .
MessageCentralServerpodChannels
Channels that are listened to by the Serverpod Framework.
MethodCallContext
Context for a MethodConnector call
MethodCallOpContext
The context of a method call operation.
MethodCallSession
When a call is made to the Server a MethodCallSession object is created.
It contains all data associated with the current connection and provides
easy access to the database.
MethodConnector
The MethodConnector hooks up a method with its name and the actual call
to the method.
MethodMiss <T extends Object >
Indicates that a route exists for the path, but not for the HTTP method.
MethodStreamCallContext
Context for a MethodStreamConnector call
MethodStreamConnector
The MethodStreamConnector hooks up a method with its name and
implementation. The method communicates with the client using a websocket
connection. Enabling support for streaming return values or parameters.
MethodStreamMessage
A message sent to a method stream.
MethodStreamSerializableException
A serializable exception sent over a method stream.
MethodStreamSession
When a connection is made to the Server to an endpoint method that uses a
stream MethodStreamSession object is created. It contains all data
associated with the current connection and provides easy access to the
database.
MiddlewareObject
An abstract base class for classes that behave like Middleware .
MigrationsApplyResult
Result of applying database migrations via the Insights endpoint.
MimeType
A MIME type representing the format of content.
Miss <T extends Object >
Base class for lookup failures.
MultipartFieldPart
A named form-data part without a filename parameter.
MultipartFilePart
A named form-data part with a filename or filename* parameter,
even an empty one.
MultipartFormData
Parsed multipart/form-data form data.
MultipartOtherPart
A part that is neither a MultipartFieldPart nor a MultipartFilePart ,
such as a part without a name or without form-data disposition.
MultipartPart
A streamed multipart form part.
MultipartUploadDescription
Description for an upload using a multipart HTTP request.
The builder side of Headers , a MutableHeaderStore with typed reads
and writes.
A HeaderStore that can be written.
NoCache <K , V >
A no-op Cache that never stores or retrieves values, for opting out of
caching in high-cardinality workloads where it costs more than it saves.
NoneExpression <T >
A database expression that returns all rows where none of the related rows
match the filtering criteria.
NormalizedPath
Represents a URL path that has been normalized.
NotExpression
A database expression to invert the result of another expression.
NumFormField
A form field accessor that parses values as num .
NumPathParam
A path parameter accessor that parses values as num .
NumQueryParam
A query parameter accessor that parses values as num .
OpaqueOrigin
The opaque origin sentinel, serialized as null.
OpenMethodStreamCommand
A message sent over a websocket connection to open a websocket stream of
data to an endpoint method.
OpenMethodStreamResponse
A message sent over a websocket connection to respond to an
OpenMethodStreamCommand .
OperationEventContext
Represents the operation that the event was caused by or in relation to.
An operation is a client-originated call / operation or a scheduled operation,
i.e. a method call, a streaming call, a web call, or a future call.
Order
Defines how to order a database column .
Origin
A Web origin, as defined by the WHATWG Fetch Standard and RFC 6454.
ParameterDescription
Defines a parameter in a MethodConnector .
ParameterValue
A parameter value for the token / quoted-string alternation used
pervasively in HTTP headers (RFC 9110 5.6.6: parameters).
PathMiss <T extends Object >
Indicates that no route exists for the requested path.
PathParam <T extends Object >
A read-only accessor for extracting typed path parameters.
PathParameters
Holds path parameters extracted from a matched route.
PathTrie <T extends Object >
A Trie (prefix tree) data structure optimized for matching URL paths.
PermissionsPolicyDirective
A class representing a single Permissions-Policy directive.
A class representing the HTTP Permissions-Policy header.
PgErrorCode
A class containing constants for PostgreSQL error codes.
PingCommand
A message sent over a websocket connection to check if the connection is
still alive. The other end should respond with a PongCommand .
Pipeline
A helper that makes it easy to compose a set of Middleware and a
Handler .
PongCommand
A response to a PingCommand .
PostgresDatabaseConfig
PostgreSQL-specific database configuration.
ProtocolDeserialization
Immutable type declarations used to avoid probing unrelated protocols.
ProtocolDeserializationProvider
Optional capability implemented by protocols generated with typed routing.
ProtocolSerialization
The ProtocolSerialization defines a toJsonForProtocol method which makes it
possible to limit what fields are serialized when communicating over the
protocol.
QueryParam <T extends Object >
A read-only accessor for extracting typed query parameters.
QueryParameters
Provides parameters for direct database queries
QueryParametersNamed
Named parameters for direct database queries.
QueryParametersPositional
Positional parameters for direct database queries
Range
A class representing a single range within a Range header.
A class representing the HTTP Range header.
ReadOnlyAccessor <T extends Object , K , R >
A read-only accessor for extracting typed values from a keyed storage.
RecurringFutureCallDispatch <T >
Provides type-safe access to recurring future calls on the server.
Typically, this class is overriden by a generated class.
RedirectWidget
A WebWidget that renders a HTTP redirect to the provided url .
RedisConfig
Configuration for Redis.
RedisController
The RedisController maintains an active connection to the Redis server. It
handles caching, publishing, and subscriptions of strings. If the connection
is broken the controller automatically tries to reconnect. Messages sent
across Redis are best effort and not guaranteed to be delivered, if a
message fails to be sent it will not retry.
RedisHealthIndicator
Built-in health indicator that checks Redis connectivity.
A class representing the HTTP Referrer-Policy header.
RelicApp
RelicServer
RelicWebSocket
An relic specific interface for bi-directional communication over
web-sockets.
Request
An HTTP request to be processed by a Relic Server application.
RequestFactory
Builds the Request for an AdapterExchange .
RequestTarget
The path and query of a request, as received.
Response
The response returned by a Handler .
Result
A sealed base class representing the result of handling a request.
A class representing the HTTP Retry-After header.
RevokedAuthenticationAuthId
Message sent when an authentication key id is revoked.
RevokedAuthenticationScope
Message sent when authentication scopes for a user are revoked.
RevokedAuthenticationUser
Message sent when all authentication for a user is revoked.
Route
A Route defines a destination in Serverpod's web server. It will handle
a call and generate an appropriate response by manipulating the
Request object. You override Route , or more likely it's subclass
WidgetRoute to create your own custom routes in your server.
Router <T extends Object >
A URL router that maps path patterns to values of type T.
RouterMatch <T extends Object >
A successful route match: the route a request takes and what the path
lookup extracted.
RuntimeListMigrationArtifactStore
A MigrationArtifactStore backed by a fixed list that is used to apply
MigrationVersionSql instances at runtime.
RuntimeParameters
Base class for runtime parameters group to apply to the database.
RuntimeParametersBuilder
Builder class for runtime parameters that provides discoverable factory methods.
This enables the callback pattern: setRuntimeParameters((params) => ...)
SameSite
Cookie cross-site availability configuration.
Savepoint
A savepoint in a transaction.
Scope
Used to define who can access an Endpoint . Authenticated users can be
associated with a Scope , if the same scope is defined in the Endpoint
the user is granted access. The scope is defined by its name .
SearchPathsConfig
Search path configuration for database schema resolution.
A class representing the HTTP Sec-Fetch-Dest header.
A class representing the HTTP Sec-Fetch-Mode header.
A class representing the HTTP Sec-Fetch-Site header.
SecurityContextConfig
Configuration for the security context.
SerializableModel
The SerializableModel is the base interface for all serializable objects in
Serverpod, except primitives.
SerializationManager
The SerializationManager is responsible for creating objects from a
serialization, but also for serializing objects. This class is typically
extended by generated code.
Server
Handling incoming calls and routing them to the correct Endpoint
methods.
ServerConfig
Configuration for a server.
ServerHealthMetric
Represents a snapshot of a specific health metric. An entry is written every
minute for each server. All health data can be accessed through Serverpod
Insights.
ServerHealthMetricInclude
ServerHealthMetricIncludeList
ServerHealthMetricRepository
ServerHealthMetricTable
ServerHealthMetricUpdateTable
Serverpod
The Serverpod handles all setup and manages the main Server . In addition
to the user managed server, it also runs a server for handling the
DistributedCache and other connections through the InsightsEndpoint.
ServerpodConfig
Parser for the Serverpod configuration file.
ServerpodRunMode
Defines valid run modes for the Serverpod .
ServerpodStartupIndicator
Built-in health indicator that checks if Serverpod has completed startup.
Session
When a call is made to the Server a Session object is created. It
contains all data associated with the current connection and provides
easy access to the database.
SessionLogConfig
Configuration for session logging.
SessionLogUtils
A collection of utils for the database backed session logs.
SetCookie
A single HTTP Set-Cookie cookie: a name/value pair plus its attributes.
The HTTP Set-Cookie response header: the ordered set of SetCookie s a
response sets.
SpaRoute
Route for serving Single Page Applications (SPAs) with fallback support.
SparseVector
Represents a sparse vector that stores only non-zero elements.
SqliteDatabaseConfig
SQLite-specific database configuration.
SqliteErrorCode
A class containing constants for SQLite error codes.
StaticHandler
A HandlerObject that serves static files from a directory or a single file.
StaticRoute
Route for serving static assets.
StorageAccess
Collects methods for accessing cloud storage.
StoreFileOptions
Options used when the server stores a file directly.
StreamOpContext
The context of a stream operation / message.
StreamParameterDescription <T >
Description of a stream parameter.
Represents the HTTP Strict-Transport-Security (HSTS) header for managing
HSTS settings.
StringFormField
A form field accessor that returns the value as is.
Table <T_ID >
Represents a database table.
TableRow <T_ID >
Holds data corresponding to a row in the database. Concrete classes are
typically generated. Instances of TableRow can also be serialized and
either passed to clients or cached.
A class representing the HTTP TE header.
Templates
Loads and caches templates.
TemplateWidget
A WebWidget based on a HTML template. The name of the template should
correspond to a template file in your server's web/templates directory.
Set the custom values of the template by populating the values field. If
values are set that aren't String s, the toString method will be called
on the value. The templates are loaded when the server starts. If you add
new templates or modify existing templates, you will need to restart the
server for them to take effect.
TemporaryDownloadUrlOptions
Options used to create a temporary download URL.
TempUploadedFile
Uploaded file backed by a temp file on disk.
TempUploadStorage
Temp-file-backed upload storage for dart:io applications.
TeQuality
A class representing a transfer encoding with an optional quality value.
TextDataReceived
Text data received from the peer through the WebSocket.
Token
An HTTP token value per RFC 9110 section 5.6.2 .
Token68
An HTTP token68 value per RFC 7235 section 2.1 .
TokenValue
A free-form Token value, validated at construction.
Transaction
Holds the state of a running database transaction.
TransactionSettings
Settings for a transaction.
TransferEncoding
A class representing valid transfer encodings.
A class representing the HTTP Transfer-Encoding header.
TrieMatch <T >
Represents the successfull result of a lookup.
TupleOrigin
A scheme://host[:port] origin tuple per RFC 6454.
TwoPartExpression
A database expression with two parts.
TypedEventHandler <T extends DiagnosticEvent >
A DiagnosticEventHandler that handles events of a specific type.
UndefinedSentinel
Base for generated copyWith defaults that distinguish omission from null.
UpdateTable <T extends Table >
Base class for database table update operations.
A class representing the HTTP Upgrade header.
UpgradeProtocol
A single protocol entry in an Upgrade header.
UploadDescription
Description for a cloud storage upload.
UploadedFile
A handle to an uploaded file.
UploadedFiles
Uploaded files, read through FormFile accessors.
UploadOptions
Options used when creating a client upload description.
UploadStorage
Storage backend for uploaded file parts.
UrlEncodedFormData
Parsed application/x-www-form-urlencoded form data.
Uuid
uuid for Dart
Author: Yulian Kuncheff
Released under MIT License.
UuidValue
ValueEncoder
Interface for value encoders.
A class representing the HTTP Vary header.
Vector
Represents a vector of double values.
VectorDistanceExpression <T >
Vector distance expression for use with pgvector.
VectorIndexQueryOptions
Query options for vector indexes.
Middleware that adds WebAssembly multi-threading headers to responses.
WebAuthCookieConfig
Configuration for the cookie used to carry the web authentication token.
WebCallOpContext
The context of a web call operation.
WebCallSession
When a request is made to the web server a WebCallSession object is
created. It contains all data associated with the current connection and
provides easy access to the database.
WebServer
The Serverpod webserver.
WebSocketEvent
An event received from the peer through the WebSocket.
WebSocketMessage
Base class for messages sent over a WebSocket connection.
WebSocketMessageInfo
Interface of WebSocketMessage subclasses that have endpoint,
method and connection id info.
WebSocketUpgrade
A Result indicating that a duplex stream connection
(e.g., WebSocket) has been established.
WebWidget
The base class for all web widgets. Override this class to create a custom
widget type, or use one of the default types which covers most common use
cases.
WidgetRoute
A WidgetRoute is the most convenient way to create routes in your server.
Override the build method and return an appropriate WebWidget .
Typed representation of the X-Forwarded-For (XFF) HTTP header.
Mixins
AccessorStateMixin <K , R >
Typed reads over a keyed storage, with a cache of decoded values.
Extension Types
DeltaSeconds
A non-negative integer number of seconds, used by HTTP headers that carry
delta-seconds values: Max-Age (RFC 9111 5.2.2.1, RFC 6265 5.2.2),
Retry-After seconds form (RFC 9110 10.2.3), HSTS max-age (RFC 6797 6.1),
and the second form of Retry-After.
SocketAddress
Properties
nonMutableTypeNames
→ List <String >
List of types that are not mutable and therefore do not need to be
copied or handled in a copyWith method.
final
templates
→ Templates
Global access to all templates loaded when starting the webserver.
final
Functions
applyMigrationsAndVerify ({required DatabaseSession session , required Directory projectDirectory , required String runMode , required bool applyRepairMigration , required bool applyMigrations })
→ Future <MigrationsApplyResult >
Applies pending and/or repair migrations and verifies database integrity.
bindHttpServer (InternetAddress address , {int port = 0 , SecurityContext ? context , int backlog = 0 , bool v6Only = false , bool shared = false })
→ Future <HttpServer >
Binds an HTTP server to the given address and port.
catchTopLevelErrors (void callback (), void onError (dynamic error , StackTrace ) )
→ void
Run callback and capture any errors that would otherwise be top-leveled.
createMiddleware ({FutureOr <Response ? > onRequest (Request )?, FutureOr <Response > onResponse (Response )?, FutureOr <Response > onError (Object error , StackTrace )? })
→ Middleware
Creates a Middleware using the provided functions.
createRelationTable <T > ({required String relationFieldName , required Column field , required Column foreignField , TableRelation? tableRelation , required T createTable (TableRelation foreignTableRelation ) })
→ T
Creates a new Table containing TableRelation with information
about how the tables are joined.
deleteTrailingEmptyMigrationVersionDirectories (List <String > versions , {required Directory migrationsBaseDirectory , void logWarning (String message )? })
→ Future <List <String > >
Deletes the migration version directories at the end of versions that
contain no files or subdirectories, e.g. what is left behind when the
generated files of a migration are discarded.
encodeDate (DateTime d )
→ Iterable <String >
Encodes a DateTime to a iterable of string in HTTP date format.
encodeInt (int i )
→ Iterable <String >
Encode an integer to a iterable of string.
encodeMethod (Method m )
→ Iterable <String >
encodeMethodList (Iterable <Method > l )
→ Iterable <String >
Encode a list of methods to a iterable of string.
encodePositiveBool (bool b )
→ Iterable <String >
Encode a boolean to a iterable of string, if true.
encodePositiveInt (int i )
→ Iterable <String >
Encode a positive integer to a iterable of string, otherwise throws an error.
encodeString (String s )
→ Iterable <String >
Encode a string to a iterable of string.
encodeStringList (List <String > i )
→ Iterable <String >
Encode a list of strings to a iterable of string.
encodeUri (Uri uri )
→ Iterable <String >
Encode a Uri to a iterable of string.
equalsType <T_ID , Y > ()
→ bool
Checks if the type T is equal to type Y (nullable or non-nullable).
getStaticFileInfo (File file , {MimeTypeResolver? mimeResolver })
→ Future <FileInfo >
Public accessor for retrieving FileInfo for a given file.
getType <T > ()
→ Type
Get the type provided as an generic. Useful for getting a nullable type.
httpDate ()
→ String
The Date header value for now, an RFC 9110 5.6.7 IMF-fixdate.
inferDatabaseConfigFromConfigMap (Map configMap , {Map <String , String > environment = const {} })
→ DatabaseConfig ?
Infer the database config from one run-mode config map (the body of
config/<runMode>.yaml), using the same database merging rules as
ServerpodConfig.loadFromMap .
inferDatabaseDialectFromConfigMap (Map configMap , {Map <String , String > environment = const {} })
→ DatabaseDialect ?
Infer the database dialect from one run-mode config map (the body of
config/<runMode>.yaml), using the same database merging rules as
ServerpodConfig.loadFromMap .
Returns true if the provided value is a valid HTTP "authorization" header value
(which includes starting with an authentication scheme name).
Returns true if the provided value is a Serverpod-wrapped auth key.
Returns true if the provided value is a Bearer auth header value.
Multiple header values are joined with commas.
See https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-p1-messaging-21#page-22
logMessage (String message , {StackTrace ? stackTrace , LoggerType type = LoggerType.info })
→ void
Logs a message using print .
logRequests ({Logger ? logger })
→ Middleware
Middleware which prints the time of the request, the elapsed time for the
inner handlers, the response's status code and the request URI.
parseBool (String value )
→ bool
Parses a boolean from the given value and returns it as a bool.
parseDate (String value )
→ DateTime
Parses a date from the given value and returns it as a DateTime.
parseInt (String value )
→ int
Parses an integer from the given value and returns it as an int.
parseMethodSet (Iterable <String > values )
→ SplayTreeSet <Method >
Parses a list of methods from the given values and returns it as a List<Method>.
parseMethodSetFields (List <Uint8List > fields )
→ SplayTreeSet <Method >
parseMethodSet over the wire bytes of every field.
parsePositiveBool (String value )
→ bool
Parses a positive boolean from the given value and returns it as a bool.
parsePositiveInt (String value )
→ int
Parses a positive integer from the given value and returns it as an int.
parseQualifiedTableName (String tableName )
→ ({String name , String ? schema } )
Splits a schema.table name. The schema is null for unqualified names.
parseString (String value )
→ String
Parses a string from the given value and returns it as a String.
parseStringList (Iterable <String > values )
→ List <String >
Parses a list of strings from the given values and returns it as a List<String>.
parseUri (String value )
→ Uri
Parses a URI from the given value and returns it as a Uri.
respondWith (Responder responder )
→ Handler
Creates a Handler that uses the given Responder function to generate
a response.
routeWith <T extends Object > (Router <T > router , {bool backtrack = true , bool useHostWhenRouting = false , Handler toHandler (T )? })
→ Middleware
Creates middleware that routes requests using the provided router.
Returns the auth key from an auth value that has potentially been wrapped.
This operation is the inverse of wrapAsBasicAuthHeaderValue and
wrapAsBearerAuthHeaderValue . If null is provided, null is returned.
Returns a value that is compliant with the HTTP auth header format
by encoding and wrapping the provided auth key as a Basic auth value.
Returns a value that is compliant with the HTTP auth header format
by wrapping the provided token as a Bearer auth value.
Unlike Basic auth, Bearer tokens are not Base64 encoded as they are
expected to already be in the correct format.
Typedefs
AuthenticationHandler
= Future <AuthenticationInfo ? > Function(Session session , String token )
Returns authentication information for a given Session and token or null
if the key is invalid.
CacheControlFactory
= CacheControlHeader ? Function(Request req , FileInfo fileInfo )
ColumnSelections <T extends Table >
= List <Column > Function(T )
A function that returns a Column for a Table .
ColumnValueListBuilder <T extends UpdateTable <Table > >
= List <ColumnValue > Function(T )
A function that returns a list of ColumnValue s for a UpdateTable .
ConnectionsInfo
= ({int active , int closing , int idle } )
Convert <T >
= T Function(String value )
The configuration sections for the serverpod configuration file.
DatabaseConfigParser
= DatabaseConfig Function(Map dbSetup , Map passwords , String name )
Parser for the database configuration.
DatabaseInterceptor
= Database Function(Session session , Database inner )
Replaces the default Database for a Session .
EventHandlerFunction <T extends DiagnosticEvent >
= void Function(T event , {required DiagnosticEventContext context , required OriginSpace space })
Function signature type for functions that handle a DiagnosticEvent .
ExchangeSink
= FutureOr <void > Function(AdapterExchange exchange )
The function an Adapter hands every exchange to.
Factory <T >
= FutureOr <T > Function()
FutureCallSessionBuilder
= Session Function(String futureCallName )
A function that builds a Session for a FutureCall .
Handler
= FutureOr <Result > Function(Request req )
A function that processes a Request to produce a Result .
Typed reads over header values, shared by Headers and MutableHeaders .
HealthCheckHandler
= Future <List <ServerHealthMetric > > Function(Serverpod pod , DateTime timestamp )
Performs a set of custom health checks on a Serverpod .
HijackCallback
= void Function(StreamChannel<Uint8List > )
A callback function that handles a hijacked connection.
InitializeFutureCall
= void Function(FutureCall <SerializableModel > futureCall , String name )
A function that initializes a FutureCall .
Logger
= void Function(String message , {StackTrace ? stackTrace , LoggerType type })
LogQueryFunction
= void Function({required Duration duration , required String ? error , required int ? numRowsAffected , required String query , required StackTrace stackTrace })
Function type for logging a query.
LogWarningFunction
= Future <void > Function(String message )
Function type for logging a warning during the execution of a query.
MessageCentralListenerCallback
= void Function(SerializableModel message )
The callback used by listeners of the MessageCentral .
MethodCall
= Future Function(Session session , Map <String , dynamic > params )
Calls a named method referenced in a MethodConnector .
MethodStream
= dynamic Function(Session session , Map <String , dynamic > params , Map <String , Stream > streamParams )
Calls a named method referenced in a MethodStreamConnector .
Middleware
= Handler Function(Handler next )
A function which creates a new Handler by wrapping a Handler .
OrderByBuilder <T extends Table >
= Column Function(T )
A function that returns a Column for a Table to be used with order by
OrderByListBuilder <T extends Table >
= List <Column > Function(T )
A function that returns a list of Column for a Table to be used with
order by list. Use Column.desc() to change the order to descending.
Parameters
= Map <Symbol , String >
RawPathParam
= String
RawQueryParam
= String
RedisCommand
= Command
A type alias for the Command class from the redis package.
RedisSubscriptionCallback
= void Function(String channel , String message )
Callback when messages are received on a specific channel from Redis.
RelicRouter
= Router <Handler >
Just a typedef for better auto-complete
///
Responder
= FutureOr <Response > Function(Request )
A simplified handler function that takes a Request and returns a Response .
RouterInjectable
= InjectableIn <RelicRouter >
A contract for modular route registration in Relic applications.
RuntimeParametersListBuilder
= List <RuntimeParameters > Function(RuntimeParametersBuilder params )
A function that returns a list of RuntimeParameters for configuring
database runtime parameters.
TransactionFunction <R >
= Future <R > Function(Transaction transaction )
A function performing a transaction, passed to the transaction method.
WebSocketCallback
= void Function(RelicWebSocket webSocket )
A callback function invoked when a socket connection is established.
WhereExpressionBuilder <T extends Table >
= Expression Function(T )
A function that returns an Expression for a Table to be used with where
clauses.
WillCloseListener
= FutureOr <void > Function(Session session )
A listener that will be called when the session is about to close.