Appends a label to a target.
The ID of the campaign containing the target
The target ID to append label to
The label to add
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 target does not exist
Creates a new target in the specified campaign.
The target 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 target in
The unique identifier for the new target
The access level
Whether the donor server uses HTTPS
The donor subdomain
The donor domain name
The donor server port
Whether the mirror uses HTTPS
The mirror subdomain
The mirror server port
Connection timeout
Simple request timeout
Streaming request timeout
Maximum headers size in bytes
Maximum body size in bytes
Custom main page content
Custom 404 page content
Custom favicon content
Custom robots.txt content
Custom sitemap.xml content
Whether to allow WebSocket connections
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 target with the same ID already exists
DatabaseError If the target donor is already used
DatabaseError If the target mirror is already used
DatabaseError If the mirror hostname is already taken
Delete a target model by its ID.
The target must be **disabled **before it can be deleted.
The ID of the campaign containing the target
The target ID to delete
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 target does not exist
DatabaseError If the target is still enabled
Disables a target, stopping traffic routing.
When disabled, requests to the mirror hostname will not be proxied.
The ID of the campaign containing the target
The target 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 target does not exist
Enables a target, making it available for traffic routing.
When enabled, the mirror hostname becomes active and can be used for proxying requests to the donor server.
The ID of the campaign containing the target
The target 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 target does not exist
Finds a target by its mirror hostname.
This is the primary lookup method for routing incoming HTTP requests.
Given a Host header from a request, it returns the corresponding target model.
The mirror hostname
The target model, or null if no target matches the hostname
Finds a full target by its mirror hostname.
The mirror hostname
The full target model, or null if no target matches the hostname
Lists all targets in a campaign.
Targets are ordered by creation time (oldest first).
The ID of the campaign to list targets for
An array of target models, or null if the campaign does not exist
Lists all full targets in a campaign.
Targets are ordered by creation time (oldest first).
The ID of the campaign to list targets for
An array of full target models, or null if the campaign does not exist
Reads a target model by its ID.
The ID of the campaign containing the target
The target ID to read
The target model, or null if not found
Reads a full target model by its ID.
The ID of the campaign containing the target
The target ID to read
The full target model, or null if not found
Removes a label from a target.
The ID of the campaign containing the target
The target ID to remove label from
The label to remove
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 target does not exist
Updates specific fields of a target model.
The ID of the campaign containing the target
The target ID to update
Connection timeout
Simple request timeout
Streaming request timeout
Maximum headers size in bytes
Maximum body size in bytes
Custom main page content
Custom 404 page content
Custom favicon content
Custom robots.txt content
Custom sitemap.xml content
Whether to allow WebSocket connections
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 target does not exist
Represents a target repository.