slack5-1770541397/services/preferences-api/internal/port/preferences.go
rdev-worker e3e19a3fa8
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature user-preferences
2026-02-08 09:29:22 +00:00

19 lines
622 B
Go

package port
import (
"context"
"git.threesix.ai/jordan/slack5-1770541397/services/preferences-api/internal/domain"
)
// PreferencesRepository defines the interface for user preferences persistence.
// Implementations may use databases or in-memory storage.
type PreferencesRepository interface {
// Get returns the preferences for a user.
// Returns domain.ErrPreferencesNotFound if no preferences exist.
Get(ctx context.Context, userID domain.UserID) (*domain.UserPreferences, error)
// Upsert creates or replaces the preferences for a user.
Upsert(ctx context.Context, prefs *domain.UserPreferences) error
}