serverpod_shared library

Classes

CliArgsConstants
Constants representing the keys used to access command line arguments from the map returned by CommandLineArgs.toMap().
DatabaseConfig
Configuration for a Postgres database,
DatabaseConstants
Database constants used by the serverpod framework.
FutureCallConfig
Configuration for future call handling.
MigrationConstants
Migration constants used by the serverpod framework.
PasswordManager
Keeps track of passwords used by the server. Passwords are loaded from the config/passwords.yaml file.
RedisConfig
Configuration for Redis.
ServerConfig
Configuration for a server.
ServerpodConfig
Parser for the Serverpod configuration file.
ServerpodConfigMap
The configuration sections for the serverpod configuration file.
ServerpodFutureCallConfigMap
The configuration sections for the future call configuration.
ServerpodServerConfigMap
The configuration sections for the serverpod server configuration file.
ServerpodUrlConstants
Serverpod URL constants used by the serverpod framework.
SessionLogConfig
Configuration for session logging.

Enums

ConsoleLogFormat
Valid values for console log format.
ServerpodEnv
The default environment variables used by the server.
ServerpodLoggingMode
The overarching logging mode of the server. This can be set to either normal or verbose. In normal mode, only important messages are logged, which is the default.
ServerpodPassword
The default passwords used by the server.
ServerpodRole
The main role of the server. By default, Serverpod is running as a monolith, but it can also be configured to run as a serverless server, or in maintenance mode where it runs scheduled tasks, such as executing future calls.

Functions

databaseTypeToLowerCamelCase(String databaseType) String
Splits at spaces and joins to lowerCamelCase.
generateRandomBytes(int length) Uint8List
Generates a list of secure random bytes of the specified length.
generateRandomString([int length = 32]) String
Generates a secure random string of the specified length.
sslCertificatePath(String runMode, int serverId) String
Returns the path to SSL certificate for the specified server.
sslPrivateKeyPath(String runMode, int serverId) String
Returns the path to the private SSL key for the specified server.
truncateIdentifier(String identifier, int maxLength, {int hashLength = 4}) String
Deterministically truncates an identifier to a maxLength String.
uint8ListAreEqual(Uint8List a, Uint8List b) bool
Checks whether the 2 given lists contain the same data.

Typedefs

Convert<T> = T Function(String value)
The configuration sections for the serverpod configuration file.

Exceptions / Errors

GenerateMigrationDatabaseDefinitionException
Exception thrown when the migration failed to create a database definition from the projects model files.
MigrationLiveDatabaseDefinitionException
Exception thrown when trying to load the live database definition.
MigrationRepairTargetNotFoundException
Exception thrown when a migration target is not found.
MigrationRepairWriteException
Exception thrown when writing a migration fails.
MigrationVersionAlreadyExistsException
Exception thrown when the migration directory already exists.
MigrationVersionLoadException
Exception thrown when loading a migration version fails.
StreamClosedWithErrorException
This is an exception that is thrown when a stream is closed with an error