Creates a new campaign repository instance.
The validator instance.
The config instance.
The logger instance.
The connector instance.
Creates a new campaign.
The new campaign ID to create.
The public-facing mirror domain for the campaign.
The human-readable description for the campaign.
The secret used for encrypting session data.
The URL path that triggers session upgrade.
The name of the cookie used to track authorized sessions.
The TTL for an authorized session in milliseconds.
The TTL for a not-yet-authorized session in milliseconds.
The TTL for a message in milliseconds.
DatabaseError If a campaign with the same ID already exists.
DatabaseError If the mirror domain is already used by another campaign.
DatabaseError If the session cookie name is already used by another campaign.
DatabaseError If the data validation fails.
Deletes the campaign by its ID.
The campaign ID to delete.
The lock secret obtained from lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the lock secret does not match.
DatabaseError If the campaign still has associated entities.
DatabaseError If the data validation fails.
Lists all campaigns.
The campaigns are ordered by creation time (oldest first).
The array of campaign models.
DatabaseError If the data validation fails.
Lists all full campaigns.
The campaigns are ordered by creation time (oldest first).
The array of full campaign models.
DatabaseError If the data validation fails.
Acquires a distributed lock for the campaign.
This lock is required for any mutating operations.
The campaign ID to lock.
The unique lock secret that must be used for subsequent operations.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is already locked.
DatabaseError If the data validation fails.
Reads the campaign by its ID.
The campaign ID to read.
The campaign model, or null if the campaign is not found.
DatabaseError If the data validation fails.
Reads the full campaign by its ID.
The campaign ID to read.
The full campaign model, or null if the campaign is not found.
DatabaseError If the data validation fails.
Releases a previously acquired lock on the campaign.
The lock secret must match the one returned by lock.
The campaign ID to unlock.
The lock secret returned by the lock.
DatabaseError If the campaign does not exist.
DatabaseError If the lock secret does not match.
DatabaseError If the data validation fails.
Updates the campaign specific fields.
All update parameters are optional. Only provided fields will be updated.
The campaign ID to update.
The new human-readable description for the campaign.
The new TTL for an authorized session in milliseconds.
The new TTL for a not-yet-authorized session in milliseconds.
The new TTL for a message in milliseconds.
The lock secret obtained from lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the lock secret does not match.
DatabaseError If the data validation fails.
StaticregisterRegisters the campaign repository as a singleton in the DI container.
The DI container to register in.
Redis-based campaign repository implementation.
Depends:
Example