Creates a new lure in the specified campaign.
The lure will be created in a disabled state (isEnabled = false).
Use enable() to activate it for traffic routing.
The ID of the campaign to create the lure in
The unique identifier for the new lure
The URL path
The ID of the redirector that handles this lure
The campaign lock secret obtained from CampaignRepository.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 a lure with the same ID already exists
DatabaseError If the path is already used by another lure in the campaign
DatabaseError If the redirector does not exist
Delete a lure model by its ID.
A lure must be disabled before it can be deleted.
The ID of the campaign containing the lure
The lure ID to delete
The ID of the redirector associated with the lure
The campaign lock secret obtained from CampaignRepository.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 lure does not exist
DatabaseError If the redirector does not exist
DatabaseError If the lure is still enabled
DatabaseError If the lure's redirector ID does not match the provided one
Disables a lure, stopping request routing.
When disabled, requests to the URL path will not be routed.
The ID of the campaign containing the lure
The lure ID to disable
The campaign lock secret obtained from CampaignRepository.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 lure does not exist
Enables a lure, making it available for request routing.
When enabled, the URL path becomes active and can be used to serve the associated redirector content.
The ID of the campaign containing the lure
The lure ID to enable
The campaign lock secret obtained from CampaignRepository.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 lure does not exist
Finds a lure model by its URL path.
This is the primary routing method for HTTP requests. When a request arrives at a mirror domain, the request path is extracted and used to instantly find the corresponding lure via a direct hash lookup.
The ID of the campaign to search in
The URL path
The lure model, or null if no lure matches the path
Lists all lures in a campaign.
Lures are ordered by creation time (oldest first).
The ID of the campaign to list lures for
An array of lure models, or null if the campaign does not exist
Reads a lure model by its ID.
The ID of the campaign containing the lure
The lure ID to read
The lure model, or null if not found
Represents a lure repository.