Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
44
cloud/maplepress-backend/internal/domain/page/interface.go
Normal file
44
cloud/maplepress-backend/internal/domain/page/interface.go
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
// File Path: monorepo/cloud/maplepress-backend/internal/domain/page/interface.go
|
||||
package page
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gocql/gocql"
|
||||
)
|
||||
|
||||
// Repository defines the interface for page data operations
|
||||
type Repository interface {
|
||||
// Create inserts a new page
|
||||
Create(ctx context.Context, page *Page) error
|
||||
|
||||
// Update updates an existing page
|
||||
Update(ctx context.Context, page *Page) error
|
||||
|
||||
// Upsert creates or updates a page
|
||||
Upsert(ctx context.Context, page *Page) error
|
||||
|
||||
// GetByID retrieves a page by site_id and page_id
|
||||
GetByID(ctx context.Context, siteID gocql.UUID, pageID string) (*Page, error)
|
||||
|
||||
// GetBySiteID retrieves all pages for a site
|
||||
GetBySiteID(ctx context.Context, siteID gocql.UUID) ([]*Page, error)
|
||||
|
||||
// GetBySiteIDPaginated retrieves pages for a site with pagination
|
||||
GetBySiteIDPaginated(ctx context.Context, siteID gocql.UUID, limit int, pageState []byte) ([]*Page, []byte, error)
|
||||
|
||||
// Delete deletes a page
|
||||
Delete(ctx context.Context, siteID gocql.UUID, pageID string) error
|
||||
|
||||
// DeleteBySiteID deletes all pages for a site
|
||||
DeleteBySiteID(ctx context.Context, siteID gocql.UUID) error
|
||||
|
||||
// DeleteMultiple deletes multiple pages by their IDs
|
||||
DeleteMultiple(ctx context.Context, siteID gocql.UUID, pageIDs []string) error
|
||||
|
||||
// CountBySiteID counts pages for a site
|
||||
CountBySiteID(ctx context.Context, siteID gocql.UUID) (int64, error)
|
||||
|
||||
// Exists checks if a page exists
|
||||
Exists(ctx context.Context, siteID gocql.UUID, pageID string) (bool, error)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue