initial commit
This commit is contained in:
28
data/storage/storage.go
Normal file
28
data/storage/storage.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.coopgo.io/coopgo-platform/saved-search/data/types"
|
||||
)
|
||||
|
||||
// Storage interface defines the methods for saved search storage
|
||||
type Storage interface {
|
||||
// CreateSavedSearch creates a new saved search
|
||||
CreateSavedSearch(ctx context.Context, search types.SavedSearch) error
|
||||
|
||||
// GetSavedSearch retrieves a saved search by ID
|
||||
GetSavedSearch(ctx context.Context, id string) (*types.SavedSearch, error)
|
||||
|
||||
// GetSavedSearchesByOwner retrieves all saved searches for a specific owner
|
||||
GetSavedSearchesByOwner(ctx context.Context, ownerID string) ([]*types.SavedSearch, error)
|
||||
|
||||
// UpdateSavedSearch updates an existing saved search
|
||||
UpdateSavedSearch(ctx context.Context, search types.SavedSearch) error
|
||||
|
||||
// DeleteSavedSearch deletes a saved search by ID
|
||||
DeleteSavedSearch(ctx context.Context, id string) error
|
||||
|
||||
// ListSavedSearches retrieves paginated saved searches with optional filtering
|
||||
ListSavedSearches(ctx context.Context, ownerID string, limit, offset int) ([]*types.SavedSearch, int64, error)
|
||||
}
|
||||
Reference in New Issue
Block a user