slate-v3-1770514618/services/preferences-api/internal/port/preferences.go
rdev-worker 1afe983cd6
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
build: /implement-feature user-preferences
2026-02-08 02:02:18 +00:00

18 lines
573 B
Go

package port
import (
"context"
"git.threesix.ai/jordan/slate-v3-1770514618/services/preferences-api/internal/domain"
)
// PreferencesRepository defines the interface for preferences persistence operations.
type PreferencesRepository interface {
// Get returns preferences for a user.
// Returns domain.ErrPreferencesNotFound if not found.
Get(ctx context.Context, userID domain.UserID) (*domain.Preferences, error)
// Upsert stores preferences for a user (insert or replace).
Upsert(ctx context.Context, userID domain.UserID, prefs *domain.Preferences) error
}