cookiebanner: add TrackerResource service layer
Wire resource ingestion and add full CRUD + list/count service methods for the new tracker_resources table. - reportDetectedResource splits the URL into origin/path and upserts into tracker_resources with the uncategorised category. - CreateTrackerResource, GetTrackerResource, UpdateTrackerResource, DeleteTrackerResource, MoveTrackerResourceToCategory mirror the tracker-pattern service surface. - ListTrackerResourcesForCategory, CountTrackerResourcesForCategory, ListUncategorisedTrackerResources, CountUncategorisedTrackerResources provide paginated access. - Request structs with Validate() and dedicated error sentinels. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -35,4 +35,7 @@ var (
|
||||
ErrTrackerPatternNotFound = errors.New("tracker pattern not found")
|
||||
ErrPatternAlreadyExists = errors.New("a pattern with this name already exists in this banner")
|
||||
ErrSamePatternCategoryMove = errors.New("source and target cookie categories must be different")
|
||||
ErrTrackerResourceNotFound = errors.New("tracker resource not found")
|
||||
ErrResourceAlreadyExists = errors.New("a resource with this origin and path already exists in this banner")
|
||||
ErrSameResourceCategoryMove = errors.New("source and target cookie categories must be different")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user