serverpod_shared library

Classes

DatabaseConfig
Configuration for a Postgres database,
DatabaseConstants
Database constants used by the serverpod framework.
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.
ServerpodUrlConstants
Serverpod URL constants used by the serverpod framework.

Functions

databaseTypeToLowerCamelCase(String databaseType) String
Splits at spaces and joins to lowerCamelCase.
generateRandomString([int length = 32]) String
Generates a 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.

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.