Documentation
¶
Overview ¶
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
These implementations are designed for integration-style testing where you need realistic storage behavior without the overhead of DynamoDB. Unlike mocks, in-memory repositories maintain state across operations, making them suitable for:
- Testing complex workflows that span multiple repository operations
- Integration tests that verify data persistence and retrieval
- Performance testing without network latency
All implementations are thread-safe using sync.RWMutex, allowing concurrent read/write operations from multiple goroutines without data races.
Usage:
// Create an in-memory repository
userRepo := inmemory.NewUserRepository()
// Use it like a real repository
err := userRepo.CreateUser(ctx, user)
retrieved, err := userRepo.GetUser(ctx, user.Username)
// Use with MockRepositoryStorage for full storage mocking
storage := testing.NewMockRepositoryStorage(
testing.WithUserRepository(userRepo),
)
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Package inmemory provides thread-safe in-memory implementations of repository interfaces.
Index ¶
- Constants
- Variables
- type AIRepository
- func (r *AIRepository) AnalyzeContent(ctx context.Context, _ string, modelType string) (*ai.AIAnalysis, error)
- func (r *AIRepository) Clear()
- func (r *AIRepository) GetAnalysis(_ context.Context, objectID string) (*ai.AIAnalysis, error)
- func (r *AIRepository) GetAnalysisByID(_ context.Context, _, analysisID string) (*ai.AIAnalysis, error)
- func (r *AIRepository) GetContentClassifications(ctx context.Context, contentID string) ([]string, error)
- func (r *AIRepository) GetMLFeedback(analysisID string) map[string]interface{}
- func (r *AIRepository) GetModelPerformance(modelID string) map[string]float64
- func (r *AIRepository) GetQueuedObjects() []string
- func (r *AIRepository) GetStats(_ context.Context, period string) (*ai.AIStats, error)
- func (r *AIRepository) MonitorAIHealth(_ context.Context) error
- func (r *AIRepository) ProcessMLFeedback(_ context.Context, analysisID string, feedback map[string]interface{}) error
- func (r *AIRepository) QueueForAnalysis(_ context.Context, objectID string) error
- func (r *AIRepository) SaveAnalysis(_ context.Context, analysis *ai.AIAnalysis) error
- func (r *AIRepository) UpdateModelPerformance(_ context.Context, modelID string, performanceMetrics map[string]float64) error
- type AccountRepository
- func (r *AccountRepository) AddBookmark(_ context.Context, username, objectID string) error
- func (r *AccountRepository) ApproveAccount(_ context.Context, username string) error
- func (r *AccountRepository) ClearLoginAttempts(_ context.Context, key string) error
- func (r *AccountRepository) CreateAccount(_ context.Context, account *storage.Account) error
- func (r *AccountRepository) CreateAccountNote(_ context.Context, note *storage.AccountNote) error
- func (r *AccountRepository) CreateAccountPin(_ context.Context, pin *storage.AccountPin) error
- func (r *AccountRepository) CreateDevice(_ context.Context, device *storage.Device) error
- func (r *AccountRepository) CreatePasswordReset(_ context.Context, reset *storage.PasswordReset) error
- func (r *AccountRepository) CreatePasswordResetToken(_ context.Context, username, _ string) (string, error)
- func (r *AccountRepository) CreateSession(_ context.Context, username, ipAddress, userAgent string) (*storage.Session, error)
- func (r *AccountRepository) CreateSessionFromStruct(_ context.Context, session *storage.Session) error
- func (r *AccountRepository) DeleteAccount(_ context.Context, username string) error
- func (r *AccountRepository) DeleteAccountPin(_ context.Context, username, targetActorID string) error
- func (r *AccountRepository) DeleteRecoveryToken(_ context.Context, key string) error
- func (r *AccountRepository) DeleteSession(_ context.Context, sessionID string) error
- func (r *AccountRepository) GetAccount(_ context.Context, username string) (*storage.Account, error)
- func (r *AccountRepository) GetAccountByEmail(_ context.Context, email string) (*storage.Account, error)
- func (r *AccountRepository) GetAccountByURL(_ context.Context, actorURL string) (*storage.Account, error)
- func (r *AccountRepository) GetAccountFeatures(_ context.Context, username string) (map[string]bool, error)
- func (r *AccountRepository) GetAccountPreferences(_ context.Context, username string) (map[string]interface{}, error)
- func (r *AccountRepository) GetAccountsByUsernames(_ context.Context, usernames []string) ([]*storage.Account, error)
- func (r *AccountRepository) GetAccountsCount(_ context.Context) (int64, error)
- func (r *AccountRepository) GetActor(_ context.Context, username string) (*activitypub.Actor, error)
- func (r *AccountRepository) GetActorByUsername(ctx context.Context, username string) (*activitypub.Actor, error)
- func (r *AccountRepository) GetActorPrivateKey(_ context.Context, username string) (string, error)
- func (r *AccountRepository) GetBookmarkedStatuses(_ context.Context, username string, _ interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *AccountRepository) GetBookmarks(_ context.Context, username string, limit int, cursor string) ([]*storage.Bookmark, string, error)
- func (r *AccountRepository) GetDevice(_ context.Context, deviceID string) (*storage.Device, error)
- func (r *AccountRepository) GetFeaturedAccounts(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.Account], error)
- func (r *AccountRepository) GetFieldVerification(_ context.Context, _, _ string) (*storage.ActorField, error)
- func (r *AccountRepository) GetFollowRequestState(_ context.Context, requesterID, targetID string) (string, error)
- func (r *AccountRepository) GetLinkedProviders(_ context.Context, _ string) ([]string, error)
- func (r *AccountRepository) GetLoginAttemptCount(_ context.Context, key string, _ time.Time) (int, error)
- func (r *AccountRepository) GetLoginHistory(_ context.Context, username string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.LoginAttempt], error)
- func (r *AccountRepository) GetPasswordReset(_ context.Context, token string) (*storage.PasswordReset, error)
- func (r *AccountRepository) GetPreference(_ context.Context, username, key string) (string, error)
- func (r *AccountRepository) GetRecentLoginAttempts(_ context.Context, username string, since time.Time) ([]*storage.LoginAttempt, error)
- func (r *AccountRepository) GetRecoveryToken(_ context.Context, key string) (map[string]interface{}, error)
- func (r *AccountRepository) GetSession(_ context.Context, sessionID string) (*storage.Session, error)
- func (r *AccountRepository) GetSessionByRefreshToken(_ context.Context, refreshToken string) (*storage.Session, error)
- func (r *AccountRepository) GetSuggestedAccounts(_ context.Context, _ string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.AccountSuggestion], error)
- func (r *AccountRepository) GetUser(_ context.Context, username string) (*storage.User, error)
- func (r *AccountRepository) GetUserByEmail(_ context.Context, email string) (*storage.User, error)
- func (r *AccountRepository) GetUserByRecoveryCode(_ context.Context, _ string) (*storage.User, error)
- func (r *AccountRepository) GetUserDevices(_ context.Context, username string) ([]*storage.Device, error)
- func (r *AccountRepository) GetUserSessions(_ context.Context, username string) ([]*storage.Session, error)
- func (r *AccountRepository) InvalidateAllSessions(_ context.Context, username string) error
- func (r *AccountRepository) InvalidateSession(_ context.Context, username, sessionID string) error
- func (r *AccountRepository) IsAccountPinned(_ context.Context, username, targetActorID string) (bool, error)
- func (r *AccountRepository) IsBlockedDomain(_ context.Context, userID, domain string) (bool, error)
- func (r *AccountRepository) IsRateLimited(_ context.Context, key string) (bool, time.Time, error)
- func (r *AccountRepository) RecordLogin(_ context.Context, attempt *storage.LoginAttempt) error
- func (r *AccountRepository) RecordLoginAttempt(_ context.Context, key string, success bool) error
- func (r *AccountRepository) RemoveBookmark(_ context.Context, username, objectID string) error
- func (r *AccountRepository) ResetPassword(_ context.Context, token, newPasswordHash string) error
- func (r *AccountRepository) SearchAccounts(_ context.Context, query string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.Account], error)
- func (r *AccountRepository) SilenceAccount(_ context.Context, username string, _ string) error
- func (r *AccountRepository) StoreRecoveryToken(_ context.Context, key string, data map[string]interface{}) error
- func (r *AccountRepository) StoreWebAuthnChallenge(_ context.Context, challenge *storage.WebAuthnChallenge) error
- func (r *AccountRepository) StoreWebAuthnCredential(_ context.Context, credential *storage.WebAuthnCredential) error
- func (r *AccountRepository) SuspendAccount(_ context.Context, username string, _ string) error
- func (r *AccountRepository) UnsilenceAccount(_ context.Context, username string) error
- func (r *AccountRepository) UnsuspendAccount(_ context.Context, username string) error
- func (r *AccountRepository) UpdateAccount(_ context.Context, account *storage.Account) error
- func (r *AccountRepository) UpdateAccountFeatures(_ context.Context, username string, features map[string]bool) error
- func (r *AccountRepository) UpdateAccountPreferences(_ context.Context, username string, preferences map[string]interface{}) error
- func (r *AccountRepository) UpdateDevice(_ context.Context, device *storage.Device) error
- func (r *AccountRepository) UpdateLastActivity(_ context.Context, username string, _ time.Time) error
- func (r *AccountRepository) UpdateLastLogin(_ context.Context, username string) error
- func (r *AccountRepository) UpdatePassword(_ context.Context, username, newPasswordHash string) error
- func (r *AccountRepository) UpdateSession(_ context.Context, sessionID, refreshToken, ipAddress string, ...) error
- func (r *AccountRepository) UpdateUser(_ context.Context, username string, updates map[string]interface{}) error
- func (r *AccountRepository) UpdateWalletLastUsed(_ context.Context, username, _ string) error
- func (r *AccountRepository) UpdateWebAuthnCredential(_ context.Context, credentialID string, signCount uint32) error
- func (r *AccountRepository) UsePasswordReset(_ context.Context, token string) error
- func (r *AccountRepository) ValidateCredentials(_ context.Context, username, _ string) (*storage.Account, error)
- func (r *AccountRepository) ValidatePassword(_ context.Context, username, _ string) (*storage.User, error)
- func (r *AccountRepository) ValidatePasswordResetToken(_ context.Context, token string) (*storage.PasswordReset, error)
- type ActivityMetric
- type ActivityRepository
- func (r *ActivityRepository) Clear()
- func (r *ActivityRepository) CreateActivity(_ context.Context, activity *activitypub.Activity) error
- func (r *ActivityRepository) GetActivity(_ context.Context, id string) (*activitypub.Activity, error)
- func (r *ActivityRepository) GetActivityMetrics(actorID string) []*ActivityMetric
- func (r *ActivityRepository) GetCollection(ctx context.Context, username, collectionType string, limit int, cursor string) (*activitypub.OrderedCollectionPage, error)
- func (r *ActivityRepository) GetFederationActivities(domain string) []*storage.FederationActivity
- func (r *ActivityRepository) GetHashtagActivity(_ context.Context, hashtag string, since time.Time) ([]*storage.Activity, error)
- func (r *ActivityRepository) GetInboxActivities(_ context.Context, username string, limit int, cursor string) ([]*activitypub.Activity, string, error)
- func (r *ActivityRepository) GetOutboxActivities(_ context.Context, username string, limit int, cursor string) ([]*activitypub.Activity, string, error)
- func (r *ActivityRepository) GetWeeklyActivity(_ context.Context, weekTimestamp int64) (*storage.WeeklyActivity, error)
- func (r *ActivityRepository) RecordActivity(_ context.Context, activityType string, actorID string, timestamp time.Time) error
- func (r *ActivityRepository) RecordFederationActivity(_ context.Context, activity *storage.FederationActivity) error
- func (r *ActivityRepository) SetWeeklyStats(weekTimestamp int64, stats *storage.WeeklyActivity)
- type ActorRepository
- func (r *ActorRepository) CheckAlsoKnownAs(_ context.Context, username string, targetActorID string) (bool, error)
- func (r *ActorRepository) CreateActor(_ context.Context, actor *activitypub.Actor, privateKey string) error
- func (r *ActorRepository) DeleteActor(_ context.Context, username string) error
- func (r *ActorRepository) GetAccountSuggestions(_ context.Context, _ string, limit int) ([]*activitypub.Actor, error)
- func (r *ActorRepository) GetActor(_ context.Context, username string) (*activitypub.Actor, error)
- func (r *ActorRepository) GetActorByNumericID(_ context.Context, numericID string) (*activitypub.Actor, error)
- func (r *ActorRepository) GetActorByUsername(ctx context.Context, username string) (*activitypub.Actor, error)
- func (r *ActorRepository) GetActorMigrationInfo(_ context.Context, username string) (*interfaces.MigrationInfo, error)
- func (r *ActorRepository) GetActorPrivateKey(_ context.Context, username string) (string, error)
- func (r *ActorRepository) GetActorWithMetadata(_ context.Context, username string) (*activitypub.Actor, *storage.ActorMetadata, error)
- func (r *ActorRepository) GetCachedRemoteActor(_ context.Context, handle string) (*activitypub.Actor, error)
- func (r *ActorRepository) GetSearchSuggestions(_ context.Context, prefix string) ([]storage.SearchSuggestion, error)
- func (r *ActorRepository) RemoveAccountSuggestion(_ context.Context, userID, targetID string) error
- func (r *ActorRepository) SearchAccounts(_ context.Context, query string, limit int, _ bool, _ int) ([]*activitypub.Actor, error)
- func (r *ActorRepository) SetActorFields(_ context.Context, username string, fields []storage.ActorField) error
- func (r *ActorRepository) SetCachedRemoteActor(handle string, actor *activitypub.Actor, ttl time.Duration)
- func (r *ActorRepository) UpdateActor(_ context.Context, actor *activitypub.Actor) error
- func (r *ActorRepository) UpdateActorLastStatusTime(_ context.Context, username string) error
- func (r *ActorRepository) UpdateAlsoKnownAs(_ context.Context, username string, alsoKnownAs []string) error
- func (r *ActorRepository) UpdateMovedTo(_ context.Context, username string, movedTo string) error
- type AnnouncementRepository
- func (r *AnnouncementRepository) AddAnnouncementReaction(_ context.Context, username, announcementID, emojiName string) error
- func (r *AnnouncementRepository) Clear()
- func (r *AnnouncementRepository) CreateAnnouncement(_ context.Context, announcement *storage.Announcement) error
- func (r *AnnouncementRepository) DeleteAnnouncement(_ context.Context, id string) error
- func (r *AnnouncementRepository) DismissAnnouncement(_ context.Context, username, announcementID string) error
- func (r *AnnouncementRepository) GetAnnouncement(_ context.Context, id string) (*storage.Announcement, error)
- func (r *AnnouncementRepository) GetAnnouncementReactions(_ context.Context, announcementID string) (map[string][]string, error)
- func (r *AnnouncementRepository) GetAnnouncements(_ context.Context, active bool) ([]*storage.Announcement, error)
- func (r *AnnouncementRepository) GetAnnouncementsByAdmin(_ context.Context, _ string, limit int, cursor string) ([]*storage.Announcement, string, error)
- func (r *AnnouncementRepository) GetAnnouncementsPaginated(_ context.Context, active bool, limit int, cursor string) ([]*storage.Announcement, string, error)
- func (r *AnnouncementRepository) GetDismissedAnnouncements(_ context.Context, username string) ([]string, error)
- func (r *AnnouncementRepository) IsDismissed(_ context.Context, username, announcementID string) (bool, error)
- func (r *AnnouncementRepository) RemoveAnnouncementReaction(_ context.Context, username, announcementID, emojiName string) error
- func (r *AnnouncementRepository) UpdateAnnouncement(_ context.Context, announcement *storage.Announcement) error
- type ArticleRepository
- func (r *ArticleRepository) Clear()
- func (r *ArticleRepository) CreateArticle(_ context.Context, article *models.Article) error
- func (r *ArticleRepository) DeleteArticle(_ context.Context, id string) error
- func (r *ArticleRepository) GetArticle(_ context.Context, id string) (*models.Article, error)
- func (r *ArticleRepository) GetDB() dynamormcore.DB
- func (r *ArticleRepository) ListArticles(ctx context.Context, limit int) ([]*models.Article, error)
- func (r *ArticleRepository) ListArticlesByAuthorPaginated(_ context.Context, authorActorID string, limit int, cursor string) ([]*models.Article, string, error)
- func (r *ArticleRepository) ListArticlesByCategoryPaginated(_ context.Context, categoryID string, limit int, cursor string) ([]*models.Article, string, error)
- func (r *ArticleRepository) ListArticlesBySeriesPaginated(_ context.Context, seriesID string, limit int, cursor string) ([]*models.Article, string, error)
- func (r *ArticleRepository) ListArticlesPaginated(_ context.Context, limit int, cursor string) ([]*models.Article, string, error)
- func (r *ArticleRepository) UpdateArticle(_ context.Context, article *models.Article) error
- type AuditRepository
- func (r *AuditRepository) CleanupOldLogs(_ context.Context, retentionDays int) error
- func (r *AuditRepository) Clear()
- func (r *AuditRepository) GetAuditLogByID(_ context.Context, id string, _ time.Time) (*models.AuthAuditLog, error)
- func (r *AuditRepository) GetIPAuditLogs(_ context.Context, ipAddress string, limit int, startTime, endTime time.Time) ([]*models.AuthAuditLog, error)
- func (r *AuditRepository) GetRecentFailedLogins(_ context.Context, username string, duration time.Duration) (int, error)
- func (r *AuditRepository) GetRecentIPFailures(_ context.Context, ipAddress string, duration time.Duration) (int, error)
- func (r *AuditRepository) GetSecurityEvents(_ context.Context, severity string, startTime, endTime time.Time, limit int, ...) ([]*models.AuthAuditLog, string, error)
- func (r *AuditRepository) GetSessionAuditLogs(_ context.Context, sessionID string) ([]*models.AuthAuditLog, error)
- func (r *AuditRepository) GetUserAuditLogs(_ context.Context, username string, limit int, startTime, endTime time.Time) ([]*models.AuthAuditLog, error)
- func (r *AuditRepository) StoreAuditEvent(ctx context.Context, ...) error
- func (r *AuditRepository) StoreAuditLog(_ context.Context, log *models.AuthAuditLog) error
- type BookmarkRepository
- func (r *BookmarkRepository) AddBookmark(ctx context.Context, username, objectID string) error
- func (r *BookmarkRepository) CascadeDeleteObjectBookmarks(_ context.Context, objectID string) error
- func (r *BookmarkRepository) CascadeDeleteUserBookmarks(_ context.Context, username string) error
- func (r *BookmarkRepository) CheckBookmarksForStatuses(_ context.Context, username string, statusIDs []string) (map[string]bool, error)
- func (r *BookmarkRepository) Clear()
- func (r *BookmarkRepository) CountUserBookmarks(_ context.Context, username string) (int64, error)
- func (r *BookmarkRepository) CreateBookmark(_ context.Context, username, objectID string) (*models.Bookmark, error)
- func (r *BookmarkRepository) DeleteBookmark(_ context.Context, username, objectID string) error
- func (r *BookmarkRepository) GetBookmark(_ context.Context, username, objectID string) (*models.Bookmark, error)
- func (r *BookmarkRepository) GetBookmarkCount() int
- func (r *BookmarkRepository) GetBookmarks(ctx context.Context, username string, limit int, cursor string) ([]*storage.Bookmark, string, error)
- func (r *BookmarkRepository) GetUserBookmarks(_ context.Context, username string, limit int, cursor string) ([]*models.Bookmark, string, error)
- func (r *BookmarkRepository) IsBookmarked(_ context.Context, username, objectID string) (bool, error)
- func (r *BookmarkRepository) RemoveBookmark(ctx context.Context, username, objectID string) error
- type CategoryRepository
- func (r *CategoryRepository) Clear()
- func (r *CategoryRepository) CreateCategory(_ context.Context, category *models.Category) error
- func (r *CategoryRepository) Delete(_ context.Context, _, sk string) error
- func (r *CategoryRepository) GetCategory(_ context.Context, id string) (*models.Category, error)
- func (r *CategoryRepository) GetDB() dynamormcore.DB
- func (r *CategoryRepository) ListCategories(_ context.Context, parentID *string, limit int) ([]*models.Category, error)
- func (r *CategoryRepository) Update(_ context.Context, category *models.Category) error
- func (r *CategoryRepository) UpdateArticleCount(_ context.Context, categoryID string, delta int) error
- type CloudWatchMetricsRepository
- func (r *CloudWatchMetricsRepository) CacheMetrics(_ context.Context, serviceName string, metrics *interfaces.ServiceMetrics) error
- func (r *CloudWatchMetricsRepository) Clear()
- func (r *CloudWatchMetricsRepository) Count() int
- func (r *CloudWatchMetricsRepository) GetCachedMetrics(_ context.Context, serviceName string) (*interfaces.ServiceMetrics, error)
- func (r *CloudWatchMetricsRepository) GetCostBreakdown(_ context.Context, _ time.Duration) (*interfaces.CostBreakdown, error)
- func (r *CloudWatchMetricsRepository) GetInstanceMetrics(ctx context.Context, period time.Duration) (*interfaces.ServiceMetrics, error)
- func (r *CloudWatchMetricsRepository) GetServiceMetrics(_ context.Context, serviceName string, _ time.Duration) (*interfaces.ServiceMetrics, error)
- func (r *CloudWatchMetricsRepository) SetServiceMetrics(serviceName string, metrics *interfaces.ServiceMetrics)
- type CommunityNoteRepository
- func (r *CommunityNoteRepository) Clear()
- func (r *CommunityNoteRepository) CreateCommunityNote(_ context.Context, note *storage.CommunityNote) error
- func (r *CommunityNoteRepository) CreateCommunityNoteVote(_ context.Context, vote *storage.CommunityNoteVote) error
- func (r *CommunityNoteRepository) GetCommunityNote(_ context.Context, noteID string) (*storage.CommunityNote, error)
- func (r *CommunityNoteRepository) GetCommunityNoteVotes(_ context.Context, noteID string) ([]*storage.CommunityNoteVote, error)
- func (r *CommunityNoteRepository) GetCommunityNotesByAuthor(_ context.Context, authorID string, limit int, cursor string) ([]*storage.CommunityNote, string, error)
- func (r *CommunityNoteRepository) GetUserCommunityNoteVotes(_ context.Context, userID string, noteIDs []string) (map[string]*storage.CommunityNoteVote, error)
- func (r *CommunityNoteRepository) GetUserVotingHistory(_ context.Context, userID string, limit int) ([]*storage.CommunityNoteVote, error)
- func (r *CommunityNoteRepository) GetVisibleCommunityNotes(_ context.Context, objectID string) ([]*storage.CommunityNote, error)
- func (r *CommunityNoteRepository) UpdateCommunityNoteAnalysis(_ context.Context, noteID string, ...) error
- func (r *CommunityNoteRepository) UpdateCommunityNoteScore(_ context.Context, noteID string, score float64, status string) error
- type ConversationRepository
- func (r *ConversationRepository) AddParticipant(_ context.Context, conversationID, participantID string) error
- func (r *ConversationRepository) AddStatusToConversation(_ context.Context, conversationID, statusID, senderUsername string) error
- func (r *ConversationRepository) Clear()
- func (r *ConversationRepository) CreateConversation(_ context.Context, conversation *models.Conversation, participants []string) error
- func (r *ConversationRepository) CreateConversationMute(_ context.Context, mute *storage.ConversationMute) error
- func (r *ConversationRepository) DeleteConversation(_ context.Context, id string) error
- func (r *ConversationRepository) DeleteConversationMute(_ context.Context, username, conversationID string) error
- func (r *ConversationRepository) GetConversation(_ context.Context, id string) (*models.Conversation, error)
- func (r *ConversationRepository) GetConversationByParticipants(_ context.Context, participants []string) (*models.Conversation, error)
- func (r *ConversationRepository) GetConversationParticipants(_ context.Context, conversationID string) ([]string, error)
- func (r *ConversationRepository) GetConversationStatuses(_ context.Context, conversationID string, limit int, _ string) ([]*storage.ConversationStatus, string, error)
- func (r *ConversationRepository) GetMutedConversations(_ context.Context, username string) ([]string, error)
- func (r *ConversationRepository) GetUnreadConversationCount(_ context.Context, username string) (int, error)
- func (r *ConversationRepository) GetUnreadConversations(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Conversation], error)
- func (r *ConversationRepository) GetUnreadStatusCount(_ context.Context, conversationID, username string) (int, error)
- func (r *ConversationRepository) GetUserConversations(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Conversation], error)
- func (r *ConversationRepository) IsConversationMuted(_ context.Context, username, conversationID string) (bool, error)
- func (r *ConversationRepository) LeaveConversation(ctx context.Context, conversationID, username string) error
- func (r *ConversationRepository) MarkConversationRead(_ context.Context, conversationID, username string) error
- func (r *ConversationRepository) MarkConversationUnread(_ context.Context, conversationID, userID string) error
- func (r *ConversationRepository) MarkStatusRead(_ context.Context, conversationID, statusID, username string) error
- func (r *ConversationRepository) RemoveParticipant(_ context.Context, conversationID, participantID string) error
- func (r *ConversationRepository) RemoveStatusFromConversation(_ context.Context, conversationID, statusID string) error
- func (r *ConversationRepository) SearchConversations(_ context.Context, userID, query string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Conversation], error)
- func (r *ConversationRepository) UpdateConversation(_ context.Context, conversation *models.Conversation) error
- func (r *ConversationRepository) UpdateConversationLastStatus(_ context.Context, id, lastStatusID string) error
- type DLQRepository
- func (r *DLQRepository) AnalyzeFailurePatterns(_ context.Context, service string, days int) (map[string]*interfaces.DLQSimilarityGroup, error)
- func (r *DLQRepository) BatchUpdateDLQMessages(ctx context.Context, messages []*models.DLQMessage) error
- func (r *DLQRepository) CleanupExpiredMessages(_ context.Context, before time.Time) (int, error)
- func (r *DLQRepository) Clear()
- func (r *DLQRepository) Count() int
- func (r *DLQRepository) CreateDLQMessage(_ context.Context, message *models.DLQMessage) error
- func (r *DLQRepository) DeleteDLQMessage(_ context.Context, message *models.DLQMessage) error
- func (r *DLQRepository) GetDLQAnalytics(_ context.Context, service string, timeRange interfaces.DLQTimeRange) (*interfaces.DLQAnalytics, error)
- func (r *DLQRepository) GetDLQMessage(_ context.Context, id string) (*models.DLQMessage, error)
- func (r *DLQRepository) GetDLQMessagesByErrorType(_ context.Context, errorType string, limit int, cursor string) ([]*models.DLQMessage, string, error)
- func (r *DLQRepository) GetDLQMessagesByService(_ context.Context, service string, date time.Time, limit int, cursor string) ([]*models.DLQMessage, string, error)
- func (r *DLQRepository) GetDLQMessagesByServiceDateRange(_ context.Context, service string, startDate, endDate time.Time, limit int) ([]*models.DLQMessage, error)
- func (r *DLQRepository) GetDLQMessagesByStatus(_ context.Context, service, status string, limit int, cursor string) ([]*models.DLQMessage, string, error)
- func (r *DLQRepository) GetDLQMessagesForReprocessing(_ context.Context, service string, status string, limit int, cursor string) ([]*models.DLQMessage, string, error)
- func (r *DLQRepository) GetDLQTrends(_ context.Context, service string, days int) (*interfaces.DLQTrends, error)
- func (r *DLQRepository) GetRetryableMessages(_ context.Context, service string, limit int) ([]*models.DLQMessage, error)
- func (r *DLQRepository) GetSimilarMessages(_ context.Context, similarityHash string, limit int) ([]*models.DLQMessage, error)
- func (r *DLQRepository) MonitorDLQHealth(_ context.Context, service string) (*interfaces.DLQHealthStatus, error)
- func (r *DLQRepository) RetryFailedMessage(_ context.Context, messageID string) error
- func (r *DLQRepository) SearchDLQMessages(_ context.Context, filter *interfaces.DLQSearchFilter) ([]*models.DLQMessage, string, error)
- func (r *DLQRepository) SendToDeadLetterQueue(ctx context.Context, ...) error
- func (r *DLQRepository) UpdateDLQMessage(_ context.Context, message *models.DLQMessage) error
- type DNSCacheRepository
- func (r *DNSCacheRepository) CleanupExpired()
- func (r *DNSCacheRepository) Clear()
- func (r *DNSCacheRepository) GetDNSCache(_ context.Context, hostname string) (*storage.DNSCacheEntry, error)
- func (r *DNSCacheRepository) InvalidateDNSCache(_ context.Context, hostname string) error
- func (r *DNSCacheRepository) SetDNSCache(_ context.Context, entry *storage.DNSCacheEntry) error
- type DomainBlockRepository
- func (r *DomainBlockRepository) AddDomainBlock(_ context.Context, username, domain string) error
- func (r *DomainBlockRepository) Clear()
- func (r *DomainBlockRepository) CreateDomainAllow(_ context.Context, allow *storage.DomainAllow) error
- func (r *DomainBlockRepository) CreateDomainBlock(ctx context.Context, block *storage.InstanceDomainBlock) error
- func (r *DomainBlockRepository) CreateEmailDomainBlock(_ context.Context, block *storage.EmailDomainBlock) error
- func (r *DomainBlockRepository) CreateInstanceDomainBlock(_ context.Context, block *storage.InstanceDomainBlock) error
- func (r *DomainBlockRepository) DeleteDomainAllow(_ context.Context, id string) error
- func (r *DomainBlockRepository) DeleteDomainBlock(_ context.Context, id string) error
- func (r *DomainBlockRepository) DeleteEmailDomainBlock(_ context.Context, id string) error
- func (r *DomainBlockRepository) DeleteInstanceDomainBlock(_ context.Context, domain string) error
- func (r *DomainBlockRepository) GetDomainAllows(_ context.Context, _ int, _ string) ([]*storage.DomainAllow, string, error)
- func (r *DomainBlockRepository) GetDomainBlock(ctx context.Context, id string) (*storage.InstanceDomainBlock, error)
- func (r *DomainBlockRepository) GetDomainBlocks(ctx context.Context, limit int, cursor string) ([]*storage.InstanceDomainBlock, string, error)
- func (r *DomainBlockRepository) GetEmailDomainBlocks(_ context.Context, _ int, _ string) ([]*storage.EmailDomainBlock, string, error)
- func (r *DomainBlockRepository) GetInstanceDomainBlock(_ context.Context, domain string) (*storage.InstanceDomainBlock, error)
- func (r *DomainBlockRepository) GetInstanceDomainBlockByID(_ context.Context, id string) (*storage.InstanceDomainBlock, error)
- func (r *DomainBlockRepository) GetUserDomainBlocks(_ context.Context, username string, _ int, _ string) ([]string, string, error)
- func (r *DomainBlockRepository) IsBlockedDomain(_ context.Context, username, domain string) (bool, error)
- func (r *DomainBlockRepository) IsDomainBlocked(ctx context.Context, domain string) (bool, *storage.InstanceDomainBlock, error)
- func (r *DomainBlockRepository) IsInstanceDomainBlocked(_ context.Context, domain string) (bool, *storage.InstanceDomainBlock, error)
- func (r *DomainBlockRepository) ListInstanceDomainBlocks(_ context.Context, _ int, _ string) ([]*storage.InstanceDomainBlock, string, error)
- func (r *DomainBlockRepository) RemoveDomainBlock(_ context.Context, username, domain string) error
- func (r *DomainBlockRepository) UpdateDomainBlock(_ context.Context, id string, updates map[string]any) error
- func (r *DomainBlockRepository) UpdateInstanceDomainBlock(_ context.Context, domain string, updates map[string]any) error
- type DraftRepository
- func (r *DraftRepository) Clear()
- func (r *DraftRepository) CreateDraft(_ context.Context, draft *models.Draft) error
- func (r *DraftRepository) DeleteDraft(_ context.Context, authorID, draftID string) error
- func (r *DraftRepository) GetDraft(_ context.Context, authorID, draftID string) (*models.Draft, error)
- func (r *DraftRepository) ListDraftsByAuthor(ctx context.Context, authorID string, limit int) ([]*models.Draft, error)
- func (r *DraftRepository) ListDraftsByAuthorPaginated(_ context.Context, authorID string, limit int, cursor string) ([]*models.Draft, string, error)
- func (r *DraftRepository) ListScheduledDraftsDuePaginated(_ context.Context, dueBefore time.Time, limit int, cursor string) ([]*models.Draft, string, error)
- func (r *DraftRepository) UpdateDraft(_ context.Context, draft *models.Draft) error
- type EmojiRepository
- func (r *EmojiRepository) Clear()
- func (r *EmojiRepository) CreateCustomEmoji(_ context.Context, emoji *storage.CustomEmoji) error
- func (r *EmojiRepository) DeleteCustomEmoji(_ context.Context, shortcode string) error
- func (r *EmojiRepository) GetCustomEmoji(_ context.Context, shortcode string) (*storage.CustomEmoji, error)
- func (r *EmojiRepository) GetCustomEmojis(_ context.Context) ([]*storage.CustomEmoji, error)
- func (r *EmojiRepository) GetCustomEmojisByCategory(_ context.Context, category string) ([]*storage.CustomEmoji, error)
- func (r *EmojiRepository) GetPopularEmojis(_ context.Context, domain string, limit int) ([]*storage.CustomEmoji, error)
- func (r *EmojiRepository) GetRemoteEmoji(_ context.Context, shortcode, domain string) (*storage.CustomEmoji, error)
- func (r *EmojiRepository) IncrementEmojiUsage(_ context.Context, shortcode string) error
- func (r *EmojiRepository) SearchEmojis(_ context.Context, query string, limit int) ([]*storage.CustomEmoji, error)
- func (r *EmojiRepository) UpdateCustomEmoji(_ context.Context, emoji *storage.CustomEmoji) error
- type ExportRepository
- func (r *ExportRepository) Clear()
- func (r *ExportRepository) CreateExport(_ context.Context, export *models.Export) error
- func (r *ExportRepository) CreateExportCostTracking(_ context.Context, costTracking *models.ExportCostTracking) error
- func (r *ExportRepository) GetExport(_ context.Context, exportID string) (*models.Export, error)
- func (r *ExportRepository) GetExportCostSummary(ctx context.Context, username string, startDate, endDate time.Time) (*models.ExportCostSummary, error)
- func (r *ExportRepository) GetExportCostTracking(_ context.Context, exportID string) ([]*models.ExportCostTracking, error)
- func (r *ExportRepository) GetExportCostsByDateRange(_ context.Context, startDate, endDate time.Time, limit int) ([]*models.ExportCostTracking, error)
- func (r *ExportRepository) GetExportsForUser(_ context.Context, username string, limit int, cursor string) ([]*models.Export, string, error)
- func (r *ExportRepository) GetHighCostExports(_ context.Context, thresholdMicroCents int64, startDate, endDate time.Time, ...) ([]*models.ExportCostTracking, error)
- func (r *ExportRepository) GetUserExportCosts(_ context.Context, username string, startDate, endDate time.Time, limit int) ([]*models.ExportCostTracking, error)
- func (r *ExportRepository) GetUserExportsByStatus(_ context.Context, username string, statuses []string) ([]*models.Export, error)
- func (r *ExportRepository) UpdateExportStatus(_ context.Context, exportID, status string, completionData map[string]any, ...) error
- type FeaturedTagRepository
- func (r *FeaturedTagRepository) Clear()
- func (r *FeaturedTagRepository) CreateFeaturedTag(_ context.Context, tag *storage.FeaturedTag) error
- func (r *FeaturedTagRepository) DeleteFeaturedTag(_ context.Context, username, name string) error
- func (r *FeaturedTagRepository) GetFeaturedTags(_ context.Context, username string) ([]*storage.FeaturedTag, error)
- func (r *FeaturedTagRepository) GetTagSuggestions(_ context.Context, username string, limit int) ([]string, error)
- func (r *FeaturedTagRepository) RecordTagUsage(username, tagName string)
- type FederationRepository
- func (r *FederationRepository) CalculateFederationClusters(_ context.Context) ([]*storage.InstanceCluster, error)
- func (r *FederationRepository) Clear()
- func (r *FederationRepository) GetCostProjections(_ context.Context, _ string) (*storage.CostProjection, error)
- func (r *FederationRepository) GetFederationCosts(_ context.Context, _, _ time.Time, _ int, _ string) ([]*storage.FederationCost, string, error)
- func (r *FederationRepository) GetFederationEdges(_ context.Context, _ []string) ([]*storage.FederationEdge, error)
- func (r *FederationRepository) GetFederationNodes(_ context.Context, _ int) ([]*storage.FederationNode, error)
- func (r *FederationRepository) GetFederationNodesByHealth(_ context.Context, _ string, _ int) ([]*storage.FederationNode, error)
- func (r *FederationRepository) GetFederationStatistics(_ context.Context, _, _ time.Time) (*storage.FederationStats, error)
- func (r *FederationRepository) GetInstanceHealthReport(_ context.Context, domain string, _ time.Duration) (*storage.InstanceHealthReport, error)
- func (r *FederationRepository) GetInstanceInfo(_ context.Context, domain string) (*storage.InstanceInfo, error)
- func (r *FederationRepository) GetInstanceMetadata(_ context.Context, domain string) (*storage.InstanceMetadata, error)
- func (r *FederationRepository) GetInstanceStats(_ context.Context, domain string) (*storage.InstanceStats, error)
- func (r *FederationRepository) GetKnownInstances(_ context.Context, limit int, cursor string) ([]*storage.InstanceInfo, string, error)
- func (r *FederationRepository) RecordFederationActivity(_ context.Context, activity *storage.FederationActivity) error
- func (r *FederationRepository) UpsertInstanceInfo(_ context.Context, info *storage.InstanceInfo) error
- type FilterRepository
- func (r *FilterRepository) AddFilterKeyword(_ context.Context, keyword *models.FilterKeyword) error
- func (r *FilterRepository) AddFilterStatus(_ context.Context, filterStatus *models.FilterStatus) error
- func (r *FilterRepository) CheckContentFiltered(ctx context.Context, username, statusID string, contexts []string) (bool, []*models.Filter, error)
- func (r *FilterRepository) Clear()
- func (r *FilterRepository) CreateFilter(_ context.Context, filter *models.Filter) error
- func (r *FilterRepository) DeleteFilter(_ context.Context, filterID string) error
- func (r *FilterRepository) EvaluateFilters(ctx context.Context, username string, content string, contexts []string) ([]*models.Filter, error)
- func (r *FilterRepository) GetActiveFilters(_ context.Context, username string, contexts []string) ([]*models.Filter, error)
- func (r *FilterRepository) GetFilter(_ context.Context, filterID string) (*models.Filter, error)
- func (r *FilterRepository) GetFilterKeywords(_ context.Context, filterID string) ([]*models.FilterKeyword, error)
- func (r *FilterRepository) GetFilterStatuses(_ context.Context, filterID string) ([]*models.FilterStatus, error)
- func (r *FilterRepository) GetUserFilters(_ context.Context, username string) ([]*models.Filter, error)
- func (r *FilterRepository) RemoveFilterKeyword(_ context.Context, keywordID string) error
- func (r *FilterRepository) RemoveFilterStatus(_ context.Context, filterStatusID string) error
- func (r *FilterRepository) UpdateFilter(_ context.Context, filter *models.Filter) error
- type HashtagRepository
- func (r *HashtagRepository) Clear()
- func (r *HashtagRepository) FollowHashtag(_ context.Context, userID, hashtag string) error
- func (r *HashtagRepository) GetHashtagActivity(_ context.Context, hashtag string, since time.Time) ([]*storage.Activity, error)
- func (r *HashtagRepository) GetHashtagFollow(_ context.Context, userID string, hashtag string) (*models.HashtagFollow, error)
- func (r *HashtagRepository) GetHashtagInfo(_ context.Context, hashtag string) (*storage.Hashtag, error)
- func (r *HashtagRepository) GetHashtagMute(_ context.Context, userID string, hashtag string) (*models.HashtagMute, error)
- func (r *HashtagRepository) GetHashtagStats(_ context.Context, hashtag string) (any, error)
- func (r *HashtagRepository) GetHashtagTimelineAdvanced(_ context.Context, _ string, _ *string, _ int, _ string) ([]*storage.StatusSearchResult, error)
- func (r *HashtagRepository) GetHashtagUsageHistory(_ context.Context, _ string, days int) ([]int64, error)
- func (r *HashtagRepository) GetMultiHashtagTimeline(_ context.Context, _ []string, _ *string, _ int, _ string) ([]*storage.StatusSearchResult, error)
- func (r *HashtagRepository) GetSuggestedHashtags(_ context.Context, _ string, _ int) ([]*storage.HashtagSearchResult, error)
- func (r *HashtagRepository) IndexHashtag(_ context.Context, hashtag string, statusID string, _ string, _ string) error
- func (r *HashtagRepository) IndexStatusHashtags(_ context.Context, statusID string, _ string, _ string, _ string, _ string, ...) error
- func (r *HashtagRepository) IsFollowingHashtag(_ context.Context, userID, hashtag string) (bool, error)
- func (r *HashtagRepository) RemoveStatusFromHashtagIndex(_ context.Context, statusID string) error
- func (r *HashtagRepository) UnfollowHashtag(_ context.Context, userID, hashtag string) error
- type ImportRepository
- func (r *ImportRepository) CheckBudgetLimits(ctx context.Context, username string, ...) (*models.ImportBudget, bool, error)
- func (r *ImportRepository) Clear()
- func (r *ImportRepository) CreateImport(_ context.Context, importRecord *models.Import) error
- func (r *ImportRepository) CreateImportBudget(_ context.Context, budget *models.ImportBudget) error
- func (r *ImportRepository) CreateImportCostTracking(_ context.Context, costTracking *models.ImportCostTracking) error
- func (r *ImportRepository) GetHighCostImports(_ context.Context, thresholdMicroCents int64, startDate, endDate time.Time, ...) ([]*models.ImportCostTracking, error)
- func (r *ImportRepository) GetImport(_ context.Context, importID string) (*models.Import, error)
- func (r *ImportRepository) GetImportBudget(_ context.Context, username, period string) (*models.ImportBudget, error)
- func (r *ImportRepository) GetImportCostSummary(ctx context.Context, username string, startDate, endDate time.Time) (*models.ImportCostSummary, error)
- func (r *ImportRepository) GetImportCostTracking(_ context.Context, importID string) ([]*models.ImportCostTracking, error)
- func (r *ImportRepository) GetImportCostsByDateRange(_ context.Context, startDate, endDate time.Time, limit int) ([]*models.ImportCostTracking, error)
- func (r *ImportRepository) GetImportsForUser(_ context.Context, username string, limit int, cursor string) ([]*models.Import, string, error)
- func (r *ImportRepository) GetUserImportCosts(_ context.Context, username string, startDate, endDate time.Time, limit int) ([]*models.ImportCostTracking, error)
- func (r *ImportRepository) GetUserImportsByStatus(_ context.Context, username string, statuses []string) ([]*models.Import, error)
- func (r *ImportRepository) UpdateBudgetUsage(ctx context.Context, username, period string, ...) error
- func (r *ImportRepository) UpdateImportBudget(_ context.Context, budget *models.ImportBudget) error
- func (r *ImportRepository) UpdateImportProgress(_ context.Context, importID string, progress int) error
- func (r *ImportRepository) UpdateImportStatus(_ context.Context, importID, status string, completionData map[string]any, ...) error
- type InstanceRepository
- func (r *InstanceRepository) Clear()
- func (r *InstanceRepository) EnsureAgentInstanceConfig(_ context.Context) (*models.AgentInstanceConfig, error)
- func (r *InstanceRepository) EnsureInstanceState(_ context.Context) (*models.InstanceState, error)
- func (r *InstanceRepository) GetActiveUserCount(_ context.Context, _ int) (int64, error)
- func (r *InstanceRepository) GetAgentInstanceConfig(_ context.Context) (*models.AgentInstanceConfig, error)
- func (r *InstanceRepository) GetContactAccount(_ context.Context) (*storage.ActorRecord, error)
- func (r *InstanceRepository) GetDailyActiveUserCount(_ context.Context) (int64, error)
- func (r *InstanceRepository) GetDomainStats(_ context.Context, _ string) (any, error)
- func (r *InstanceRepository) GetExtendedDescription(_ context.Context) (string, time.Time, error)
- func (r *InstanceRepository) GetInstanceRules(_ context.Context) ([]storage.InstanceRule, error)
- func (r *InstanceRepository) GetInstanceState(_ context.Context) (*models.InstanceState, error)
- func (r *InstanceRepository) GetLocalCommentCount(_ context.Context) (int64, error)
- func (r *InstanceRepository) GetLocalPostCount(_ context.Context) (int64, error)
- func (r *InstanceRepository) GetMetricsSummary(_ context.Context, _ string) (map[string]interface{}, error)
- func (r *InstanceRepository) GetRulesByCategory(_ context.Context, _ string) ([]storage.InstanceRule, error)
- func (r *InstanceRepository) GetStorageHistory(_ context.Context, _ int) ([]any, error)
- func (r *InstanceRepository) GetStorageUsage(_ context.Context) (any, error)
- func (r *InstanceRepository) GetTotalDomainCount(_ context.Context) (int64, error)
- func (r *InstanceRepository) GetTotalStatusCount(_ context.Context) (int64, error)
- func (r *InstanceRepository) GetTotalUserCount(_ context.Context) (int64, error)
- func (r *InstanceRepository) GetUserGrowthHistory(_ context.Context, _ int) ([]any, error)
- func (r *InstanceRepository) GetWeeklyActivity(_ context.Context, weekTimestamp int64) (*storage.WeeklyActivity, error)
- func (r *InstanceRepository) RecordActivity(_ context.Context, _ string, _ string, _ time.Time) error
- func (r *InstanceRepository) RecordDailyMetrics(_ context.Context, date string, metrics map[string]interface{}) error
- func (r *InstanceRepository) SetAgentInstanceConfig(_ context.Context, cfg *models.AgentInstanceConfig) error
- func (r *InstanceRepository) SetBootstrapWalletAddress(_ context.Context, address string) error
- func (r *InstanceRepository) SetExtendedDescription(_ context.Context, description string) error
- func (r *InstanceRepository) SetInstanceLocked(_ context.Context, locked bool) error
- func (r *InstanceRepository) SetInstanceRules(_ context.Context, rules []storage.InstanceRule) error
- func (r *InstanceRepository) SetPrimaryAdminUsername(_ context.Context, username string) error
- type LikeRepository
- func (r *LikeRepository) CascadeDeleteLikes(_ context.Context, objectID string) error
- func (r *LikeRepository) Clear()
- func (r *LikeRepository) CountActorLikes(_ context.Context, actorID string) (int64, error)
- func (r *LikeRepository) CountForObject(ctx context.Context, objectID string) (int64, error)
- func (r *LikeRepository) CreateLike(_ context.Context, actor, object, statusAuthorID string) (*models.Like, error)
- func (r *LikeRepository) DeleteLike(_ context.Context, actor, object string) error
- func (r *LikeRepository) GetActorLikes(_ context.Context, actorID string, limit int, cursor string) ([]*models.Like, string, error)
- func (r *LikeRepository) GetBoostCount(_ context.Context, statusID string) (int64, error)
- func (r *LikeRepository) GetForObject(ctx context.Context, objectID string, limit int, cursor string) ([]*models.Like, string, error)
- func (r *LikeRepository) GetLike(_ context.Context, actor, object string) (*models.Like, error)
- func (r *LikeRepository) GetLikeCount(_ context.Context, statusID string) (int64, error)
- func (r *LikeRepository) GetLikeCountTotal() int
- func (r *LikeRepository) GetLikedObjects(ctx context.Context, actorID string, limit int, cursor string) ([]*models.Like, string, error)
- func (r *LikeRepository) GetObjectLikes(_ context.Context, objectID string, limit int, cursor string) ([]*models.Like, string, error)
- func (r *LikeRepository) GetTombstone(_ context.Context, objectID string) (*storage.Tombstone, error)
- func (r *LikeRepository) HasLiked(_ context.Context, actor, object string) (bool, error)
- func (r *LikeRepository) HasReblogged(_ context.Context, actorID, statusID string) (bool, error)
- func (r *LikeRepository) IncrementReblogCount(_ context.Context, objectID string) error
- func (r *LikeRepository) SetReblog(actorID, statusID string, reblogged bool)
- func (r *LikeRepository) TombstoneObject(_ context.Context, objectID string, deletedBy string) error
- type ListRepository
- func (r *ListRepository) AddAccountsToList(_ context.Context, listID string, accountIDs []string) error
- func (r *ListRepository) AddListMember(_ context.Context, listID, memberUsername string) error
- func (r *ListRepository) Clear()
- func (r *ListRepository) CountListMembers(_ context.Context, listID string) (int, error)
- func (r *ListRepository) CountUserLists(_ context.Context, username string) (int, error)
- func (r *ListRepository) CreateList(_ context.Context, list *models.List) error
- func (r *ListRepository) DeleteList(_ context.Context, listID string) error
- func (r *ListRepository) GetAccountLists(_ context.Context, accountID string) ([]*storage.List, error)
- func (r *ListRepository) GetAccountListsForUser(_ context.Context, accountID, username string) ([]*storage.List, error)
- func (r *ListRepository) GetAccountListsPaginated(_ context.Context, accountID string, limit int, cursor string) ([]*storage.List, string, error)
- func (r *ListRepository) GetExclusiveLists(_ context.Context, username string) ([]*storage.List, error)
- func (r *ListRepository) GetList(_ context.Context, listID string) (*models.List, error)
- func (r *ListRepository) GetListAccounts(_ context.Context, listID string) ([]string, error)
- func (r *ListRepository) GetListCount() int
- func (r *ListRepository) GetListMembers(_ context.Context, listID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.Account], error)
- func (r *ListRepository) GetListStatuses(_ context.Context, listID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *ListRepository) GetListTimeline(_ context.Context, listID string, _ interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *ListRepository) GetListsByMember(_ context.Context, memberUsername string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.List], error)
- func (r *ListRepository) GetListsContainingAccount(_ context.Context, accountID, username string) ([]*storage.List, error)
- func (r *ListRepository) GetListsForUser(_ context.Context, username string) ([]*storage.List, error)
- func (r *ListRepository) GetListsForUserPaginated(_ context.Context, username string, limit int, cursor string) ([]*storage.List, string, error)
- func (r *ListRepository) GetMemberCount() int
- func (r *ListRepository) GetUserLists(_ context.Context, username string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.List], error)
- func (r *ListRepository) IsListMember(_ context.Context, listID, memberUsername string) (bool, error)
- func (r *ListRepository) RemoveAccountFromAllLists(_ context.Context, accountID string) error
- func (r *ListRepository) RemoveAccountsFromList(_ context.Context, listID string, accountIDs []string) error
- func (r *ListRepository) RemoveListMember(_ context.Context, listID, memberUsername string) error
- func (r *ListRepository) UpdateList(_ context.Context, list *models.List) error
- type MarkerRepository
- type MediaAnalyticsRepository
- func (r *MediaAnalyticsRepository) CalculatePopularityMetrics(_ context.Context, mediaID string, days int) (map[string]interface{}, error)
- func (r *MediaAnalyticsRepository) CleanupOldAnalytics(_ context.Context, olderThan time.Duration) error
- func (r *MediaAnalyticsRepository) Clear()
- func (r *MediaAnalyticsRepository) GenerateAnalyticsReport(_ context.Context, startDate, endDate string) (map[string]interface{}, error)
- func (r *MediaAnalyticsRepository) GetAllMediaAnalyticsByTimeRange(_ context.Context, startTime, endTime time.Time, limit int) ([]*models.MediaAnalytics, error)
- func (r *MediaAnalyticsRepository) GetBandwidthByTimeRange(_ context.Context, startTime, endTime time.Time, limit int) ([]*models.MediaAnalytics, error)
- func (r *MediaAnalyticsRepository) GetContentRecommendations(_ context.Context, _ string, limit int) ([]map[string]interface{}, error)
- func (r *MediaAnalyticsRepository) GetDailyCostSummary(ctx context.Context, date string) (map[string]interface{}, error)
- func (r *MediaAnalyticsRepository) GetMediaAnalyticsByDate(_ context.Context, date string) ([]*models.MediaAnalytics, error)
- func (r *MediaAnalyticsRepository) GetMediaAnalyticsByID(_ context.Context, format string, timestamp time.Time, mediaID string) (*models.MediaAnalytics, error)
- func (r *MediaAnalyticsRepository) GetMediaAnalyticsByTimeRange(_ context.Context, mediaID string, startTime, endTime time.Time, limit int) ([]*models.MediaAnalytics, error)
- func (r *MediaAnalyticsRepository) GetMediaAnalyticsByVariant(_ context.Context, variantKey string) ([]*models.MediaAnalytics, error)
- func (r *MediaAnalyticsRepository) GetMediaMetricsForDate(ctx context.Context, mediaID, date string) (map[string]interface{}, error)
- func (r *MediaAnalyticsRepository) GetPopularMedia(_ context.Context, _, _ time.Time, _ int, _ *string) ([]*models.MediaAnalytics, error)
- func (r *MediaAnalyticsRepository) GetTopVariantsByDemand(ctx context.Context, date string, limit int) ([]map[string]interface{}, error)
- func (r *MediaAnalyticsRepository) RecordMediaAnalytics(_ context.Context, analytics *models.MediaAnalytics) error
- func (r *MediaAnalyticsRepository) RecordMediaView(ctx context.Context, mediaID, userID string, duration time.Duration, ...) error
- func (r *MediaAnalyticsRepository) StoreMediaAnalytics(ctx context.Context, analytics *models.MediaAnalytics) error
- func (r *MediaAnalyticsRepository) TrackUserBehavior(ctx context.Context, userID string, behaviorData map[string]interface{}) error
- func (r *MediaAnalyticsRepository) UpdateMediaAnalytics(_ context.Context, analytics *models.MediaAnalytics) error
- type MediaMetadataRepository
- func (r *MediaMetadataRepository) CleanupExpiredMetadata(_ context.Context) error
- func (r *MediaMetadataRepository) Clear()
- func (r *MediaMetadataRepository) CreateMediaMetadata(_ context.Context, metadata *models.MediaMetadata) error
- func (r *MediaMetadataRepository) DeleteMediaMetadata(_ context.Context, mediaID string) error
- func (r *MediaMetadataRepository) GetMediaMetadata(_ context.Context, mediaID string) (*models.MediaMetadata, error)
- func (r *MediaMetadataRepository) GetMediaMetadataByStatus(_ context.Context, status string, limit int) ([]*models.MediaMetadata, error)
- func (r *MediaMetadataRepository) GetMetadataCount() int
- func (r *MediaMetadataRepository) GetPendingMediaMetadata(ctx context.Context, limit int) ([]*models.MediaMetadata, error)
- func (r *MediaMetadataRepository) GetProcessingMediaMetadata(ctx context.Context, limit int) ([]*models.MediaMetadata, error)
- func (r *MediaMetadataRepository) MarkProcessingComplete(_ context.Context, mediaID string, result interfaces.ProcessingResult) error
- func (r *MediaMetadataRepository) MarkProcessingFailed(_ context.Context, mediaID string, _ string) error
- func (r *MediaMetadataRepository) MarkProcessingStarted(_ context.Context, mediaID string) error
- func (r *MediaMetadataRepository) UpdateMediaMetadata(_ context.Context, metadata *models.MediaMetadata) error
- type MediaPopularityRepository
- func (r *MediaPopularityRepository) Clear()
- func (r *MediaPopularityRepository) GetPopularMediaByPeriod(_ context.Context, period string, limit int, cursor *string) ([]*models.MediaPopularity, error)
- func (r *MediaPopularityRepository) GetPopularityForMedia(_ context.Context, mediaID, period string) (*models.MediaPopularity, error)
- func (r *MediaPopularityRepository) IncrementViewCount(_ context.Context, mediaID, period string, incrementBy int64) error
- func (r *MediaPopularityRepository) UpsertPopularity(_ context.Context, popularity *models.MediaPopularity) error
- type MediaRepository
- func (r *MediaRepository) AddMediaVariant(_ context.Context, mediaID, variantName string, variant models.MediaVariant) error
- func (r *MediaRepository) AddSpendingTransaction(ctx context.Context, transaction *models.MediaSpendingTransaction) error
- func (r *MediaRepository) Clear()
- func (r *MediaRepository) CreateMedia(_ context.Context, media *models.Media) error
- func (r *MediaRepository) CreateMediaJob(_ context.Context, job *models.MediaJob) error
- func (r *MediaRepository) CreateMediaSpending(_ context.Context, spending *models.MediaSpending) error
- func (r *MediaRepository) CreateMediaSpendingTransaction(_ context.Context, transaction *models.MediaSpendingTransaction) error
- func (r *MediaRepository) CreateTranscodingJob(_ context.Context, job *models.TranscodingJob) error
- func (r *MediaRepository) CreateUserMediaConfig(_ context.Context, config *models.UserMediaConfig) error
- func (r *MediaRepository) DeleteExpiredMedia(_ context.Context, expiredBefore time.Time) (int64, error)
- func (r *MediaRepository) DeleteMedia(_ context.Context, mediaID string) error
- func (r *MediaRepository) DeleteMediaJob(_ context.Context, jobID string) error
- func (r *MediaRepository) DeleteMediaVariant(_ context.Context, mediaID, variantName string) error
- func (r *MediaRepository) DeleteTranscodingJob(_ context.Context, jobID string) error
- func (r *MediaRepository) DeleteUserMediaConfig(_ context.Context, userID string) error
- func (r *MediaRepository) GetJobCount() int
- func (r *MediaRepository) GetJobsByStatus(_ context.Context, status string, limit int) ([]*models.MediaJob, error)
- func (r *MediaRepository) GetJobsByUser(_ context.Context, username string, limit int) ([]*models.MediaJob, error)
- func (r *MediaRepository) GetMedia(_ context.Context, mediaID string) (*models.Media, error)
- func (r *MediaRepository) GetMediaByContentType(_ context.Context, contentType string, limit int) ([]*models.Media, error)
- func (r *MediaRepository) GetMediaByIDs(_ context.Context, mediaIDs []string) ([]*models.Media, error)
- func (r *MediaRepository) GetMediaByStatus(_ context.Context, status string, limit int) ([]*models.Media, error)
- func (r *MediaRepository) GetMediaByUser(_ context.Context, userID string, limit int) ([]*models.Media, error)
- func (r *MediaRepository) GetMediaCount() int
- func (r *MediaRepository) GetMediaJob(_ context.Context, jobID string) (*models.MediaJob, error)
- func (r *MediaRepository) GetMediaSpending(_ context.Context, userID, period string) (*models.MediaSpending, error)
- func (r *MediaRepository) GetMediaSpendingByTimeRange(_ context.Context, userID string, periodType string, limit int) ([]*models.MediaSpending, error)
- func (r *MediaRepository) GetMediaSpendingTransactions(_ context.Context, userID string, limit int) ([]*models.MediaSpendingTransaction, error)
- func (r *MediaRepository) GetMediaStorageUsage(_ context.Context, userID string) (int64, error)
- func (r *MediaRepository) GetMediaUsageStats(_ context.Context, mediaID string) (usageCount int, lastUsed *time.Time, err error)
- func (r *MediaRepository) GetMediaVariant(_ context.Context, mediaID, variantName string) (*models.MediaVariant, error)
- func (r *MediaRepository) GetModerationPendingMedia(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
- func (r *MediaRepository) GetOrCreateMediaSpending(_ context.Context, userID, period, periodType string) (*models.MediaSpending, error)
- func (r *MediaRepository) GetPendingMedia(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
- func (r *MediaRepository) GetProcessingMedia(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
- func (r *MediaRepository) GetTotalStorageUsage(_ context.Context) (int64, error)
- func (r *MediaRepository) GetTranscodingCostsByUser(_ context.Context, userID string, _ string) (map[string]int64, error)
- func (r *MediaRepository) GetTranscodingJob(_ context.Context, jobID string) (*models.TranscodingJob, error)
- func (r *MediaRepository) GetTranscodingJobCount() int
- func (r *MediaRepository) GetTranscodingJobsByMedia(_ context.Context, mediaID string, limit int) ([]*models.TranscodingJob, error)
- func (r *MediaRepository) GetTranscodingJobsByStatus(_ context.Context, status string, limit int) ([]*models.TranscodingJob, error)
- func (r *MediaRepository) GetTranscodingJobsByUser(_ context.Context, userID string, limit int) ([]*models.TranscodingJob, error)
- func (r *MediaRepository) GetUnusedMedia(_ context.Context, olderThan time.Time, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
- func (r *MediaRepository) GetUserMedia(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
- func (r *MediaRepository) GetUserMediaByType(_ context.Context, userID, contentType string, ...) (*interfaces.PaginatedResult[*models.Media], error)
- func (r *MediaRepository) GetUserMediaConfig(_ context.Context, userID string) (*models.UserMediaConfig, error)
- func (r *MediaRepository) GetUserMediaConfigByUsername(_ context.Context, username string) (*models.UserMediaConfig, error)
- func (r *MediaRepository) GetUserMediaLegacy(_ context.Context, username string) ([]any, error)
- func (r *MediaRepository) MarkMediaFailed(_ context.Context, mediaID, errorMsg string) error
- func (r *MediaRepository) MarkMediaProcessing(_ context.Context, mediaID string) error
- func (r *MediaRepository) MarkMediaReady(_ context.Context, mediaID string) error
- func (r *MediaRepository) MarkMediaUsed(_ context.Context, mediaID string) error
- func (r *MediaRepository) SetDependencies(deps map[string]interface{})
- func (r *MediaRepository) SetMediaModeration(_ context.Context, mediaID string, isNSFW bool, score float64, labels []string) error
- func (r *MediaRepository) UnmarkAllMediaAsSensitive(_ context.Context, username string) error
- func (r *MediaRepository) UpdateMedia(_ context.Context, media *models.Media) error
- func (r *MediaRepository) UpdateMediaAttachment(_ context.Context, mediaID string, updates map[string]any) error
- func (r *MediaRepository) UpdateMediaJob(_ context.Context, job *models.MediaJob) error
- func (r *MediaRepository) UpdateMediaSpending(_ context.Context, spending *models.MediaSpending) error
- func (r *MediaRepository) UpdateTranscodingJob(_ context.Context, job *models.TranscodingJob) error
- func (r *MediaRepository) UpdateUserMediaConfig(_ context.Context, config *models.UserMediaConfig) error
- type MediaSessionRepository
- func (r *MediaSessionRepository) CleanupExpiredSessions(_ context.Context, maxAge time.Duration) error
- func (r *MediaSessionRepository) Clear()
- func (r *MediaSessionRepository) CreateSession(_ context.Context, session *types.StreamingSession) error
- func (r *MediaSessionRepository) EndSession(ctx context.Context, sessionID string) error
- func (r *MediaSessionRepository) EndStreamingSession(_ context.Context, sessionID string) error
- func (r *MediaSessionRepository) GetActiveSessionsCount(_ context.Context) (int, error)
- func (r *MediaSessionRepository) GetActiveStreams(_ context.Context, limit int) ([]*types.StreamingSession, error)
- func (r *MediaSessionRepository) GetMediaSessions(_ context.Context, mediaID string, limit int32) ([]*types.StreamingSession, error)
- func (r *MediaSessionRepository) GetSession(_ context.Context, sessionID string) (*types.StreamingSession, error)
- func (r *MediaSessionRepository) GetSessionsByTimeRange(_ context.Context, startTime, endTime time.Time, limit int32) ([]*types.StreamingSession, error)
- func (r *MediaSessionRepository) GetUserSessions(_ context.Context, userID string) ([]*types.StreamingSession, error)
- func (r *MediaSessionRepository) SetSessionTTL(ttl time.Duration)
- func (r *MediaSessionRepository) StartStreamingSession(_ context.Context, userID, mediaID string, format types.MediaFormat, ...) (*types.StreamingSession, error)
- func (r *MediaSessionRepository) UpdateSession(_ context.Context, session *types.StreamingSession) error
- func (r *MediaSessionRepository) UpdateStreamingMetrics(_ context.Context, sessionID string, segmentIndex int, bytesTransferred int64, ...) error
- func (r *MediaSessionRepository) ValidateSessionAccess(_ context.Context, sessionID, userID string) (bool, error)
- type MetricRecordRepository
- func (r *MetricRecordRepository) BatchCreateMetricRecords(ctx context.Context, records []*models.MetricRecord) error
- func (r *MetricRecordRepository) Clear()
- func (r *MetricRecordRepository) Count() int
- func (r *MetricRecordRepository) CreateMetricRecord(_ context.Context, record *models.MetricRecord) error
- func (r *MetricRecordRepository) DeleteMetricRecord(_ context.Context, metricType, _, timestamp string) error
- func (r *MetricRecordRepository) GetMetricRecord(_ context.Context, metricType, _, timestamp string) (*models.MetricRecord, error)
- func (r *MetricRecordRepository) GetMetricsByAggregationLevel(_ context.Context, level string, startTime, endTime time.Time) ([]*models.MetricRecord, error)
- func (r *MetricRecordRepository) GetMetricsByDate(_ context.Context, date time.Time, serviceName string) ([]*models.MetricRecord, error)
- func (r *MetricRecordRepository) GetMetricsByService(_ context.Context, serviceName string, startTime, endTime time.Time) ([]*models.MetricRecord, error)
- func (r *MetricRecordRepository) GetMetricsByType(_ context.Context, metricType string, startTime, endTime time.Time) ([]*models.MetricRecord, error)
- func (r *MetricRecordRepository) GetServiceMetricsStats(ctx context.Context, serviceName string, metricType string, ...) (*interfaces.MetricRecordStats, error)
- func (r *MetricRecordRepository) UpdateMetricRecord(_ context.Context, record *models.MetricRecord) error
- type ModerationMLRepository
- func (r *ModerationMLRepository) Clear()
- func (r *ModerationMLRepository) CreateEffectivenessMetric(_ context.Context, metric *models.ModerationEffectivenessMetric) error
- func (r *ModerationMLRepository) CreateModelVersion(_ context.Context, version *models.ModerationModelVersion) error
- func (r *ModerationMLRepository) CreateSample(_ context.Context, sample *models.ModerationSample) error
- func (r *ModerationMLRepository) GetActiveModelVersion(_ context.Context) (*models.ModerationModelVersion, error)
- func (r *ModerationMLRepository) GetEffectivenessMetric(_ context.Context, patternID, period string, startTime time.Time) (*models.ModerationEffectivenessMetric, error)
- func (r *ModerationMLRepository) GetModelVersion(_ context.Context, versionID string) (*models.ModerationModelVersion, error)
- func (r *ModerationMLRepository) GetSample(_ context.Context, sampleID string) (*models.ModerationSample, error)
- func (r *ModerationMLRepository) ListEffectivenessMetricsByPattern(_ context.Context, patternID string, limit int) ([]*models.ModerationEffectivenessMetric, error)
- func (r *ModerationMLRepository) ListEffectivenessMetricsByPeriod(_ context.Context, period string, limit int) ([]*models.ModerationEffectivenessMetric, error)
- func (r *ModerationMLRepository) ListSamplesByLabel(_ context.Context, label string, limit int) ([]*models.ModerationSample, error)
- func (r *ModerationMLRepository) ListSamplesByReviewer(_ context.Context, reviewerID string, limit int) ([]*models.ModerationSample, error)
- func (r *ModerationMLRepository) UpdateModelVersion(_ context.Context, version *models.ModerationModelVersion) error
- type ModerationRepository
- func (r *ModerationRepository) AddFilterKeyword(_ context.Context, filterID string, keyword *storage.FilterKeyword) error
- func (r *ModerationRepository) AddFilterStatus(_ context.Context, filterID string, status *storage.FilterStatus) error
- func (r *ModerationRepository) AddModerationReview(_ context.Context, review *storage.ModerationReview) error
- func (r *ModerationRepository) AssignReport(_ context.Context, reportID string, assignedTo string) error
- func (r *ModerationRepository) Clear()
- func (r *ModerationRepository) CountPendingFlags(_ context.Context) (int, error)
- func (r *ModerationRepository) CreateAdminReview(ctx context.Context, eventID string, adminID string, action storage.ActionType, ...) error
- func (r *ModerationRepository) CreateAuditLog(_ context.Context, auditLog *storage.AuditLog) error
- func (r *ModerationRepository) CreateFilter(_ context.Context, filter *storage.Filter) error
- func (r *ModerationRepository) CreateFlag(_ context.Context, flag *storage.Flag) error
- func (r *ModerationRepository) CreateModerationDecision(_ context.Context, decision *storage.ModerationDecision) error
- func (r *ModerationRepository) CreateModerationEvent(_ context.Context, event *storage.ModerationEvent) error
- func (r *ModerationRepository) CreateModerationPattern(_ context.Context, pattern *storage.ModerationPattern) error
- func (r *ModerationRepository) CreateReport(_ context.Context, report *storage.Report) error
- func (r *ModerationRepository) DeleteFilter(_ context.Context, filterID string) error
- func (r *ModerationRepository) DeleteFilterKeyword(_ context.Context, keywordID string) error
- func (r *ModerationRepository) DeleteFilterStatus(_ context.Context, statusID string) error
- func (r *ModerationRepository) DeleteFlag(_ context.Context, id string) error
- func (r *ModerationRepository) DeleteModerationPattern(_ context.Context, patternID string) error
- func (r *ModerationRepository) GetAuditLogs(_ context.Context, limit int, cursor string) ([]*storage.AuditLog, string, error)
- func (r *ModerationRepository) GetAuditLogsByAdmin(_ context.Context, adminID string, limit int, cursor string) ([]*storage.AuditLog, string, error)
- func (r *ModerationRepository) GetAuditLogsByTarget(_ context.Context, targetID string, limit int, cursor string) ([]*storage.AuditLog, string, error)
- func (r *ModerationRepository) GetDecisionHistory(_ context.Context, contentID string) ([]*models.ModerationDecisionResult, error)
- func (r *ModerationRepository) GetFilter(_ context.Context, filterID string) (*storage.Filter, error)
- func (r *ModerationRepository) GetFilterKeywords(_ context.Context, filterID string) ([]*storage.FilterKeyword, error)
- func (r *ModerationRepository) GetFilterStatuses(_ context.Context, filterID string) ([]*storage.FilterStatus, error)
- func (r *ModerationRepository) GetFiltersForUser(_ context.Context, username string) ([]*storage.Filter, error)
- func (r *ModerationRepository) GetFlag(_ context.Context, id string) (*storage.Flag, error)
- func (r *ModerationRepository) GetFlagsByActor(_ context.Context, actorID string, limit int, cursor string) ([]*storage.Flag, string, error)
- func (r *ModerationRepository) GetFlagsByObject(_ context.Context, objectID string, limit int, cursor string) ([]*storage.Flag, string, error)
- func (r *ModerationRepository) GetModerationDecision(_ context.Context, objectID string) (*storage.ModerationDecision, error)
- func (r *ModerationRepository) GetModerationDecisionsByModerator(_ context.Context, moderatorUsername string, limit int) ([]*models.ModerationReview, error)
- func (r *ModerationRepository) GetModerationEvent(_ context.Context, eventID string) (*storage.ModerationEvent, error)
- func (r *ModerationRepository) GetModerationEvents(_ context.Context, filter *storage.ModerationEventFilter, limit int, ...) ([]*storage.ModerationEvent, string, error)
- func (r *ModerationRepository) GetModerationEventsByActor(_ context.Context, actorID string, limit int, cursor string) ([]*storage.ModerationEvent, string, error)
- func (r *ModerationRepository) GetModerationEventsByObject(_ context.Context, objectID string, limit int, cursor string) ([]*storage.ModerationEvent, string, error)
- func (r *ModerationRepository) GetModerationHistory(_ context.Context, objectID string) (*storage.ModerationHistory, error)
- func (r *ModerationRepository) GetModerationPattern(_ context.Context, patternID string) (*storage.ModerationPattern, error)
- func (r *ModerationRepository) GetModerationPatterns(_ context.Context, active bool, severity string, limit int) ([]*storage.ModerationPattern, error)
- func (r *ModerationRepository) GetModerationQueue(_ context.Context, filter *storage.ModerationFilter) ([]*storage.ModerationQueueItem, error)
- func (r *ModerationRepository) GetModerationQueueCount(_ context.Context) (int, error)
- func (r *ModerationRepository) GetModerationQueuePaginated(_ context.Context, limit int, cursor string) ([]*storage.ModerationQueueItem, string, error)
- func (r *ModerationRepository) GetModerationReviews(_ context.Context, eventID string) ([]*storage.ModerationReview, error)
- func (r *ModerationRepository) GetOpenReportsCount(_ context.Context) (int, error)
- func (r *ModerationRepository) GetPendingFlags(_ context.Context, limit int, cursor string) ([]*storage.Flag, string, error)
- func (r *ModerationRepository) GetPendingModerationCount(_ context.Context, moderatorID string) (int, error)
- func (r *ModerationRepository) GetReport(_ context.Context, id string) (*storage.Report, error)
- func (r *ModerationRepository) GetReportStats(_ context.Context, username string) (*storage.ReportStats, error)
- func (r *ModerationRepository) GetReportedStatuses(_ context.Context, reportID string) ([]any, error)
- func (r *ModerationRepository) GetReportsByStatus(_ context.Context, status storage.ReportStatus, limit int, cursor string) ([]*storage.Report, string, error)
- func (r *ModerationRepository) GetReportsByTarget(_ context.Context, targetAccountID string, limit int, cursor string) ([]*storage.Report, string, error)
- func (r *ModerationRepository) GetReviewQueue(_ context.Context, filters map[string]interface{}) ([]*models.ModerationReviewQueue, error)
- func (r *ModerationRepository) GetReviewerStats(_ context.Context, reviewerID string) (*storage.ReviewerStats, error)
- func (r *ModerationRepository) GetUserReports(_ context.Context, username string, limit int, cursor string) ([]*storage.Report, string, error)
- func (r *ModerationRepository) IncrementFalseReports(_ context.Context, username string) error
- func (r *ModerationRepository) RecordPatternMatch(_ context.Context, patternID string, matched bool, timestamp time.Time) error
- func (r *ModerationRepository) StoreAnalysisResult(_ context.Context, analysisData map[string]interface{}) error
- func (r *ModerationRepository) StoreDecision(_ context.Context, decisionData map[string]interface{}) error
- func (r *ModerationRepository) StoreModerationDecision(ctx context.Context, decision *storage.ModerationDecision) error
- func (r *ModerationRepository) UnassignReport(_ context.Context, reportID string) error
- func (r *ModerationRepository) UpdateEnforcementStatus(_ context.Context, contentID, status string) error
- func (r *ModerationRepository) UpdateFilter(_ context.Context, filterID string, updates map[string]any) error
- func (r *ModerationRepository) UpdateFilterKeyword(_ context.Context, keywordID string, updates map[string]any) error
- func (r *ModerationRepository) UpdateFlagStatus(_ context.Context, id string, status storage.FlagStatus, reviewedBy string, ...) error
- func (r *ModerationRepository) UpdateModerationDecision(_ context.Context, contentID string, review *storage.ModerationReview) error
- func (r *ModerationRepository) UpdateModerationPattern(_ context.Context, pattern *storage.ModerationPattern) error
- func (r *ModerationRepository) UpdateReportStatus(_ context.Context, id string, status storage.ReportStatus, actionTaken string, ...) error
- type NotificationRepository
- func (r *NotificationRepository) ClearOldNotifications(_ context.Context, username string, olderThan time.Time) (int, error)
- func (r *NotificationRepository) ConsolidateNotifications(_ context.Context, groupKey string) error
- func (r *NotificationRepository) CreateNotification(_ context.Context, notification *models.Notification) error
- func (r *NotificationRepository) CreateNotifications(ctx context.Context, notifications []*models.Notification) error
- func (r *NotificationRepository) DeleteExpiredNotifications(_ context.Context, expiredBefore time.Time) (int64, error)
- func (r *NotificationRepository) DeleteNotification(_ context.Context, notificationID string) error
- func (r *NotificationRepository) DeleteNotificationsByObject(_ context.Context, objectID string) error
- func (r *NotificationRepository) DeleteNotificationsByType(_ context.Context, userID, notificationType string) error
- func (r *NotificationRepository) GetNotification(_ context.Context, notificationID string) (*models.Notification, error)
- func (r *NotificationRepository) GetNotificationCountsByType(_ context.Context, userID string) (map[string]int64, error)
- func (r *NotificationRepository) GetNotificationGroups(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
- func (r *NotificationRepository) GetNotificationPreferences(_ context.Context, userID string) (*models.NotificationPreferences, error)
- func (r *NotificationRepository) GetNotificationsAdvanced(_ context.Context, userID string, filters map[string]interface{}, ...) (*interfaces.PaginatedResult[*models.Notification], error)
- func (r *NotificationRepository) GetNotificationsByType(_ context.Context, userID, notificationType string, ...) (*interfaces.PaginatedResult[*models.Notification], error)
- func (r *NotificationRepository) GetNotificationsFiltered(ctx context.Context, username string, filter map[string]interface{}) ([]*models.Notification, string, error)
- func (r *NotificationRepository) GetPendingPushNotifications(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
- func (r *NotificationRepository) GetUnreadNotificationCount(_ context.Context, userID string) (int64, error)
- func (r *NotificationRepository) GetUnreadNotifications(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
- func (r *NotificationRepository) GetUserNotifications(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
- func (r *NotificationRepository) MarkAllNotificationsRead(_ context.Context, userID string) error
- func (r *NotificationRepository) MarkNotificationPushFailed(_ context.Context, notificationID, errorMsg string) error
- func (r *NotificationRepository) MarkNotificationPushSent(_ context.Context, notificationID string) error
- func (r *NotificationRepository) MarkNotificationRead(_ context.Context, notificationID string) error
- func (r *NotificationRepository) MarkNotificationUnread(_ context.Context, notificationID string) error
- func (r *NotificationRepository) MarkNotificationsReadByType(_ context.Context, userID, notificationType string) error
- func (r *NotificationRepository) SetDispatcher(dispatcher interfaces.NotificationDispatcher)
- func (r *NotificationRepository) SetNotificationPreference(ctx context.Context, userID string, preferenceType string, enabled bool) error
- func (r *NotificationRepository) UpdateNotification(_ context.Context, notification *models.Notification) error
- func (r *NotificationRepository) UpdateNotificationPreferences(_ context.Context, prefs *models.NotificationPreferences) error
- type OAuthRepository
- func (r *OAuthRepository) Clear()
- func (r *OAuthRepository) CreateAuthorizationCode(_ context.Context, code *storage.AuthorizationCode) error
- func (r *OAuthRepository) CreateOAuthClient(_ context.Context, client *storage.OAuthClient) error
- func (r *OAuthRepository) CreateRefreshToken(_ context.Context, token *storage.RefreshToken) error
- func (r *OAuthRepository) DeleteAuthorizationCode(_ context.Context, code string) error
- func (r *OAuthRepository) DeleteExpiredTokens(_ context.Context) error
- func (r *OAuthRepository) DeleteOAuthClient(_ context.Context, clientID string) error
- func (r *OAuthRepository) DeleteOAuthState(_ context.Context, state string) error
- func (r *OAuthRepository) DeleteRefreshToken(_ context.Context, token string) error
- func (r *OAuthRepository) GetAuthorizationCode(_ context.Context, code string) (*storage.AuthorizationCode, error)
- func (r *OAuthRepository) GetOAuthClient(_ context.Context, clientID string) (*storage.OAuthClient, error)
- func (r *OAuthRepository) GetOAuthState(_ context.Context, state string) (*storage.OAuthState, error)
- func (r *OAuthRepository) GetRefreshToken(_ context.Context, token string) (*storage.RefreshToken, error)
- func (r *OAuthRepository) GetUserAppConsent(_ context.Context, userID, appID string) (*storage.UserAppConsent, error)
- func (r *OAuthRepository) ListOAuthClients(_ context.Context, limit int32, cursor string) ([]*storage.OAuthClient, string, error)
- func (r *OAuthRepository) SaveUserAppConsent(_ context.Context, consent *storage.UserAppConsent) error
- func (r *OAuthRepository) StoreOAuthState(_ context.Context, state string, data *storage.OAuthState) error
- func (r *OAuthRepository) UpdateOAuthClient(_ context.Context, clientID string, updates map[string]any) error
- type ObjectRepository
- func (r *ObjectRepository) AddToCollection(_ context.Context, collection string, item *storage.CollectionItem) error
- func (r *ObjectRepository) CleanupExpiredTombstones(_ context.Context, batchSize int) (int, error)
- func (r *ObjectRepository) CountCollectionItems(_ context.Context, collection string) (int, error)
- func (r *ObjectRepository) CountObjectReplies(_ context.Context, objectID string) (int, error)
- func (r *ObjectRepository) CountQuotes(_ context.Context, noteID string) (int, error)
- func (r *ObjectRepository) CountReplies(_ context.Context, objectID string) (int, error)
- func (r *ObjectRepository) CountWithdrawnQuotes(_ context.Context, noteID string) (int, error)
- func (r *ObjectRepository) CreateObject(_ context.Context, object any) error
- func (r *ObjectRepository) CreateQuoteRelationship(_ context.Context, quote *storage.QuoteRelationship) error
- func (r *ObjectRepository) CreateTombstone(_ context.Context, tombstone *models.Tombstone) error
- func (r *ObjectRepository) CreateUpdateHistory(_ context.Context, history *storage.UpdateHistory) error
- func (r *ObjectRepository) DeleteObject(_ context.Context, objectID string) error
- func (r *ObjectRepository) GetCollectionItems(_ context.Context, collection string, limit int, cursor string) ([]*storage.CollectionItem, string, error)
- func (r *ObjectRepository) GetMissingReplies(_ context.Context, statusID string) ([]*storage.StatusSearchResult, error)
- func (r *ObjectRepository) GetObject(_ context.Context, id string) (any, error)
- func (r *ObjectRepository) GetObjectHistory(ctx context.Context, objectID string) ([]*storage.UpdateHistory, error)
- func (r *ObjectRepository) GetObjectsByActor(_ context.Context, actorID string, cursor string, limit int) ([]any, string, error)
- func (r *ObjectRepository) GetQuoteType(_ context.Context, statusID string) (string, error)
- func (r *ObjectRepository) GetQuotesForNote(_ context.Context, noteID string, limit int, cursor string) ([]*storage.QuoteRelationship, string, error)
- func (r *ObjectRepository) GetQuotesOfStatus(_ context.Context, statusID string, limit int) ([]*storage.StatusSearchResult, error)
- func (r *ObjectRepository) GetReplies(_ context.Context, objectID string, limit int, cursor string) ([]any, string, error)
- func (r *ObjectRepository) GetReplyCount(_ context.Context, statusID string) (int64, error)
- func (r *ObjectRepository) GetStatus(ctx context.Context, statusID string) (any, error)
- func (r *ObjectRepository) GetStatusReplyCount(ctx context.Context, statusID string) (int, error)
- func (r *ObjectRepository) GetThreadContext(_ context.Context, statusID string) (*storage.ThreadContext, error)
- func (r *ObjectRepository) GetTombstone(_ context.Context, objectID string) (*models.Tombstone, error)
- func (r *ObjectRepository) GetTombstonesByActor(_ context.Context, actorID string, limit int, cursor string) ([]*models.Tombstone, string, error)
- func (r *ObjectRepository) GetTombstonesByType(_ context.Context, formerType string, limit int, cursor string) ([]*models.Tombstone, string, error)
- func (r *ObjectRepository) GetUpdateHistory(_ context.Context, objectID string, limit int) ([]*storage.UpdateHistory, error)
- func (r *ObjectRepository) GetUserStatusCount(_ context.Context, userID string) (int, error)
- func (r *ObjectRepository) IncrementReplyCount(_ context.Context, objectID string) error
- func (r *ObjectRepository) IsInCollection(_ context.Context, collection, itemID string) (bool, error)
- func (r *ObjectRepository) IsQuoteAllowed(_ context.Context, statusID, _ string) (bool, error)
- func (r *ObjectRepository) IsQuoted(_ context.Context, actorID, noteID string) (bool, error)
- func (r *ObjectRepository) IsTombstoned(_ context.Context, objectID string) (bool, error)
- func (r *ObjectRepository) IsWithdrawnFromQuotes(_ context.Context, statusID string) (bool, error)
- func (r *ObjectRepository) MarkThreadAsSynced(_ context.Context, statusID string) error
- func (r *ObjectRepository) RemoveFromCollection(_ context.Context, collection, itemID string) error
- func (r *ObjectRepository) ReplaceObjectWithTombstone(_ context.Context, objectID, formerType, deletedBy string) error
- func (r *ObjectRepository) SetMissingReplies(statusID string, replyIDs []string)
- func (r *ObjectRepository) SetThreadContext(statusID string, ctx *storage.ThreadContext)
- func (r *ObjectRepository) SyncMissingRepliesFromRemote(_ context.Context, statusID string) ([]*storage.StatusSearchResult, error)
- func (r *ObjectRepository) SyncThreadFromRemote(_ context.Context, statusID string) (*storage.StatusSearchResult, error)
- func (r *ObjectRepository) TombstoneObject(_ context.Context, objectID string, deletedBy string) error
- func (r *ObjectRepository) UpdateObject(_ context.Context, object any) error
- func (r *ObjectRepository) UpdateObjectWithHistory(_ context.Context, object any, updatedBy string) error
- func (r *ObjectRepository) UpdateQuotePermissions(_ context.Context, statusID string, permissions *storage.QuotePermissions) error
- func (r *ObjectRepository) WithdrawQuote(_ context.Context, quoteNoteID string) error
- func (r *ObjectRepository) WithdrawStatusFromQuotes(_ context.Context, statusID string) error
- type PollRepository
- func (r *PollRepository) Clear()
- func (r *PollRepository) CreatePoll(_ context.Context, poll *storage.Poll) error
- func (r *PollRepository) GetPoll(_ context.Context, pollID string) (*storage.Poll, error)
- func (r *PollRepository) GetPollByStatusID(_ context.Context, statusID string) (*storage.Poll, error)
- func (r *PollRepository) GetPollCount() int
- func (r *PollRepository) GetPollVotes(_ context.Context, pollID string) (map[string][]int, error)
- func (r *PollRepository) GetVoteCount() int
- func (r *PollRepository) HasUserVoted(_ context.Context, pollID string, userID string) (bool, []int, error)
- func (r *PollRepository) VoteOnPoll(_ context.Context, pollID string, voterID string, choices []int) error
- type PublicationMemberRepository
- func (r *PublicationMemberRepository) Clear()
- func (r *PublicationMemberRepository) CreateMember(_ context.Context, member *models.PublicationMember) error
- func (r *PublicationMemberRepository) DeleteMember(_ context.Context, publicationID, userID string) error
- func (r *PublicationMemberRepository) GetMember(_ context.Context, publicationID, userID string) (*models.PublicationMember, error)
- func (r *PublicationMemberRepository) ListMembers(_ context.Context, publicationID string) ([]*models.PublicationMember, error)
- func (r *PublicationMemberRepository) ListMembershipsForUserPaginated(_ context.Context, userID string, limit int, cursor string) ([]*models.PublicationMember, string, error)
- func (r *PublicationMemberRepository) Update(_ context.Context, member *models.PublicationMember) error
- type PublicationRepository
- func (r *PublicationRepository) Clear()
- func (r *PublicationRepository) CreatePublication(_ context.Context, publication *models.Publication) error
- func (r *PublicationRepository) Delete(_ context.Context, pk, _ string) error
- func (r *PublicationRepository) GetDB() dynamormcore.DB
- func (r *PublicationRepository) GetPublication(_ context.Context, id string) (*models.Publication, error)
- func (r *PublicationRepository) Update(_ context.Context, publication *models.Publication) error
- type PushSubscriptionRepository
- func (r *PushSubscriptionRepository) Clear()
- func (r *PushSubscriptionRepository) CreatePushSubscription(_ context.Context, username string, subscription *storage.PushSubscription) error
- func (r *PushSubscriptionRepository) DeleteAllPushSubscriptions(_ context.Context, username string) error
- func (r *PushSubscriptionRepository) DeletePushSubscription(_ context.Context, username, subscriptionID string) error
- func (r *PushSubscriptionRepository) GetPushSubscription(_ context.Context, username, subscriptionID string) (*storage.PushSubscription, error)
- func (r *PushSubscriptionRepository) GetSubscriptionCount() int
- func (r *PushSubscriptionRepository) GetUserPushSubscriptions(_ context.Context, username string) ([]*storage.PushSubscription, error)
- func (r *PushSubscriptionRepository) GetVAPIDKeys(_ context.Context) (*storage.VAPIDKeys, error)
- func (r *PushSubscriptionRepository) HasVAPIDKeys() bool
- func (r *PushSubscriptionRepository) SetVAPIDKeys(_ context.Context, keys *storage.VAPIDKeys) error
- func (r *PushSubscriptionRepository) UpdatePushSubscription(_ context.Context, username, subscriptionID string, ...) error
- type QuoteRepository
- func (r *QuoteRepository) Clear()
- func (r *QuoteRepository) CreateQuotePermissions(_ context.Context, permissions *models.QuotePermissions) error
- func (r *QuoteRepository) CreateQuoteRelationship(_ context.Context, relationship *models.QuoteRelationship) error
- func (r *QuoteRepository) DecrementQuoteCount(_ context.Context, statusID string) error
- func (r *QuoteRepository) DeleteQuotePermissions(_ context.Context, username string) error
- func (r *QuoteRepository) DeleteQuoteRelationship(_ context.Context, quoteStatusID, targetStatusID string) error
- func (r *QuoteRepository) GetQuoteCount(_ context.Context, statusID string) (int64, error)
- func (r *QuoteRepository) GetQuotePermissions(_ context.Context, username string) (*models.QuotePermissions, error)
- func (r *QuoteRepository) GetQuoteRelationship(_ context.Context, quoteStatusID, targetStatusID string) (*models.QuoteRelationship, error)
- func (r *QuoteRepository) GetQuotesByUser(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.QuoteRelationship], error)
- func (r *QuoteRepository) GetQuotesForStatus(_ context.Context, statusID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.QuoteRelationship], error)
- func (r *QuoteRepository) IncrementQuoteCount(_ context.Context, statusID string) error
- func (r *QuoteRepository) UpdateQuotePermissions(_ context.Context, permissions *models.QuotePermissions) error
- func (r *QuoteRepository) UpdateQuoteRelationship(_ context.Context, relationship *models.QuoteRelationship) error
- func (r *QuoteRepository) WithdrawQuotes(_ context.Context, noteID, userID string) (int, error)
- type RateLimitRepository
- func (r *RateLimitRepository) BlockDomain(domain string, until time.Time)
- func (r *RateLimitRepository) BlockUser(userID string, until time.Time)
- func (r *RateLimitRepository) CheckAPIRateLimit(_ context.Context, userID, endpoint string, limit int, window time.Duration) error
- func (r *RateLimitRepository) CheckCommunityNoteRateLimit(_ context.Context, userID string, limit int) (bool, int, error)
- func (r *RateLimitRepository) CheckFederationRateLimit(_ context.Context, domain, endpoint string, limit int, window time.Duration) error
- func (r *RateLimitRepository) Clear()
- func (r *RateLimitRepository) ClearLoginAttempts(_ context.Context, identifier string) error
- func (r *RateLimitRepository) GetAPIRateLimitInfo(_ context.Context, userID, endpoint string, limit int, window time.Duration) (remaining int, resetTime time.Time, err error)
- func (r *RateLimitRepository) GetFederationRateLimitInfo(_ context.Context, domain, endpoint string, limit int, window time.Duration) (remaining int, resetTime time.Time, err error)
- func (r *RateLimitRepository) GetLoginAttemptCount(_ context.Context, identifier string, since time.Time) (int, error)
- func (r *RateLimitRepository) GetViolationCount(_ context.Context, userID, domain string, _ time.Duration) (int, error)
- func (r *RateLimitRepository) IsDomainBlocked(_ context.Context, domain string) (bool, time.Time, error)
- func (r *RateLimitRepository) IsRateLimited(_ context.Context, identifier string) (bool, time.Time, error)
- func (r *RateLimitRepository) IsUserBlocked(_ context.Context, userID string) (bool, time.Time, error)
- func (r *RateLimitRepository) RecordLoginAttempt(_ context.Context, identifier string, success bool) error
- type RecoveryRepository
- func (r *RecoveryRepository) Clear()
- func (r *RecoveryRepository) CountUnusedRecoveryCodes(_ context.Context, username string) (int, error)
- func (r *RecoveryRepository) DeleteAllRecoveryCodes(_ context.Context, username string) error
- func (r *RecoveryRepository) DeleteRecoveryRequest(_ context.Context, requestID string) error
- func (r *RecoveryRepository) DeleteRecoveryToken(_ context.Context, key string) error
- func (r *RecoveryRepository) DeleteTrustee(_ context.Context, username, trusteeActorID string) error
- func (r *RecoveryRepository) GetActiveRecoveryRequests(_ context.Context, username string) ([]*storage.SocialRecoveryRequest, error)
- func (r *RecoveryRepository) GetRecoveryCodes(_ context.Context, username string) ([]*storage.RecoveryCodeItem, error)
- func (r *RecoveryRepository) GetRecoveryRequest(_ context.Context, requestID string) (*storage.SocialRecoveryRequest, error)
- func (r *RecoveryRepository) GetRecoveryToken(_ context.Context, key string) (map[string]any, error)
- func (r *RecoveryRepository) GetTrustees(_ context.Context, username string) ([]*storage.TrusteeConfig, error)
- func (r *RecoveryRepository) MarkRecoveryCodeUsed(_ context.Context, username, codeHash string) error
- func (r *RecoveryRepository) StoreRecoveryCode(_ context.Context, username string, code *storage.RecoveryCodeItem) error
- func (r *RecoveryRepository) StoreRecoveryRequest(_ context.Context, request *storage.SocialRecoveryRequest) error
- func (r *RecoveryRepository) StoreRecoveryToken(_ context.Context, key string, data map[string]any) error
- func (r *RecoveryRepository) StoreTrustee(_ context.Context, username string, trustee *storage.TrusteeConfig) error
- func (r *RecoveryRepository) UpdateRecoveryRequest(_ context.Context, request *storage.SocialRecoveryRequest) error
- func (r *RecoveryRepository) UpdateTrusteeConfirmed(_ context.Context, username, trusteeActorID string, confirmed bool) error
- type RelationshipRepository
- func (r *RelationshipRepository) AcceptFollowRequest(_ context.Context, followerUsername, followingUsername string) error
- func (r *RelationshipRepository) AddToCollection(_ context.Context, collection string, item *storage.CollectionItem) error
- func (r *RelationshipRepository) BlockUser(ctx context.Context, blockerID, blockedID string) error
- func (r *RelationshipRepository) ClearCollection(_ context.Context, collection string) error
- func (r *RelationshipRepository) CountBlockedUsers(_ context.Context, blockerActor string) (int, error)
- func (r *RelationshipRepository) CountCollectionItems(_ context.Context, collection string) (int, error)
- func (r *RelationshipRepository) CountFollowers(_ context.Context, username string) (int, error)
- func (r *RelationshipRepository) CountFollowing(_ context.Context, username string) (int, error)
- func (r *RelationshipRepository) CountMutedUsers(_ context.Context, muterActor string) (int, error)
- func (r *RelationshipRepository) CountRelationshipsByDomain(_ context.Context, _ string) (followers, following int, err error)
- func (r *RelationshipRepository) CountUsersWhoBlocked(_ context.Context, blockedActor string) (int, error)
- func (r *RelationshipRepository) CountUsersWhoMuted(_ context.Context, mutedActor string) (int, error)
- func (r *RelationshipRepository) CreateBlock(_ context.Context, blockerActor, blockedActor, _ string) error
- func (r *RelationshipRepository) CreateEndorsement(_ context.Context, endorsement *storage.AccountPin) error
- func (r *RelationshipRepository) CreateMove(_ context.Context, move *storage.Move) error
- func (r *RelationshipRepository) CreateMute(_ context.Context, muterActor, mutedActor, _ string, hideNotifications bool, ...) error
- func (r *RelationshipRepository) CreateRelationship(_ context.Context, followerUsername, followingUsername, activityID string) error
- func (r *RelationshipRepository) DeleteBlock(_ context.Context, blockerActor, blockedActor string) error
- func (r *RelationshipRepository) DeleteEndorsement(_ context.Context, endorserID, endorsedID string) error
- func (r *RelationshipRepository) DeleteMute(_ context.Context, muterActor, mutedActor string) error
- func (r *RelationshipRepository) DeleteRelationship(_ context.Context, followerUsername, followingUsername string) error
- func (r *RelationshipRepository) GetAccountMoves(_ context.Context, actor string) ([]*storage.Move, error)
- func (r *RelationshipRepository) GetBlock(_ context.Context, blockerActor, blockedActor string) (*storage.Block, error)
- func (r *RelationshipRepository) GetBlockedUsers(_ context.Context, blockerActor string, limit int, _ string) ([]string, string, error)
- func (r *RelationshipRepository) GetCollectionItems(_ context.Context, collection string, limit int, _ string) ([]*storage.CollectionItem, string, error)
- func (r *RelationshipRepository) GetEndorsements(_ context.Context, userID string, limit int, _ string) ([]*storage.AccountPin, string, error)
- func (r *RelationshipRepository) GetFollowRequest(_ context.Context, followerID, targetID string) (*storage.RelationshipRecord, error)
- func (r *RelationshipRepository) GetFollowerCount(ctx context.Context, userID string) (int64, error)
- func (r *RelationshipRepository) GetFollowers(_ context.Context, username string, limit int, _ string) ([]string, string, error)
- func (r *RelationshipRepository) GetFollowing(_ context.Context, username string, limit int, _ string) ([]string, string, error)
- func (r *RelationshipRepository) GetFollowingCount(ctx context.Context, userID string) (int64, error)
- func (r *RelationshipRepository) GetMove(_ context.Context, actor string) (*storage.Move, error)
- func (r *RelationshipRepository) GetMoveByTarget(_ context.Context, target string) ([]*storage.Move, error)
- func (r *RelationshipRepository) GetMute(_ context.Context, muterActor, mutedActor string) (*storage.Mute, error)
- func (r *RelationshipRepository) GetMutedUsers(_ context.Context, muterActor string, limit int, _ string) ([]string, string, error)
- func (r *RelationshipRepository) GetPendingFollowRequests(_ context.Context, username string, limit int, _ string) ([]string, string, error)
- func (r *RelationshipRepository) GetPendingMoves(_ context.Context, limit int) ([]*storage.Move, error)
- func (r *RelationshipRepository) GetRelationship(_ context.Context, followerUsername, followingUsername string) (*models.RelationshipRecord, error)
- func (r *RelationshipRepository) GetRelationshipNote(_ context.Context, userID, targetID string) (*storage.AccountNote, error)
- func (r *RelationshipRepository) GetUsersWhoBlocked(_ context.Context, blockedActor string, limit int, _ string) ([]string, string, error)
- func (r *RelationshipRepository) GetUsersWhoMuted(_ context.Context, mutedActor string, limit int, _ string) ([]string, string, error)
- func (r *RelationshipRepository) HasFollowRequest(_ context.Context, requesterID, targetID string) (bool, error)
- func (r *RelationshipRepository) HasMovedFrom(_ context.Context, oldActor, newActor string) (bool, error)
- func (r *RelationshipRepository) HasPendingFollowRequest(_ context.Context, requesterID, targetID string) (bool, error)
- func (r *RelationshipRepository) IsBlocked(_ context.Context, blockerActor, blockedActor string) (bool, error)
- func (r *RelationshipRepository) IsBlockedBidirectional(ctx context.Context, actor1, actor2 string) (bool, error)
- func (r *RelationshipRepository) IsEndorsed(_ context.Context, userID, targetID string) (bool, error)
- func (r *RelationshipRepository) IsFollowing(_ context.Context, followerUsername, targetActorID string) (bool, error)
- func (r *RelationshipRepository) IsInCollection(_ context.Context, collection, itemID string) (bool, error)
- func (r *RelationshipRepository) IsMuted(_ context.Context, muterActor, mutedActor string) (bool, error)
- func (r *RelationshipRepository) RejectFollowRequest(_ context.Context, followerUsername, followingUsername string) error
- func (r *RelationshipRepository) RemoveFromCollection(_ context.Context, collection, itemID string) error
- func (r *RelationshipRepository) SetRelationshipNote(userID, targetID, noteText string)
- func (r *RelationshipRepository) UnblockUser(ctx context.Context, blockerID, blockedID string) error
- func (r *RelationshipRepository) Unfollow(ctx context.Context, followerID, followingID string) error
- func (r *RelationshipRepository) UnmuteUser(ctx context.Context, muterID, mutedID string) error
- func (r *RelationshipRepository) UpdateMoveProgress(_ context.Context, actor, target string, _ map[string]interface{}) error
- func (r *RelationshipRepository) UpdateRelationship(_ context.Context, followerUsername, followingUsername string, ...) error
- func (r *RelationshipRepository) VerifyMove(ctx context.Context, actor, target string) error
- type RelayRepository
- func (r *RelayRepository) Clear()
- func (r *RelayRepository) CreateRelay(ctx context.Context, relay *storage.RelayInfo) error
- func (r *RelayRepository) DeleteRelay(ctx context.Context, relayURL string) error
- func (r *RelayRepository) GetActiveRelays(_ context.Context) ([]*storage.RelayInfo, error)
- func (r *RelayRepository) GetAllRelays(_ context.Context, limit int, cursor string) ([]*storage.RelayInfo, string, error)
- func (r *RelayRepository) GetRelay(ctx context.Context, relayURL string) (*storage.RelayInfo, error)
- func (r *RelayRepository) GetRelayInfo(_ context.Context, relayURL string) (*storage.RelayInfo, error)
- func (r *RelayRepository) ListRelays(_ context.Context) ([]*storage.RelayInfo, error)
- func (r *RelayRepository) RemoveRelayInfo(_ context.Context, relayURL string) error
- func (r *RelayRepository) StoreRelayInfo(_ context.Context, relay *storage.RelayInfo) error
- func (r *RelayRepository) UpdateRelayState(_ context.Context, relayURL string, state storage.RelayState) error
- func (r *RelayRepository) UpdateRelayStatus(_ context.Context, relayURL string, active bool) error
- type RevisionRepository
- func (r *RevisionRepository) Clear()
- func (r *RevisionRepository) CreateRevision(_ context.Context, revision *models.Revision) error
- func (r *RevisionRepository) Delete(_ context.Context, pk, sk string) error
- func (r *RevisionRepository) GetRevision(_ context.Context, objectID string, version int) (*models.Revision, error)
- func (r *RevisionRepository) ListRevisions(ctx context.Context, objectID string, limit int) ([]*models.Revision, error)
- func (r *RevisionRepository) ListRevisionsPaginated(_ context.Context, objectID string, limit int, cursor string) ([]*models.Revision, string, error)
- type ScheduledStatusRepository
- func (r *ScheduledStatusRepository) Clear()
- func (r *ScheduledStatusRepository) CreateScheduledStatus(_ context.Context, scheduled *storage.ScheduledStatus) error
- func (r *ScheduledStatusRepository) DeleteScheduledStatus(_ context.Context, id string) error
- func (r *ScheduledStatusRepository) GetDueScheduledStatuses(_ context.Context, before time.Time, limit int) ([]*storage.ScheduledStatus, error)
- func (r *ScheduledStatusRepository) GetScheduledStatus(_ context.Context, id string) (*storage.ScheduledStatus, error)
- func (r *ScheduledStatusRepository) GetScheduledStatusMedia(ctx context.Context, id string) ([]*models.Media, error)
- func (r *ScheduledStatusRepository) GetScheduledStatuses(_ context.Context, username string, limit int, cursor string) ([]*storage.ScheduledStatus, string, error)
- func (r *ScheduledStatusRepository) MarkScheduledStatusPublished(_ context.Context, id string) error
- func (r *ScheduledStatusRepository) SetMediaRepository(mediaRepo interfaces.MediaRepositoryInterface)
- func (r *ScheduledStatusRepository) UpdateScheduledStatus(_ context.Context, scheduled *storage.ScheduledStatus) error
- type SearchRepository
- func (r *SearchRepository) AddActor(actor *activitypub.Actor)
- func (r *SearchRepository) AddStatus(status *storage.StatusSearchResult)
- func (r *SearchRepository) Clear()
- func (r *SearchRepository) SearchAccounts(_ context.Context, query string, limit int, _ bool, offset int) ([]*activitypub.Actor, error)
- func (r *SearchRepository) SearchAccountsAdvanced(ctx context.Context, query string, _ bool, limit int, offset int, ...) ([]*activitypub.Actor, error)
- func (r *SearchRepository) SearchAccountsWithPrivacy(ctx context.Context, query string, limit int, followingOnly bool, offset int, ...) ([]*activitypub.Actor, error)
- func (r *SearchRepository) SearchStatuses(_ context.Context, query string, limit int) ([]*storage.StatusSearchResult, error)
- func (r *SearchRepository) SearchStatusesAdvanced(ctx context.Context, query string, limit int, _, _ *string, _ string) ([]*storage.StatusSearchResult, error)
- func (r *SearchRepository) SearchStatusesWithOptions(ctx context.Context, query string, options storage.StatusSearchOptions) ([]*storage.StatusSearchResult, error)
- func (r *SearchRepository) SearchStatusesWithOptionsPaginated(ctx context.Context, query string, options storage.StatusSearchOptions) ([]*storage.StatusSearchResult, *interfaces.PaginationResult, error)
- func (r *SearchRepository) SearchStatusesWithPrivacy(ctx context.Context, query string, options storage.StatusSearchOptions, ...) ([]*storage.StatusSearchResult, error)
- func (r *SearchRepository) SearchStatusesWithPrivacyPaginated(ctx context.Context, query string, options storage.StatusSearchOptions, ...) ([]*storage.StatusSearchResult, *interfaces.PaginationResult, error)
- func (r *SearchRepository) SetDependencies(deps interfaces.SearchRepositoryDeps)
- type SeriesRepository
- func (r *SeriesRepository) Clear()
- func (r *SeriesRepository) CreateSeries(_ context.Context, series *models.Series) error
- func (r *SeriesRepository) Delete(_ context.Context, pk, sk string) error
- func (r *SeriesRepository) GetSeries(_ context.Context, authorID, seriesID string) (*models.Series, error)
- func (r *SeriesRepository) ListSeriesByAuthor(ctx context.Context, authorID string, limit int) ([]*models.Series, error)
- func (r *SeriesRepository) ListSeriesByAuthorPaginated(_ context.Context, authorID string, limit int, cursor string) ([]*models.Series, string, error)
- func (r *SeriesRepository) Update(_ context.Context, series *models.Series) error
- func (r *SeriesRepository) UpdateArticleCount(_ context.Context, authorID string, seriesID string, delta int) error
- type SeveranceRepository
- func (r *SeveranceRepository) Clear()
- func (r *SeveranceRepository) CreateAffectedRelationship(_ context.Context, affected *models.AffectedRelationship) error
- func (r *SeveranceRepository) CreateReconnectionAttempt(_ context.Context, attempt *models.SeveranceReconnectionAttempt) error
- func (r *SeveranceRepository) CreateSeveredRelationship(_ context.Context, severance *models.SeveredRelationship) error
- func (r *SeveranceRepository) GetAffectedRelationships(_ context.Context, severanceID string, limit int, cursor string) ([]*models.AffectedRelationship, string, error)
- func (r *SeveranceRepository) GetReconnectionAttempt(_ context.Context, severanceID, attemptID string) (*models.SeveranceReconnectionAttempt, error)
- func (r *SeveranceRepository) GetReconnectionAttempts(_ context.Context, severanceID string) ([]*models.SeveranceReconnectionAttempt, error)
- func (r *SeveranceRepository) GetSeveredRelationship(_ context.Context, id string) (*models.SeveredRelationship, error)
- func (r *SeveranceRepository) ListSeveredRelationships(_ context.Context, localInstance string, filters interfaces.SeveranceFilters, ...) ([]*models.SeveredRelationship, string, error)
- func (r *SeveranceRepository) UpdateReconnectionAttempt(_ context.Context, attempt *models.SeveranceReconnectionAttempt) error
- func (r *SeveranceRepository) UpdateSeveranceStatus(_ context.Context, id string, status models.SeveranceStatus) error
- type SocialRepository
- func (r *SocialRepository) CascadeDeleteAnnounces(_ context.Context, objectID string) error
- func (r *SocialRepository) Clear()
- func (r *SocialRepository) CountObjectAnnounces(_ context.Context, objectID string) (int, error)
- func (r *SocialRepository) CountUserPinnedStatuses(_ context.Context, username string) (int, error)
- func (r *SocialRepository) CreateAccountNote(_ context.Context, note *storage.AccountNote) error
- func (r *SocialRepository) CreateAccountPin(_ context.Context, pin *storage.AccountPin) error
- func (r *SocialRepository) CreateAnnounce(_ context.Context, announce *storage.Announce) error
- func (r *SocialRepository) CreateBlock(_ context.Context, block *storage.Block) error
- func (r *SocialRepository) CreateMute(_ context.Context, mute *storage.Mute) error
- func (r *SocialRepository) CreateStatusPin(_ context.Context, pin *storage.StatusPin) error
- func (r *SocialRepository) DeleteAccountNote(_ context.Context, username, targetActorID string) error
- func (r *SocialRepository) DeleteAccountPin(_ context.Context, username, pinnedActorID string) error
- func (r *SocialRepository) DeleteAnnounce(_ context.Context, actor, object string) error
- func (r *SocialRepository) DeleteBlock(_ context.Context, actor, blockedActor string) error
- func (r *SocialRepository) DeleteMute(_ context.Context, actor, mutedActor string) error
- func (r *SocialRepository) DeleteStatusPin(_ context.Context, username, statusID string) error
- func (r *SocialRepository) GetAccountNote(_ context.Context, username, targetActorID string) (*storage.AccountNote, error)
- func (r *SocialRepository) GetAccountPins(_ context.Context, username string) ([]*storage.AccountPin, error)
- func (r *SocialRepository) GetAccountPinsPaginated(_ context.Context, username string, _ int, _ string) ([]*storage.AccountPin, string, error)
- func (r *SocialRepository) GetActorAnnounces(_ context.Context, actorID string, _ int, _ string) ([]*storage.Announce, string, error)
- func (r *SocialRepository) GetAnnounce(_ context.Context, actor, object string) (*storage.Announce, error)
- func (r *SocialRepository) GetBlock(_ context.Context, actor, blockedActor string) (*storage.Block, error)
- func (r *SocialRepository) GetBlockedByUsers(_ context.Context, actor string, _ int, _ string) ([]*storage.Block, string, error)
- func (r *SocialRepository) GetBlockedUsers(_ context.Context, actor string, _ int, _ string) ([]*storage.Block, string, error)
- func (r *SocialRepository) GetMute(_ context.Context, actor, mutedActor string) (*storage.Mute, error)
- func (r *SocialRepository) GetMutedUsers(_ context.Context, actor string, _ int, _ string) ([]*storage.Mute, string, error)
- func (r *SocialRepository) GetStatusAnnounces(_ context.Context, objectID string, _ int, _ string) ([]*storage.Announce, string, error)
- func (r *SocialRepository) GetStatusPins(_ context.Context, username string) ([]*storage.StatusPin, error)
- func (r *SocialRepository) GetStatusPinsPaginated(_ context.Context, username string, limit int, _ string) ([]*storage.StatusPin, string, error)
- func (r *SocialRepository) HasUserAnnounced(_ context.Context, actor, object string) (bool, error)
- func (r *SocialRepository) IsAccountPinned(_ context.Context, username, pinnedActorID string) (bool, error)
- func (r *SocialRepository) IsBlocked(_ context.Context, actor, targetActor string) (bool, error)
- func (r *SocialRepository) IsMuted(_ context.Context, actor, targetActor string) (bool, error)
- func (r *SocialRepository) IsStatusPinned(_ context.Context, username, statusID string) (bool, error)
- func (r *SocialRepository) ReorderStatusPins(_ context.Context, _ string, _ []string) error
- func (r *SocialRepository) UpdateAccountNote(_ context.Context, note *storage.AccountNote) error
- type StatusRepository
- func (r *StatusRepository) BookmarkStatus(_ context.Context, userID, statusID string) error
- func (r *StatusRepository) CountReplies(_ context.Context, statusID string) (int, error)
- func (r *StatusRepository) CountStatusesByAuthor(_ context.Context, authorID string) (int, error)
- func (r *StatusRepository) CreateBoostStatus(ctx context.Context, status *models.Status) error
- func (r *StatusRepository) CreateStatus(_ context.Context, status *models.Status) error
- func (r *StatusRepository) DeleteBoostStatus(_ context.Context, boosterID, targetStatusID string) (*models.Status, error)
- func (r *StatusRepository) DeleteStatus(_ context.Context, statusID string) error
- func (r *StatusRepository) FlagStatus(_ context.Context, statusID, _ string, _ string) error
- func (r *StatusRepository) GetConversationThread(_ context.Context, conversationID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) GetFlaggedStatuses(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) GetHomeTimeline(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) GetPublicTimeline(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) GetReplies(_ context.Context, parentStatusID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) GetStatus(_ context.Context, statusID string) (*models.Status, error)
- func (r *StatusRepository) GetStatusByURL(_ context.Context, url string) (*models.Status, error)
- func (r *StatusRepository) GetStatusContext(_ context.Context, statusID string) (ancestors, descendants []*models.Status, err error)
- func (r *StatusRepository) GetStatusCounts(_ context.Context, statusID string) (likes, reblogs, replies int, err error)
- func (r *StatusRepository) GetStatusEngagement(_ context.Context, statusID, userID string) (liked, reblogged, bookmarked bool, err error)
- func (r *StatusRepository) GetStatusesByHashtag(_ context.Context, hashtag string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) GetStatusesByIDs(_ context.Context, statusIDs []string) ([]*models.Status, error)
- func (r *StatusRepository) GetTrendingStatuses(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) GetUserTimeline(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) LikeStatus(_ context.Context, userID, statusID string) error
- func (r *StatusRepository) ListStatusesForAdmin(_ context.Context, filter *interfaces.StatusFilter, limit int, cursor string) ([]*models.Status, string, error)
- func (r *StatusRepository) ReblogStatus(_ context.Context, userID, statusID string, _ string) error
- func (r *StatusRepository) SearchStatuses(_ context.Context, query string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
- func (r *StatusRepository) UnbookmarkStatus(_ context.Context, userID, statusID string) error
- func (r *StatusRepository) UnflagStatus(_ context.Context, statusID string) error
- func (r *StatusRepository) UnlikeStatus(_ context.Context, userID, statusID string) error
- func (r *StatusRepository) UnreblogStatus(_ context.Context, userID, statusID string) error
- func (r *StatusRepository) UpdateStatus(_ context.Context, status *models.Status) error
- type StreamingCloudWatchRepository
- func (r *StreamingCloudWatchRepository) CacheConcurrentViewers(_ context.Context, mediaID string, ...) error
- func (r *StreamingCloudWatchRepository) CacheGeographicData(_ context.Context, mediaID string, ...) error
- func (r *StreamingCloudWatchRepository) CachePerformanceMetrics(_ context.Context, mediaID string, ...) error
- func (r *StreamingCloudWatchRepository) CacheQualityBreakdown(_ context.Context, mediaID string, ...) error
- func (r *StreamingCloudWatchRepository) CleanupExpiredMetrics(_ context.Context) error
- func (r *StreamingCloudWatchRepository) Clear()
- func (r *StreamingCloudWatchRepository) Count() int
- func (r *StreamingCloudWatchRepository) GetAllCachedMetrics(_ context.Context, mediaID string) (map[string]*models.StreamingCloudWatchMetrics, error)
- func (r *StreamingCloudWatchRepository) GetConcurrentViewers(_ context.Context, mediaID string) (*models.StreamingCloudWatchMetrics, error)
- func (r *StreamingCloudWatchRepository) GetGeographicData(_ context.Context, mediaID string) (*models.StreamingCloudWatchMetrics, error)
- func (r *StreamingCloudWatchRepository) GetPerformanceMetrics(_ context.Context, mediaID string) (*models.StreamingCloudWatchMetrics, error)
- func (r *StreamingCloudWatchRepository) GetQualityBreakdown(_ context.Context, mediaID string) (*models.StreamingCloudWatchMetrics, error)
- func (r *StreamingCloudWatchRepository) MediaCount() int
- type StreamingConnectionRepository
- func (r *StreamingConnectionRepository) CleanupExpiredConnections(_ context.Context) (int, error)
- func (r *StreamingConnectionRepository) Clear()
- func (r *StreamingConnectionRepository) CloseTimedOutConnections(_ context.Context) (int, error)
- func (r *StreamingConnectionRepository) DeleteAllSubscriptions(_ context.Context, connectionID string) error
- func (r *StreamingConnectionRepository) DeleteConnection(_ context.Context, connectionID string) error
- func (r *StreamingConnectionRepository) DeleteSubscription(_ context.Context, connectionID, stream string) error
- func (r *StreamingConnectionRepository) EnforceResourceLimits(_ context.Context, connectionID string, messageSize int64) error
- func (r *StreamingConnectionRepository) GetActiveConnectionsCount(_ context.Context, userID string) (int, error)
- func (r *StreamingConnectionRepository) GetConnection(_ context.Context, connectionID string) (*models.WebSocketConnection, error)
- func (r *StreamingConnectionRepository) GetConnectionCountByState(_ context.Context, state models.ConnectionState) (int, error)
- func (r *StreamingConnectionRepository) GetConnectionPool(_ context.Context) (map[string]interface{}, error)
- func (r *StreamingConnectionRepository) GetConnectionsByState(_ context.Context, state models.ConnectionState) ([]models.WebSocketConnection, error)
- func (r *StreamingConnectionRepository) GetConnectionsByUser(_ context.Context, userID string) ([]models.WebSocketConnection, error)
- func (r *StreamingConnectionRepository) GetHealthyConnections(_ context.Context) ([]models.WebSocketConnection, error)
- func (r *StreamingConnectionRepository) GetIdleConnections(_ context.Context, idleThreshold time.Time) ([]models.WebSocketConnection, error)
- func (r *StreamingConnectionRepository) GetStaleConnections(_ context.Context, staleThreshold time.Time) ([]models.WebSocketConnection, error)
- func (r *StreamingConnectionRepository) GetSubscriptionsForStream(_ context.Context, stream string) ([]models.WebSocketSubscription, error)
- func (r *StreamingConnectionRepository) GetTotalActiveConnectionsCount(_ context.Context) (int, error)
- func (r *StreamingConnectionRepository) GetUnhealthyConnections(_ context.Context) ([]models.WebSocketConnection, error)
- func (r *StreamingConnectionRepository) GetUserConnectionCount(_ context.Context, userID string) (int, error)
- func (r *StreamingConnectionRepository) MarkConnectionsIdle(_ context.Context, idleThreshold time.Duration) (int, error)
- func (r *StreamingConnectionRepository) ReclaimIdleConnections(_ context.Context, maxIdleConnections int) (int, error)
- func (r *StreamingConnectionRepository) RecordConnectionError(_ context.Context, connectionID string, errorMsg string) error
- func (r *StreamingConnectionRepository) RecordConnectionMessage(_ context.Context, connectionID string, sent bool, messageSize int64) error
- func (r *StreamingConnectionRepository) RecordPing(_ context.Context, connectionID string) error
- func (r *StreamingConnectionRepository) RecordPong(_ context.Context, connectionID string) error
- func (r *StreamingConnectionRepository) UpdateConnection(_ context.Context, connection *models.WebSocketConnection) error
- func (r *StreamingConnectionRepository) UpdateConnectionActivity(_ context.Context, connectionID string) error
- func (r *StreamingConnectionRepository) UpdateConnectionState(_ context.Context, connectionID string, newState models.ConnectionState, ...) error
- func (r *StreamingConnectionRepository) WriteConnection(_ context.Context, connectionID, userID, username string, streams []string) (*models.WebSocketConnection, error)
- func (r *StreamingConnectionRepository) WriteSubscription(_ context.Context, connectionID, userID, stream string) error
- type ThreadRepository
- func (r *ThreadRepository) BulkSaveThreadNodes(ctx context.Context, nodes []*models.ThreadNode) error
- func (r *ThreadRepository) Clear()
- func (r *ThreadRepository) DeleteMissingReply(_ context.Context, rootStatusID, replyID string) error
- func (r *ThreadRepository) GetMissingReplies(_ context.Context, rootStatusID string) ([]*models.MissingReply, error)
- func (r *ThreadRepository) GetPendingMissingReplies(_ context.Context, limit int) ([]*models.MissingReply, error)
- func (r *ThreadRepository) GetThreadContext(ctx context.Context, statusID string) (*interfaces.ThreadContextResult, error)
- func (r *ThreadRepository) GetThreadNode(_ context.Context, rootStatusID, statusID string) (*models.ThreadNode, error)
- func (r *ThreadRepository) GetThreadNodeByStatusID(_ context.Context, statusID string) (*models.ThreadNode, error)
- func (r *ThreadRepository) GetThreadNodes(_ context.Context, rootStatusID string) ([]*models.ThreadNode, error)
- func (r *ThreadRepository) GetThreadSync(_ context.Context, statusID string) (*models.ThreadSync, error)
- func (r *ThreadRepository) MarkMissingReplies(_ context.Context, rootStatusID, parentStatusID string, replyIDs []string) error
- func (r *ThreadRepository) SaveMissingReply(_ context.Context, missing *models.MissingReply) error
- func (r *ThreadRepository) SaveThreadNode(_ context.Context, node *models.ThreadNode) error
- func (r *ThreadRepository) SaveThreadSync(_ context.Context, sync *models.ThreadSync) error
- type TimelineRepository
- func (r *TimelineRepository) AddConversation(conv *models.Conversation, participants []string)
- func (r *TimelineRepository) CountTimelineEntries(_ context.Context, timelineType, timelineID string) (int, error)
- func (r *TimelineRepository) CreateTimelineEntries(ctx context.Context, entries []*models.Timeline) error
- func (r *TimelineRepository) CreateTimelineEntry(_ context.Context, entry *models.Timeline) error
- func (r *TimelineRepository) DeleteExpiredTimelineEntries(_ context.Context, before time.Time) error
- func (r *TimelineRepository) DeleteTimelineEntriesByPost(_ context.Context, postID string) error
- func (r *TimelineRepository) DeleteTimelineEntry(_ context.Context, timelineType, timelineID, entryID string, ...) error
- func (r *TimelineRepository) GetConversations(_ context.Context, username string, limit int, cursor string) ([]*models.Conversation, string, error)
- func (r *TimelineRepository) GetDirectTimeline(_ context.Context, username string, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetHashtagTimeline(_ context.Context, hashtag string, local bool, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetHomeTimeline(_ context.Context, username string, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetListTimeline(_ context.Context, listID string, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetPublicTimeline(_ context.Context, local bool, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetTimelineEntriesByActor(_ context.Context, actorID string, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetTimelineEntriesByLanguage(_ context.Context, language string, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetTimelineEntriesByPost(_ context.Context, postID string, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetTimelineEntriesByVisibility(_ context.Context, visibility string, limit int, cursor string) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetTimelineEntriesInRange(_ context.Context, timelineType, timelineID string, ...) ([]*models.Timeline, error)
- func (r *TimelineRepository) GetTimelineEntriesWithFilters(_ context.Context, timelineType, timelineID string, ...) ([]*models.Timeline, string, error)
- func (r *TimelineRepository) GetTimelineEntry(_ context.Context, timelineType, timelineID, entryID string, ...) (*models.Timeline, error)
- func (r *TimelineRepository) RemoveFromTimelines(ctx context.Context, objectID string) error
- func (r *TimelineRepository) UpdateTimelineEntry(_ context.Context, entry *models.Timeline) error
- type TrackingRepository
- func (r *TrackingRepository) Aggregate(_ context.Context, _, _ string, _, _ time.Time) error
- func (r *TrackingRepository) BatchCreate(ctx context.Context, trackingList []*models.DynamoDBCostRecord) error
- func (r *TrackingRepository) Clear()
- func (r *TrackingRepository) Create(_ context.Context, tracking *models.DynamoDBCostRecord) error
- func (r *TrackingRepository) CreateAggregated(_ context.Context, aggregated *models.DynamoDBCostAggregation) error
- func (r *TrackingRepository) CreateRelayBudget(_ context.Context, budget *models.RelayBudget) error
- func (r *TrackingRepository) CreateRelayCost(_ context.Context, relayCost *models.RelayCost) error
- func (r *TrackingRepository) CreateRelayMetrics(_ context.Context, metrics *models.RelayMetrics) error
- func (r *TrackingRepository) Get(_ context.Context, operationType, id string, timestamp time.Time) (*models.DynamoDBCostRecord, error)
- func (r *TrackingRepository) GetAggregated(_ context.Context, period, operationType string, windowStart time.Time) (*models.DynamoDBCostAggregation, error)
- func (r *TrackingRepository) GetAggregatedCostsByPeriod(_ context.Context, period string, startDate, endDate time.Time) ([]*models.DynamoDBCostAggregation, error)
- func (r *TrackingRepository) GetCostProjections(_ context.Context, _ string) (*storage.CostProjection, error)
- func (r *TrackingRepository) GetCostTrends(_ context.Context, period string, operationType string, _ int) (*interfaces.CostTrend, error)
- func (r *TrackingRepository) GetCostsByDateRange(_ context.Context, startDate, endDate time.Time) ([]*models.DynamoDBCostRecord, error)
- func (r *TrackingRepository) GetCostsByOperationType(_ context.Context, _, _ time.Time) (map[string]*models.DynamoDBServiceCostStats, error)
- func (r *TrackingRepository) GetCostsByService(_ context.Context, _, _ time.Time) (map[string]*models.DynamoDBServiceCostStats, error)
- func (r *TrackingRepository) GetDailyAggregates(_ context.Context, _, _ time.Time) ([]*interfaces.DailyAggregate, error)
- func (r *TrackingRepository) GetHighCostOperations(_ context.Context, thresholdDollars float64, startTime, endTime time.Time, ...) ([]*models.DynamoDBCostRecord, error)
- func (r *TrackingRepository) GetMonthlyAggregate(_ context.Context, year, month int) (*interfaces.MonthlyAggregate, error)
- func (r *TrackingRepository) GetRecentCosts(_ context.Context, since time.Time, limit int) ([]*models.DynamoDBCostRecord, error)
- func (r *TrackingRepository) GetRelayCostsByDateRange(_ context.Context, startDate, endDate time.Time, limit int) ([]*models.RelayCost, error)
- func (r *TrackingRepository) GetRelayCostsByURL(_ context.Context, relayURL string, startTime, endTime time.Time, limit int, ...) ([]*models.RelayCost, string, error)
- func (r *TrackingRepository) GetRelayMetrics(_ context.Context, relayURL, period string, windowStart time.Time) (*models.RelayMetrics, error)
- func (r *TrackingRepository) GetRelayMetricsHistory(_ context.Context, relayURL string, startTime, endTime time.Time, limit int, ...) ([]*models.RelayMetrics, string, error)
- func (r *TrackingRepository) GetTableCostStats(_ context.Context, tableName string, startTime, endTime time.Time) (*interfaces.TableCostStats, error)
- func (r *TrackingRepository) ListAggregatedByPeriod(_ context.Context, period, operationType string, startTime, endTime time.Time, ...) ([]*models.DynamoDBCostAggregation, string, error)
- func (r *TrackingRepository) ListByOperationType(_ context.Context, operationType string, startTime, endTime time.Time, ...) ([]*models.DynamoDBCostRecord, error)
- func (r *TrackingRepository) ListByTable(_ context.Context, tableName string, startTime, endTime time.Time, limit int, ...) ([]*models.DynamoDBCostRecord, string, error)
- func (r *TrackingRepository) UpdateAggregated(_ context.Context, aggregated *models.DynamoDBCostAggregation) error
- func (r *TrackingRepository) UpdateRelayMetrics(_ context.Context, metrics *models.RelayMetrics) error
- type TrendingRepository
- func (r *TrendingRepository) Clear()
- func (r *TrendingRepository) GetEngagementMetrics(_ context.Context, statusID string) (*storage.EngagementMetrics, error)
- func (r *TrendingRepository) GetRecentHashtags(ctx context.Context, since time.Time, limit int) ([]*storage.TrendingHashtag, error)
- func (r *TrendingRepository) GetRecentLinks(ctx context.Context, since time.Time, limit int) ([]*storage.TrendingLink, error)
- func (r *TrendingRepository) GetRecentStatusesWithEngagement(ctx context.Context, since time.Time, limit int) ([]*storage.TrendingStatus, error)
- func (r *TrendingRepository) GetTrendingHashtags(_ context.Context, since time.Time, limit int) ([]*storage.TrendingHashtag, error)
- func (r *TrendingRepository) GetTrendingLinks(_ context.Context, since time.Time, limit int) ([]*storage.TrendingLink, error)
- func (r *TrendingRepository) GetTrendingStatuses(_ context.Context, since time.Time, limit int) ([]*storage.TrendingStatus, error)
- func (r *TrendingRepository) RecordHashtagUsage(_ context.Context, hashtag string, statusID string, authorID string) error
- func (r *TrendingRepository) RecordLinkShare(_ context.Context, linkURL string, statusID string, authorID string) error
- func (r *TrendingRepository) RecordStatusEngagement(_ context.Context, statusID string, engagementType string, userID string) error
- func (r *TrendingRepository) SetStatusRepository(statusRepo interface{})
- func (r *TrendingRepository) StoreEngagementMetrics(_ context.Context, metrics *storage.EngagementMetrics) error
- func (r *TrendingRepository) StoreHashtagTrend(_ context.Context, _ any) error
- func (r *TrendingRepository) StoreLinkTrend(_ context.Context, _ any) error
- func (r *TrendingRepository) StoreStatusTrend(_ context.Context, _ any) error
- type TrustRepository
- func (r *TrustRepository) Clear()
- func (r *TrustRepository) CreateTrustRelationship(_ context.Context, relationship *storage.TrustRelationship) error
- func (r *TrustRepository) DeleteTrustRelationship(_ context.Context, trusterID, trusteeID, category string) error
- func (r *TrustRepository) GetAllTrustRelationships(_ context.Context, limit int) ([]*storage.TrustRelationship, error)
- func (r *TrustRepository) GetRelationshipCount() int
- func (r *TrustRepository) GetScoreCount() int
- func (r *TrustRepository) GetTrustRelationship(_ context.Context, trusterID, trusteeID, category string) (*storage.TrustRelationship, error)
- func (r *TrustRepository) GetTrustRelationships(_ context.Context, trusterID string, limit int, cursor string) ([]*storage.TrustRelationship, string, error)
- func (r *TrustRepository) GetTrustScore(_ context.Context, actorID, category string) (*storage.TrustScore, error)
- func (r *TrustRepository) GetTrustedByRelationships(_ context.Context, trusteeID string, limit int, cursor string) ([]*storage.TrustRelationship, string, error)
- func (r *TrustRepository) GetUpdateCount() int
- func (r *TrustRepository) GetUserTrustScore(ctx context.Context, userID string) (float64, error)
- func (r *TrustRepository) RecordTrustUpdate(_ context.Context, update *storage.TrustUpdate) error
- func (r *TrustRepository) UpdateTrustRelationship(_ context.Context, relationship *storage.TrustRelationship) error
- func (r *TrustRepository) UpdateTrustScore(_ context.Context, score *storage.TrustScore) error
- type UserRepository
- func (r *UserRepository) AcceptFollow(_ context.Context, followerUsername, followedUsername string) error
- func (r *UserRepository) CacheRemoteActor(_ context.Context, handle string, actor *activitypub.Actor, ttl time.Duration) error
- func (r *UserRepository) CreateAccountNote(_ context.Context, note *storage.AccountNote) error
- func (r *UserRepository) CreateAccountPin(_ context.Context, pin *storage.AccountPin) error
- func (r *UserRepository) CreateBookmark(_ context.Context, username, objectID string) error
- func (r *UserRepository) CreateConversationMute(_ context.Context, mute *storage.ConversationMute) error
- func (r *UserRepository) CreateTrustRelationship(_ context.Context, relationship *storage.TrustRelationship) error
- func (r *UserRepository) CreateUser(_ context.Context, user *storage.User) error
- func (r *UserRepository) CreateVouch(_ context.Context, vouch *storage.Vouch) error
- func (r *UserRepository) DeleteAccountNote(_ context.Context, username, targetActorID string) error
- func (r *UserRepository) DeleteAccountPin(_ context.Context, username, pinnedActorID string) error
- func (r *UserRepository) DeleteConversationMute(_ context.Context, username, conversationID string) error
- func (r *UserRepository) DeleteExpiredTimelineEntries(_ context.Context, before time.Time) error
- func (r *UserRepository) DeleteFromTimeline(_ context.Context, timelineType, timelineID, entryID string) error
- func (r *UserRepository) DeleteTrustRelationship(_ context.Context, trusterID, trusteeID, category string) error
- func (r *UserRepository) DeleteUser(_ context.Context, username string) error
- func (r *UserRepository) FanOutPost(_ context.Context, _ *activitypub.Activity) error
- func (r *UserRepository) GetAccountNote(_ context.Context, username, targetActorID string) (*storage.AccountNote, error)
- func (r *UserRepository) GetAccountPins(_ context.Context, username string) ([]*storage.AccountPin, error)
- func (r *UserRepository) GetActiveUserCount(_ context.Context, days int) (int64, error)
- func (r *UserRepository) GetAllPreferences(_ context.Context, username string) (map[string]any, error)
- func (r *UserRepository) GetAllTrustRelationships(_ context.Context, limit int) ([]*storage.TrustRelationship, error)
- func (r *UserRepository) GetBookmarks(_ context.Context, username string, limit int, _ string) ([]string, string, error)
- func (r *UserRepository) GetDirectTimeline(_ context.Context, username string, limit int, _ string) ([]*storage.TimelineEntry, string, error)
- func (r *UserRepository) GetFollowRequestState(_ context.Context, followerID, targetID string) (string, error)
- func (r *UserRepository) GetHashtagTimeline(_ context.Context, hashtag string, _ bool, limit int, _ string) ([]*storage.TimelineEntry, string, error)
- func (r *UserRepository) GetLinkedProviders(_ context.Context, username string) ([]string, error)
- func (r *UserRepository) GetListTimeline(_ context.Context, listID string, limit int, _ string) ([]*storage.TimelineEntry, string, error)
- func (r *UserRepository) GetMonthlyVouchCount(_ context.Context, actorID string, year int, month time.Month) (int, error)
- func (r *UserRepository) GetMutedConversations(_ context.Context, username string) ([]string, error)
- func (r *UserRepository) GetPendingFollowRequests(_ context.Context, username string, limit int, _ string) ([]string, string, error)
- func (r *UserRepository) GetPreference(_ context.Context, username, key string) (any, error)
- func (r *UserRepository) GetReputation(_ context.Context, actorID string) (*storage.Reputation, error)
- func (r *UserRepository) GetReputationHistory(_ context.Context, actorID string, limit int) ([]*storage.Reputation, error)
- func (r *UserRepository) GetTotalUserCount(_ context.Context) (int64, error)
- func (r *UserRepository) GetTrustRelationship(_ context.Context, trusterID, trusteeID, category string) (*storage.TrustRelationship, error)
- func (r *UserRepository) GetTrustRelationships(_ context.Context, trusterID string, limit int, _ string) ([]*storage.TrustRelationship, string, error)
- func (r *UserRepository) GetTrustScore(_ context.Context, actorID, category string) (*storage.TrustScore, error)
- func (r *UserRepository) GetTrustedByRelationships(_ context.Context, trusteeID string, limit int, _ string) ([]*storage.TrustRelationship, string, error)
- func (r *UserRepository) GetUser(_ context.Context, username string) (*storage.User, error)
- func (r *UserRepository) GetUserByEmail(_ context.Context, email string) (*storage.User, error)
- func (r *UserRepository) GetUserByProviderID(_ context.Context, provider, providerID string) (*storage.User, error)
- func (r *UserRepository) GetUserLanguagePreference(_ context.Context, username string) (string, error)
- func (r *UserRepository) GetUserPreferences(_ context.Context, username string) (*storage.UserPreferences, error)
- func (r *UserRepository) GetUserTrustScore(_ context.Context, userID string) (float64, error)
- func (r *UserRepository) GetVouch(_ context.Context, vouchID string) (*storage.Vouch, error)
- func (r *UserRepository) GetVouchesByActor(_ context.Context, actorID string, activeOnly bool) ([]*storage.Vouch, error)
- func (r *UserRepository) GetVouchesForActor(_ context.Context, actorID string, activeOnly bool) ([]*storage.Vouch, error)
- func (r *UserRepository) IsAccountPinned(_ context.Context, username, actorID string) (bool, error)
- func (r *UserRepository) IsBookmarked(_ context.Context, username, objectID string) (bool, error)
- func (r *UserRepository) IsConversationMuted(_ context.Context, username, conversationID string) (bool, error)
- func (r *UserRepository) IsNotificationMuted(_ context.Context, userID, targetID string) (bool, error)
- func (r *UserRepository) LinkProviderAccount(_ context.Context, username, provider, providerID string) error
- func (r *UserRepository) ListAgents(_ context.Context, limit int32, cursor string) ([]*storage.User, string, error)
- func (r *UserRepository) ListUsers(_ context.Context, limit int32, cursor string) ([]*storage.User, string, error)
- func (r *UserRepository) ListUsersByRole(_ context.Context, role string) ([]*storage.User, error)
- func (r *UserRepository) RecordTrustUpdate(_ context.Context, update *storage.TrustUpdate) error
- func (r *UserRepository) RejectFollow(_ context.Context, followerUsername, followedUsername string) error
- func (r *UserRepository) RemoveBookmark(_ context.Context, username, objectID string) error
- func (r *UserRepository) RemoveFromFollowers(_ context.Context, username, followerUsername string) error
- func (r *UserRepository) SetPreference(_ context.Context, username, key string, value any) error
- func (r *UserRepository) SetUserLanguagePreference(_ context.Context, username string, language string) error
- func (r *UserRepository) StoreReputation(_ context.Context, actorID string, reputation *storage.Reputation) error
- func (r *UserRepository) UnlinkProviderAccount(_ context.Context, username, provider string) error
- func (r *UserRepository) UpdateAccountNote(_ context.Context, note *storage.AccountNote) error
- func (r *UserRepository) UpdatePreferences(_ context.Context, username string, preferences map[string]any) error
- func (r *UserRepository) UpdateTrustRelationship(ctx context.Context, relationship *storage.TrustRelationship) error
- func (r *UserRepository) UpdateTrustScore(_ context.Context, score *storage.TrustScore) error
- func (r *UserRepository) UpdateUser(_ context.Context, username string, updates map[string]any) error
- func (r *UserRepository) UpdateUserPreferences(_ context.Context, username string, preferences *storage.UserPreferences) error
- func (r *UserRepository) UpdateVouchStatus(_ context.Context, vouchID string, active bool, revokedAt *time.Time) error
- type WebSocketCostRepository
- func (r *WebSocketCostRepository) AggregateWebSocketCosts(_ context.Context, _, _ string, _, _ time.Time) error
- func (r *WebSocketCostRepository) BatchCreate(ctx context.Context, records []*models.WebSocketCostRecord) error
- func (r *WebSocketCostRepository) CheckBudgetLimits(_ context.Context, userID string) (*interfaces.BudgetStatus, error)
- func (r *WebSocketCostRepository) Clear()
- func (r *WebSocketCostRepository) Create(ctx context.Context, record *models.WebSocketCostRecord) error
- func (r *WebSocketCostRepository) CreateAggregation(_ context.Context, aggregation *models.WebSocketCostAggregation) error
- func (r *WebSocketCostRepository) CreateBudget(_ context.Context, budget *models.WebSocketCostBudget) error
- func (r *WebSocketCostRepository) CreateRecord(_ context.Context, record *models.WebSocketCostRecord) error
- func (r *WebSocketCostRepository) Get(ctx context.Context, operationType, id string, timestamp time.Time) (*models.WebSocketCostRecord, error)
- func (r *WebSocketCostRepository) GetAggregation(_ context.Context, period, operationType string, windowStart time.Time) (*models.WebSocketCostAggregation, error)
- func (r *WebSocketCostRepository) GetBudget(_ context.Context, userID, period string) (*models.WebSocketCostBudget, error)
- func (r *WebSocketCostRepository) GetConnectionCostSummary(_ context.Context, connectionID string, startTime, endTime time.Time) (*interfaces.WebSocketConnectionCostSummary, error)
- func (r *WebSocketCostRepository) GetRecentCosts(_ context.Context, since time.Time, limit int) ([]*models.WebSocketCostRecord, error)
- func (r *WebSocketCostRepository) GetRecord(_ context.Context, operationType, id string, timestamp time.Time) (*models.WebSocketCostRecord, error)
- func (r *WebSocketCostRepository) GetUserAggregation(_ context.Context, userID, period, operationType string, windowStart time.Time) (*models.WebSocketCostAggregation, error)
- func (r *WebSocketCostRepository) GetUserBudgets(_ context.Context, userID string) ([]*models.WebSocketCostBudget, error)
- func (r *WebSocketCostRepository) GetUserCostSummary(_ context.Context, userID string, startTime, endTime time.Time) (*interfaces.WebSocketUserCostSummary, error)
- func (r *WebSocketCostRepository) ListAggregationsByPeriod(_ context.Context, period, operationType string, startTime, endTime time.Time, ...) ([]*models.WebSocketCostAggregation, error)
- func (r *WebSocketCostRepository) ListByConnection(_ context.Context, connectionID string, startTime, endTime time.Time, ...) ([]*models.WebSocketCostRecord, error)
- func (r *WebSocketCostRepository) ListByOperationType(_ context.Context, operationType string, startTime, endTime time.Time, ...) ([]*models.WebSocketCostRecord, error)
- func (r *WebSocketCostRepository) ListByUser(_ context.Context, userID string, startTime, endTime time.Time, limit int) ([]*models.WebSocketCostRecord, error)
- func (r *WebSocketCostRepository) UpdateAggregation(_ context.Context, aggregation *models.WebSocketCostAggregation) error
- func (r *WebSocketCostRepository) UpdateBudget(_ context.Context, budget *models.WebSocketCostBudget) error
- func (r *WebSocketCostRepository) UpdateBudgetUsage(_ context.Context, userID string, additionalCostMicroCents int64) error
Constants ¶
const ( DLQStatusNew = "new" DLQStatusFailed = "failed" )
DLQStatus* values match the status stored on DLQ messages.
const RootCategoryKey = "ROOT"
RootCategoryKey is the parent key used for top-level categories.
Variables ¶
var ErrRateLimited = errors.New("rate limit exceeded")
ErrRateLimited is returned when a rate limit is exceeded
Functions ¶
This section is empty.
Types ¶
type AIRepository ¶
type AIRepository struct {
// contains filtered or unexported fields
}
AIRepository is a thread-safe in-memory implementation of interfaces.AIRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewAIRepository ¶
func NewAIRepository() *AIRepository
NewAIRepository creates a new in-memory AI repository
func (*AIRepository) AnalyzeContent ¶
func (r *AIRepository) AnalyzeContent(ctx context.Context, _ string, modelType string) (*ai.AIAnalysis, error)
AnalyzeContent performs comprehensive AI content analysis
func (*AIRepository) GetAnalysis ¶
func (r *AIRepository) GetAnalysis(_ context.Context, objectID string) (*ai.AIAnalysis, error)
GetAnalysis retrieves the most recent AI analysis for an object
func (*AIRepository) GetAnalysisByID ¶
func (r *AIRepository) GetAnalysisByID(_ context.Context, _, analysisID string) (*ai.AIAnalysis, error)
GetAnalysisByID retrieves a specific AI analysis by ID
func (*AIRepository) GetContentClassifications ¶
func (r *AIRepository) GetContentClassifications(ctx context.Context, contentID string) ([]string, error)
GetContentClassifications retrieves AI-powered content categorization
func (*AIRepository) GetMLFeedback ¶
func (r *AIRepository) GetMLFeedback(analysisID string) map[string]interface{}
GetMLFeedback returns ML feedback for an analysis (test helper)
func (*AIRepository) GetModelPerformance ¶
func (r *AIRepository) GetModelPerformance(modelID string) map[string]float64
GetModelPerformance returns model performance metrics (test helper)
func (*AIRepository) GetQueuedObjects ¶
func (r *AIRepository) GetQueuedObjects() []string
GetQueuedObjects returns all objects queued for analysis (test helper)
func (*AIRepository) MonitorAIHealth ¶
func (r *AIRepository) MonitorAIHealth(_ context.Context) error
MonitorAIHealth performs health checks on AI processing systems
func (*AIRepository) ProcessMLFeedback ¶
func (r *AIRepository) ProcessMLFeedback(_ context.Context, analysisID string, feedback map[string]interface{}) error
ProcessMLFeedback handles feedback for continuous learning systems
func (*AIRepository) QueueForAnalysis ¶
func (r *AIRepository) QueueForAnalysis(_ context.Context, objectID string) error
QueueForAnalysis marks an object for AI analysis
func (*AIRepository) SaveAnalysis ¶
func (r *AIRepository) SaveAnalysis(_ context.Context, analysis *ai.AIAnalysis) error
SaveAnalysis stores an AI analysis result
func (*AIRepository) UpdateModelPerformance ¶
func (r *AIRepository) UpdateModelPerformance(_ context.Context, modelID string, performanceMetrics map[string]float64) error
UpdateModelPerformance tracks AI model performance with accuracy metrics
type AccountRepository ¶
type AccountRepository struct {
// contains filtered or unexported fields
}
AccountRepository is a thread-safe in-memory implementation of interfaces.AccountRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewAccountRepository ¶
func NewAccountRepository() *AccountRepository
NewAccountRepository creates a new in-memory account repository
func (*AccountRepository) AddBookmark ¶
func (r *AccountRepository) AddBookmark(_ context.Context, username, objectID string) error
AddBookmark adds a bookmark for a user
func (*AccountRepository) ApproveAccount ¶
func (r *AccountRepository) ApproveAccount(_ context.Context, username string) error
ApproveAccount approves an account
func (*AccountRepository) ClearLoginAttempts ¶
func (r *AccountRepository) ClearLoginAttempts(_ context.Context, key string) error
ClearLoginAttempts clears login attempts for a key
func (*AccountRepository) CreateAccount ¶
CreateAccount creates a new account
func (*AccountRepository) CreateAccountNote ¶
func (r *AccountRepository) CreateAccountNote(_ context.Context, note *storage.AccountNote) error
CreateAccountNote creates an account note
func (*AccountRepository) CreateAccountPin ¶
func (r *AccountRepository) CreateAccountPin(_ context.Context, pin *storage.AccountPin) error
CreateAccountPin creates an account pin
func (*AccountRepository) CreateDevice ¶
CreateDevice creates a device
func (*AccountRepository) CreatePasswordReset ¶
func (r *AccountRepository) CreatePasswordReset(_ context.Context, reset *storage.PasswordReset) error
CreatePasswordReset creates a password reset token
func (*AccountRepository) CreatePasswordResetToken ¶
func (r *AccountRepository) CreatePasswordResetToken(_ context.Context, username, _ string) (string, error)
CreatePasswordResetToken creates a password reset token
func (*AccountRepository) CreateSession ¶
func (r *AccountRepository) CreateSession(_ context.Context, username, ipAddress, userAgent string) (*storage.Session, error)
CreateSession creates a new session
func (*AccountRepository) CreateSessionFromStruct ¶
func (r *AccountRepository) CreateSessionFromStruct(_ context.Context, session *storage.Session) error
CreateSessionFromStruct creates a session from a struct
func (*AccountRepository) DeleteAccount ¶
func (r *AccountRepository) DeleteAccount(_ context.Context, username string) error
DeleteAccount deletes an account
func (*AccountRepository) DeleteAccountPin ¶
func (r *AccountRepository) DeleteAccountPin(_ context.Context, username, targetActorID string) error
DeleteAccountPin deletes an account pin
func (*AccountRepository) DeleteRecoveryToken ¶
func (r *AccountRepository) DeleteRecoveryToken(_ context.Context, key string) error
DeleteRecoveryToken deletes a recovery token
func (*AccountRepository) DeleteSession ¶
func (r *AccountRepository) DeleteSession(_ context.Context, sessionID string) error
DeleteSession deletes a session
func (*AccountRepository) GetAccount ¶
func (r *AccountRepository) GetAccount(_ context.Context, username string) (*storage.Account, error)
GetAccount retrieves an account by username
func (*AccountRepository) GetAccountByEmail ¶
func (r *AccountRepository) GetAccountByEmail(_ context.Context, email string) (*storage.Account, error)
GetAccountByEmail retrieves an account by email
func (*AccountRepository) GetAccountByURL ¶
func (r *AccountRepository) GetAccountByURL(_ context.Context, actorURL string) (*storage.Account, error)
GetAccountByURL retrieves an account by actor URL
func (*AccountRepository) GetAccountFeatures ¶
func (r *AccountRepository) GetAccountFeatures(_ context.Context, username string) (map[string]bool, error)
GetAccountFeatures gets account features
func (*AccountRepository) GetAccountPreferences ¶
func (r *AccountRepository) GetAccountPreferences(_ context.Context, username string) (map[string]interface{}, error)
GetAccountPreferences gets account preferences
func (*AccountRepository) GetAccountsByUsernames ¶
func (r *AccountRepository) GetAccountsByUsernames(_ context.Context, usernames []string) ([]*storage.Account, error)
GetAccountsByUsernames gets accounts by usernames
func (*AccountRepository) GetAccountsCount ¶
func (r *AccountRepository) GetAccountsCount(_ context.Context) (int64, error)
GetAccountsCount gets the total count of accounts
func (*AccountRepository) GetActor ¶
func (r *AccountRepository) GetActor(_ context.Context, username string) (*activitypub.Actor, error)
GetActor retrieves an actor by username
func (*AccountRepository) GetActorByUsername ¶
func (r *AccountRepository) GetActorByUsername(ctx context.Context, username string) (*activitypub.Actor, error)
GetActorByUsername is an alias for GetActor
func (*AccountRepository) GetActorPrivateKey ¶
GetActorPrivateKey retrieves an actor's private key
func (*AccountRepository) GetBookmarkedStatuses ¶
func (r *AccountRepository) GetBookmarkedStatuses(_ context.Context, username string, _ interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetBookmarkedStatuses gets bookmarked statuses for a user
func (*AccountRepository) GetBookmarks ¶
func (r *AccountRepository) GetBookmarks(_ context.Context, username string, limit int, cursor string) ([]*storage.Bookmark, string, error)
GetBookmarks gets bookmarks for a user with pagination
func (*AccountRepository) GetFeaturedAccounts ¶
func (r *AccountRepository) GetFeaturedAccounts(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.Account], error)
GetFeaturedAccounts returns featured accounts
func (*AccountRepository) GetFieldVerification ¶
func (r *AccountRepository) GetFieldVerification(_ context.Context, _, _ string) (*storage.ActorField, error)
GetFieldVerification gets field verification
func (*AccountRepository) GetFollowRequestState ¶
func (r *AccountRepository) GetFollowRequestState(_ context.Context, requesterID, targetID string) (string, error)
GetFollowRequestState gets the state of a follow request
func (*AccountRepository) GetLinkedProviders ¶
GetLinkedProviders gets linked OAuth providers
func (*AccountRepository) GetLoginAttemptCount ¶
func (r *AccountRepository) GetLoginAttemptCount(_ context.Context, key string, _ time.Time) (int, error)
GetLoginAttemptCount gets the count of login attempts
func (*AccountRepository) GetLoginHistory ¶
func (r *AccountRepository) GetLoginHistory(_ context.Context, username string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.LoginAttempt], error)
GetLoginHistory gets login history for a user
func (*AccountRepository) GetPasswordReset ¶
func (r *AccountRepository) GetPasswordReset(_ context.Context, token string) (*storage.PasswordReset, error)
GetPasswordReset gets a password reset by token
func (*AccountRepository) GetPreference ¶
GetPreference gets a single preference
func (*AccountRepository) GetRecentLoginAttempts ¶
func (r *AccountRepository) GetRecentLoginAttempts(_ context.Context, username string, since time.Time) ([]*storage.LoginAttempt, error)
GetRecentLoginAttempts gets recent login attempts
func (*AccountRepository) GetRecoveryToken ¶
func (r *AccountRepository) GetRecoveryToken(_ context.Context, key string) (map[string]interface{}, error)
GetRecoveryToken gets a recovery token
func (*AccountRepository) GetSession ¶
func (r *AccountRepository) GetSession(_ context.Context, sessionID string) (*storage.Session, error)
GetSession gets a session by ID
func (*AccountRepository) GetSessionByRefreshToken ¶
func (r *AccountRepository) GetSessionByRefreshToken(_ context.Context, refreshToken string) (*storage.Session, error)
GetSessionByRefreshToken gets a session by refresh token
func (*AccountRepository) GetSuggestedAccounts ¶
func (r *AccountRepository) GetSuggestedAccounts(_ context.Context, _ string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.AccountSuggestion], error)
GetSuggestedAccounts returns suggested accounts
func (*AccountRepository) GetUserByEmail ¶
GetUserByEmail retrieves a user by email
func (*AccountRepository) GetUserByRecoveryCode ¶
func (r *AccountRepository) GetUserByRecoveryCode(_ context.Context, _ string) (*storage.User, error)
GetUserByRecoveryCode gets a user by recovery code
func (*AccountRepository) GetUserDevices ¶
func (r *AccountRepository) GetUserDevices(_ context.Context, username string) ([]*storage.Device, error)
GetUserDevices gets all devices for a user
func (*AccountRepository) GetUserSessions ¶
func (r *AccountRepository) GetUserSessions(_ context.Context, username string) ([]*storage.Session, error)
GetUserSessions gets all sessions for a user
func (*AccountRepository) InvalidateAllSessions ¶
func (r *AccountRepository) InvalidateAllSessions(_ context.Context, username string) error
InvalidateAllSessions invalidates all sessions for a user
func (*AccountRepository) InvalidateSession ¶
func (r *AccountRepository) InvalidateSession(_ context.Context, username, sessionID string) error
InvalidateSession invalidates a session
func (*AccountRepository) IsAccountPinned ¶
func (r *AccountRepository) IsAccountPinned(_ context.Context, username, targetActorID string) (bool, error)
IsAccountPinned checks if an account is pinned
func (*AccountRepository) IsBlockedDomain ¶
IsBlockedDomain checks if a domain is blocked
func (*AccountRepository) IsRateLimited ¶
IsRateLimited checks if a key is rate limited
func (*AccountRepository) RecordLogin ¶
func (r *AccountRepository) RecordLogin(_ context.Context, attempt *storage.LoginAttempt) error
RecordLogin records a login attempt
func (*AccountRepository) RecordLoginAttempt ¶
RecordLoginAttempt records a login attempt for rate limiting
func (*AccountRepository) RemoveBookmark ¶
func (r *AccountRepository) RemoveBookmark(_ context.Context, username, objectID string) error
RemoveBookmark removes a bookmark for a user
func (*AccountRepository) ResetPassword ¶
func (r *AccountRepository) ResetPassword(_ context.Context, token, newPasswordHash string) error
ResetPassword resets a password using a token
func (*AccountRepository) SearchAccounts ¶
func (r *AccountRepository) SearchAccounts(_ context.Context, query string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.Account], error)
SearchAccounts searches for accounts
func (*AccountRepository) SilenceAccount ¶
SilenceAccount silences an account
func (*AccountRepository) StoreRecoveryToken ¶
func (r *AccountRepository) StoreRecoveryToken(_ context.Context, key string, data map[string]interface{}) error
StoreRecoveryToken stores a recovery token
func (*AccountRepository) StoreWebAuthnChallenge ¶
func (r *AccountRepository) StoreWebAuthnChallenge(_ context.Context, challenge *storage.WebAuthnChallenge) error
StoreWebAuthnChallenge stores a WebAuthn challenge
func (*AccountRepository) StoreWebAuthnCredential ¶
func (r *AccountRepository) StoreWebAuthnCredential(_ context.Context, credential *storage.WebAuthnCredential) error
StoreWebAuthnCredential stores a WebAuthn credential
func (*AccountRepository) SuspendAccount ¶
SuspendAccount suspends an account
func (*AccountRepository) UnsilenceAccount ¶
func (r *AccountRepository) UnsilenceAccount(_ context.Context, username string) error
UnsilenceAccount unsilences an account
func (*AccountRepository) UnsuspendAccount ¶
func (r *AccountRepository) UnsuspendAccount(_ context.Context, username string) error
UnsuspendAccount unsuspends an account
func (*AccountRepository) UpdateAccount ¶
UpdateAccount updates an existing account
func (*AccountRepository) UpdateAccountFeatures ¶
func (r *AccountRepository) UpdateAccountFeatures(_ context.Context, username string, features map[string]bool) error
UpdateAccountFeatures updates account features
func (*AccountRepository) UpdateAccountPreferences ¶
func (r *AccountRepository) UpdateAccountPreferences(_ context.Context, username string, preferences map[string]interface{}) error
UpdateAccountPreferences updates account preferences
func (*AccountRepository) UpdateDevice ¶
UpdateDevice updates a device
func (*AccountRepository) UpdateLastActivity ¶
func (r *AccountRepository) UpdateLastActivity(_ context.Context, username string, _ time.Time) error
UpdateLastActivity updates the last activity time
func (*AccountRepository) UpdateLastLogin ¶
func (r *AccountRepository) UpdateLastLogin(_ context.Context, username string) error
UpdateLastLogin updates the last login time
func (*AccountRepository) UpdatePassword ¶
func (r *AccountRepository) UpdatePassword(_ context.Context, username, newPasswordHash string) error
UpdatePassword updates a user's password
func (*AccountRepository) UpdateSession ¶
func (r *AccountRepository) UpdateSession(_ context.Context, sessionID, refreshToken, ipAddress string, lastActivity, expiresAt time.Time) error
UpdateSession updates a session
func (*AccountRepository) UpdateUser ¶
func (r *AccountRepository) UpdateUser(_ context.Context, username string, updates map[string]interface{}) error
UpdateUser updates user data
func (*AccountRepository) UpdateWalletLastUsed ¶
func (r *AccountRepository) UpdateWalletLastUsed(_ context.Context, username, _ string) error
UpdateWalletLastUsed updates the last used time for a wallet
func (*AccountRepository) UpdateWebAuthnCredential ¶
func (r *AccountRepository) UpdateWebAuthnCredential(_ context.Context, credentialID string, signCount uint32) error
UpdateWebAuthnCredential updates a WebAuthn credential
func (*AccountRepository) UsePasswordReset ¶
func (r *AccountRepository) UsePasswordReset(_ context.Context, token string) error
UsePasswordReset marks a password reset as used
func (*AccountRepository) ValidateCredentials ¶
func (r *AccountRepository) ValidateCredentials(_ context.Context, username, _ string) (*storage.Account, error)
ValidateCredentials validates user credentials
func (*AccountRepository) ValidatePassword ¶
func (r *AccountRepository) ValidatePassword(_ context.Context, username, _ string) (*storage.User, error)
ValidatePassword validates a password
func (*AccountRepository) ValidatePasswordResetToken ¶
func (r *AccountRepository) ValidatePasswordResetToken(_ context.Context, token string) (*storage.PasswordReset, error)
ValidatePasswordResetToken validates a password reset token
type ActivityMetric ¶
type ActivityMetric struct {
// contains filtered or unexported fields
}
ActivityMetric stores activity metric data
type ActivityRepository ¶
type ActivityRepository struct {
// contains filtered or unexported fields
}
ActivityRepository is a thread-safe in-memory implementation of interfaces.ActivityRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewActivityRepository ¶
func NewActivityRepository() *ActivityRepository
NewActivityRepository creates a new in-memory activity repository
func (*ActivityRepository) Clear ¶
func (r *ActivityRepository) Clear()
Clear clears all data (test helper)
func (*ActivityRepository) CreateActivity ¶
func (r *ActivityRepository) CreateActivity(_ context.Context, activity *activitypub.Activity) error
CreateActivity stores an activity in the database
func (*ActivityRepository) GetActivity ¶
func (r *ActivityRepository) GetActivity(_ context.Context, id string) (*activitypub.Activity, error)
GetActivity retrieves an activity by ID
func (*ActivityRepository) GetActivityMetrics ¶
func (r *ActivityRepository) GetActivityMetrics(actorID string) []*ActivityMetric
GetActivityMetrics returns activity metrics for an actor (test helper)
func (*ActivityRepository) GetCollection ¶
func (r *ActivityRepository) GetCollection(ctx context.Context, username, collectionType string, limit int, cursor string) (*activitypub.OrderedCollectionPage, error)
GetCollection retrieves a collection for an actor
func (*ActivityRepository) GetFederationActivities ¶
func (r *ActivityRepository) GetFederationActivities(domain string) []*storage.FederationActivity
GetFederationActivities returns federation activities for a domain (test helper)
func (*ActivityRepository) GetHashtagActivity ¶
func (r *ActivityRepository) GetHashtagActivity(_ context.Context, hashtag string, since time.Time) ([]*storage.Activity, error)
GetHashtagActivity retrieves activities related to a hashtag since a given time
func (*ActivityRepository) GetInboxActivities ¶
func (r *ActivityRepository) GetInboxActivities(_ context.Context, username string, limit int, cursor string) ([]*activitypub.Activity, string, error)
GetInboxActivities retrieves inbox activities for a user with pagination
func (*ActivityRepository) GetOutboxActivities ¶
func (r *ActivityRepository) GetOutboxActivities(_ context.Context, username string, limit int, cursor string) ([]*activitypub.Activity, string, error)
GetOutboxActivities retrieves activities created by a user with pagination
func (*ActivityRepository) GetWeeklyActivity ¶
func (r *ActivityRepository) GetWeeklyActivity(_ context.Context, weekTimestamp int64) (*storage.WeeklyActivity, error)
GetWeeklyActivity retrieves weekly activity statistics
func (*ActivityRepository) RecordActivity ¶
func (r *ActivityRepository) RecordActivity(_ context.Context, activityType string, actorID string, timestamp time.Time) error
RecordActivity records general activity metrics
func (*ActivityRepository) RecordFederationActivity ¶
func (r *ActivityRepository) RecordFederationActivity(_ context.Context, activity *storage.FederationActivity) error
RecordFederationActivity records federation activity metrics
func (*ActivityRepository) SetWeeklyStats ¶
func (r *ActivityRepository) SetWeeklyStats(weekTimestamp int64, stats *storage.WeeklyActivity)
SetWeeklyStats sets weekly stats for testing
type ActorRepository ¶
type ActorRepository struct {
// contains filtered or unexported fields
}
ActorRepository is a thread-safe in-memory implementation of interfaces.ActorRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewActorRepository ¶
func NewActorRepository() *ActorRepository
NewActorRepository creates a new in-memory actor repository
func (*ActorRepository) CheckAlsoKnownAs ¶
func (r *ActorRepository) CheckAlsoKnownAs(_ context.Context, username string, targetActorID string) (bool, error)
CheckAlsoKnownAs checks if targetActorID is in the AlsoKnownAs slice for the given username
func (*ActorRepository) CreateActor ¶
func (r *ActorRepository) CreateActor(_ context.Context, actor *activitypub.Actor, privateKey string) error
CreateActor creates a new actor
func (*ActorRepository) DeleteActor ¶
func (r *ActorRepository) DeleteActor(_ context.Context, username string) error
DeleteActor deletes an actor
func (*ActorRepository) GetAccountSuggestions ¶
func (r *ActorRepository) GetAccountSuggestions(_ context.Context, _ string, limit int) ([]*activitypub.Actor, error)
GetAccountSuggestions gets suggested accounts for a user
func (*ActorRepository) GetActor ¶
func (r *ActorRepository) GetActor(_ context.Context, username string) (*activitypub.Actor, error)
GetActor retrieves an actor by username
func (*ActorRepository) GetActorByNumericID ¶
func (r *ActorRepository) GetActorByNumericID(_ context.Context, numericID string) (*activitypub.Actor, error)
GetActorByNumericID retrieves an actor by numeric ID
func (*ActorRepository) GetActorByUsername ¶
func (r *ActorRepository) GetActorByUsername(ctx context.Context, username string) (*activitypub.Actor, error)
GetActorByUsername retrieves an actor by username (alias for GetActor)
func (*ActorRepository) GetActorMigrationInfo ¶
func (r *ActorRepository) GetActorMigrationInfo(_ context.Context, username string) (*interfaces.MigrationInfo, error)
GetActorMigrationInfo returns migration information for an actor
func (*ActorRepository) GetActorPrivateKey ¶
GetActorPrivateKey retrieves an actor's private key
func (*ActorRepository) GetActorWithMetadata ¶
func (r *ActorRepository) GetActorWithMetadata(_ context.Context, username string) (*activitypub.Actor, *storage.ActorMetadata, error)
GetActorWithMetadata retrieves an actor with metadata
func (*ActorRepository) GetCachedRemoteActor ¶
func (r *ActorRepository) GetCachedRemoteActor(_ context.Context, handle string) (*activitypub.Actor, error)
GetCachedRemoteActor retrieves a cached remote actor by handle
func (*ActorRepository) GetSearchSuggestions ¶
func (r *ActorRepository) GetSearchSuggestions(_ context.Context, prefix string) ([]storage.SearchSuggestion, error)
GetSearchSuggestions returns search suggestions for autocomplete
func (*ActorRepository) RemoveAccountSuggestion ¶
func (r *ActorRepository) RemoveAccountSuggestion(_ context.Context, userID, targetID string) error
RemoveAccountSuggestion removes an account from suggestions for a user
func (*ActorRepository) SearchAccounts ¶
func (r *ActorRepository) SearchAccounts(_ context.Context, query string, limit int, _ bool, _ int) ([]*activitypub.Actor, error)
SearchAccounts searches for actors by username or display name
func (*ActorRepository) SetActorFields ¶
func (r *ActorRepository) SetActorFields(_ context.Context, username string, fields []storage.ActorField) error
SetActorFields updates the profile fields for an actor
func (*ActorRepository) SetCachedRemoteActor ¶
func (r *ActorRepository) SetCachedRemoteActor(handle string, actor *activitypub.Actor, ttl time.Duration)
SetCachedRemoteActor stores a remote actor in the cache (test helper)
func (*ActorRepository) UpdateActor ¶
func (r *ActorRepository) UpdateActor(_ context.Context, actor *activitypub.Actor) error
UpdateActor updates an existing actor
func (*ActorRepository) UpdateActorLastStatusTime ¶
func (r *ActorRepository) UpdateActorLastStatusTime(_ context.Context, username string) error
UpdateActorLastStatusTime updates the last status timestamp
func (*ActorRepository) UpdateAlsoKnownAs ¶
func (r *ActorRepository) UpdateAlsoKnownAs(_ context.Context, username string, alsoKnownAs []string) error
UpdateAlsoKnownAs updates the AlsoKnownAs field for an actor
func (*ActorRepository) UpdateMovedTo ¶
UpdateMovedTo updates the MovedTo field for an actor
type AnnouncementRepository ¶
type AnnouncementRepository struct {
// contains filtered or unexported fields
}
AnnouncementRepository is a thread-safe in-memory implementation of interfaces.AnnouncementRepository.
func NewAnnouncementRepository ¶
func NewAnnouncementRepository() *AnnouncementRepository
NewAnnouncementRepository creates a new in-memory announcement repository
func (*AnnouncementRepository) AddAnnouncementReaction ¶
func (r *AnnouncementRepository) AddAnnouncementReaction(_ context.Context, username, announcementID, emojiName string) error
AddAnnouncementReaction adds a user's reaction to an announcement
func (*AnnouncementRepository) Clear ¶
func (r *AnnouncementRepository) Clear()
Clear clears all data (test helper)
func (*AnnouncementRepository) CreateAnnouncement ¶
func (r *AnnouncementRepository) CreateAnnouncement(_ context.Context, announcement *storage.Announcement) error
CreateAnnouncement creates a new announcement
func (*AnnouncementRepository) DeleteAnnouncement ¶
func (r *AnnouncementRepository) DeleteAnnouncement(_ context.Context, id string) error
DeleteAnnouncement deletes an announcement
func (*AnnouncementRepository) DismissAnnouncement ¶
func (r *AnnouncementRepository) DismissAnnouncement(_ context.Context, username, announcementID string) error
DismissAnnouncement marks an announcement as dismissed by a user
func (*AnnouncementRepository) GetAnnouncement ¶
func (r *AnnouncementRepository) GetAnnouncement(_ context.Context, id string) (*storage.Announcement, error)
GetAnnouncement retrieves a single announcement by ID
func (*AnnouncementRepository) GetAnnouncementReactions ¶
func (r *AnnouncementRepository) GetAnnouncementReactions(_ context.Context, announcementID string) (map[string][]string, error)
GetAnnouncementReactions gets all reactions for an announcement
func (*AnnouncementRepository) GetAnnouncements ¶
func (r *AnnouncementRepository) GetAnnouncements(_ context.Context, active bool) ([]*storage.Announcement, error)
GetAnnouncements retrieves all announcements (for backward compatibility)
func (*AnnouncementRepository) GetAnnouncementsByAdmin ¶
func (r *AnnouncementRepository) GetAnnouncementsByAdmin(_ context.Context, _ string, limit int, cursor string) ([]*storage.Announcement, string, error)
GetAnnouncementsByAdmin retrieves announcements created by a specific admin
func (*AnnouncementRepository) GetAnnouncementsPaginated ¶
func (r *AnnouncementRepository) GetAnnouncementsPaginated(_ context.Context, active bool, limit int, cursor string) ([]*storage.Announcement, string, error)
GetAnnouncementsPaginated retrieves announcements with pagination
func (*AnnouncementRepository) GetDismissedAnnouncements ¶
func (r *AnnouncementRepository) GetDismissedAnnouncements(_ context.Context, username string) ([]string, error)
GetDismissedAnnouncements gets all announcement IDs dismissed by a user
func (*AnnouncementRepository) IsDismissed ¶
func (r *AnnouncementRepository) IsDismissed(_ context.Context, username, announcementID string) (bool, error)
IsDismissed checks if a user has dismissed an announcement
func (*AnnouncementRepository) RemoveAnnouncementReaction ¶
func (r *AnnouncementRepository) RemoveAnnouncementReaction(_ context.Context, username, announcementID, emojiName string) error
RemoveAnnouncementReaction removes a user's reaction from an announcement
func (*AnnouncementRepository) UpdateAnnouncement ¶
func (r *AnnouncementRepository) UpdateAnnouncement(_ context.Context, announcement *storage.Announcement) error
UpdateAnnouncement updates an existing announcement
type ArticleRepository ¶
type ArticleRepository struct {
// contains filtered or unexported fields
}
ArticleRepository is a thread-safe in-memory implementation of interfaces.ArticleRepository.
func NewArticleRepository ¶
func NewArticleRepository() *ArticleRepository
NewArticleRepository creates a new in-memory article repository
func (*ArticleRepository) Clear ¶
func (r *ArticleRepository) Clear()
Clear clears all data (test helper)
func (*ArticleRepository) CreateArticle ¶
CreateArticle creates a new article
func (*ArticleRepository) DeleteArticle ¶
func (r *ArticleRepository) DeleteArticle(_ context.Context, id string) error
DeleteArticle deletes an article
func (*ArticleRepository) GetArticle ¶
GetArticle retrieves an article by ID
func (*ArticleRepository) GetDB ¶
func (r *ArticleRepository) GetDB() dynamormcore.DB
GetDB returns the underlying DynamoDB connection. For in-memory implementation, this returns nil.
func (*ArticleRepository) ListArticles ¶
ListArticles lists articles with a limit
func (*ArticleRepository) ListArticlesByAuthorPaginated ¶
func (r *ArticleRepository) ListArticlesByAuthorPaginated(_ context.Context, authorActorID string, limit int, cursor string) ([]*models.Article, string, error)
ListArticlesByAuthorPaginated lists articles for a specific author with pagination
func (*ArticleRepository) ListArticlesByCategoryPaginated ¶
func (r *ArticleRepository) ListArticlesByCategoryPaginated(_ context.Context, categoryID string, limit int, cursor string) ([]*models.Article, string, error)
ListArticlesByCategoryPaginated lists articles for a specific category with pagination
func (*ArticleRepository) ListArticlesBySeriesPaginated ¶
func (r *ArticleRepository) ListArticlesBySeriesPaginated(_ context.Context, seriesID string, limit int, cursor string) ([]*models.Article, string, error)
ListArticlesBySeriesPaginated lists articles for a specific series with pagination
func (*ArticleRepository) ListArticlesPaginated ¶
func (r *ArticleRepository) ListArticlesPaginated(_ context.Context, limit int, cursor string) ([]*models.Article, string, error)
ListArticlesPaginated lists articles with cursor pagination
func (*ArticleRepository) UpdateArticle ¶
UpdateArticle updates an existing article
type AuditRepository ¶
type AuditRepository struct {
// contains filtered or unexported fields
}
AuditRepository is a thread-safe in-memory implementation of interfaces.AuditRepository.
func NewAuditRepository ¶
func NewAuditRepository() *AuditRepository
NewAuditRepository creates a new in-memory audit repository
func (*AuditRepository) CleanupOldLogs ¶
func (r *AuditRepository) CleanupOldLogs(_ context.Context, retentionDays int) error
CleanupOldLogs removes audit logs older than retention period
func (*AuditRepository) Clear ¶
func (r *AuditRepository) Clear()
Clear clears all data (test helper)
func (*AuditRepository) GetAuditLogByID ¶
func (r *AuditRepository) GetAuditLogByID(_ context.Context, id string, _ time.Time) (*models.AuthAuditLog, error)
GetAuditLogByID retrieves an audit log by ID and date
func (*AuditRepository) GetIPAuditLogs ¶
func (r *AuditRepository) GetIPAuditLogs(_ context.Context, ipAddress string, limit int, startTime, endTime time.Time) ([]*models.AuthAuditLog, error)
GetIPAuditLogs retrieves audit logs for a specific IP address
func (*AuditRepository) GetRecentFailedLogins ¶
func (r *AuditRepository) GetRecentFailedLogins(_ context.Context, username string, duration time.Duration) (int, error)
GetRecentFailedLogins gets recent failed login attempts for a user
func (*AuditRepository) GetRecentIPFailures ¶
func (r *AuditRepository) GetRecentIPFailures(_ context.Context, ipAddress string, duration time.Duration) (int, error)
GetRecentIPFailures gets recent failures from an IP address
func (*AuditRepository) GetSecurityEvents ¶
func (r *AuditRepository) GetSecurityEvents(_ context.Context, severity string, startTime, endTime time.Time, limit int, cursor string) ([]*models.AuthAuditLog, string, error)
GetSecurityEvents retrieves security events by severity within a time range
func (*AuditRepository) GetSessionAuditLogs ¶
func (r *AuditRepository) GetSessionAuditLogs(_ context.Context, sessionID string) ([]*models.AuthAuditLog, error)
GetSessionAuditLogs retrieves audit logs for a specific session
func (*AuditRepository) GetUserAuditLogs ¶
func (r *AuditRepository) GetUserAuditLogs(_ context.Context, username string, limit int, startTime, endTime time.Time) ([]*models.AuthAuditLog, error)
GetUserAuditLogs retrieves audit logs for a specific user
func (*AuditRepository) StoreAuditEvent ¶
func (r *AuditRepository) StoreAuditEvent(ctx context.Context, eventType, severity, username, userID, ipAddress, userAgent, deviceName, sessionID, requestID string, success bool, failureReason string, _ map[string]interface{}) error
StoreAuditEvent stores an audit event with full metadata
func (*AuditRepository) StoreAuditLog ¶
func (r *AuditRepository) StoreAuditLog(_ context.Context, log *models.AuthAuditLog) error
StoreAuditLog stores an audit log entry
type BookmarkRepository ¶
type BookmarkRepository struct {
// contains filtered or unexported fields
}
BookmarkRepository is a thread-safe in-memory implementation of interfaces.BookmarkRepository.
func NewBookmarkRepository ¶
func NewBookmarkRepository() *BookmarkRepository
NewBookmarkRepository creates a new in-memory bookmark repository
func (*BookmarkRepository) AddBookmark ¶
func (r *BookmarkRepository) AddBookmark(ctx context.Context, username, objectID string) error
AddBookmark provides Storage interface compatibility
func (*BookmarkRepository) CascadeDeleteObjectBookmarks ¶
func (r *BookmarkRepository) CascadeDeleteObjectBookmarks(_ context.Context, objectID string) error
CascadeDeleteObjectBookmarks deletes all bookmarks for an object
func (*BookmarkRepository) CascadeDeleteUserBookmarks ¶
func (r *BookmarkRepository) CascadeDeleteUserBookmarks(_ context.Context, username string) error
CascadeDeleteUserBookmarks deletes all bookmarks for a user
func (*BookmarkRepository) CheckBookmarksForStatuses ¶
func (r *BookmarkRepository) CheckBookmarksForStatuses(_ context.Context, username string, statusIDs []string) (map[string]bool, error)
CheckBookmarksForStatuses returns a map of statusID -> bookmarked for the provided IDs
func (*BookmarkRepository) Clear ¶
func (r *BookmarkRepository) Clear()
Clear clears all data (test helper)
func (*BookmarkRepository) CountUserBookmarks ¶
CountUserBookmarks returns the total number of bookmarks by a user
func (*BookmarkRepository) CreateBookmark ¶
func (r *BookmarkRepository) CreateBookmark(_ context.Context, username, objectID string) (*models.Bookmark, error)
CreateBookmark creates a new bookmark for a user
func (*BookmarkRepository) DeleteBookmark ¶
func (r *BookmarkRepository) DeleteBookmark(_ context.Context, username, objectID string) error
DeleteBookmark removes a bookmark
func (*BookmarkRepository) GetBookmark ¶
func (r *BookmarkRepository) GetBookmark(_ context.Context, username, objectID string) (*models.Bookmark, error)
GetBookmark retrieves a specific bookmark
func (*BookmarkRepository) GetBookmarkCount ¶
func (r *BookmarkRepository) GetBookmarkCount() int
GetBookmarkCount returns the number of bookmarks (test helper)
func (*BookmarkRepository) GetBookmarks ¶
func (r *BookmarkRepository) GetBookmarks(ctx context.Context, username string, limit int, cursor string) ([]*storage.Bookmark, string, error)
GetBookmarks provides Storage interface compatibility - returns storage.Bookmark format
func (*BookmarkRepository) GetUserBookmarks ¶
func (r *BookmarkRepository) GetUserBookmarks(_ context.Context, username string, limit int, cursor string) ([]*models.Bookmark, string, error)
GetUserBookmarks retrieves all bookmarks for a user with pagination
func (*BookmarkRepository) IsBookmarked ¶
func (r *BookmarkRepository) IsBookmarked(_ context.Context, username, objectID string) (bool, error)
IsBookmarked checks if a user has bookmarked an object
func (*BookmarkRepository) RemoveBookmark ¶
func (r *BookmarkRepository) RemoveBookmark(ctx context.Context, username, objectID string) error
RemoveBookmark provides Storage interface compatibility
type CategoryRepository ¶
type CategoryRepository struct {
// contains filtered or unexported fields
}
CategoryRepository is a thread-safe in-memory implementation of interfaces.CategoryRepository.
func NewCategoryRepository ¶
func NewCategoryRepository() *CategoryRepository
NewCategoryRepository creates a new in-memory category repository
func (*CategoryRepository) Clear ¶
func (r *CategoryRepository) Clear()
Clear clears all data (test helper)
func (*CategoryRepository) CreateCategory ¶
CreateCategory creates a new category
func (*CategoryRepository) Delete ¶
func (r *CategoryRepository) Delete(_ context.Context, _, sk string) error
Delete deletes a category by PK and SK
func (*CategoryRepository) GetCategory ¶
GetCategory retrieves a category by ID
func (*CategoryRepository) GetDB ¶
func (r *CategoryRepository) GetDB() dynamormcore.DB
GetDB returns the underlying DynamoDB connection. For in-memory implementation, this returns nil.
func (*CategoryRepository) ListCategories ¶
func (r *CategoryRepository) ListCategories(_ context.Context, parentID *string, limit int) ([]*models.Category, error)
ListCategories lists all categories (optionally filtered by parent)
func (*CategoryRepository) UpdateArticleCount ¶
func (r *CategoryRepository) UpdateArticleCount(_ context.Context, categoryID string, delta int) error
UpdateArticleCount atomically increments/decrements a category's ArticleCount
type CloudWatchMetricsRepository ¶
type CloudWatchMetricsRepository struct {
// contains filtered or unexported fields
}
CloudWatchMetricsRepository is a thread-safe in-memory implementation of interfaces.CloudWatchMetricsRepository.
func NewCloudWatchMetricsRepository ¶
func NewCloudWatchMetricsRepository() *CloudWatchMetricsRepository
NewCloudWatchMetricsRepository creates a new in-memory CloudWatch metrics repository.
func (*CloudWatchMetricsRepository) CacheMetrics ¶
func (r *CloudWatchMetricsRepository) CacheMetrics(_ context.Context, serviceName string, metrics *interfaces.ServiceMetrics) error
CacheMetrics stores metrics in DynamoDB for performance optimization.
func (*CloudWatchMetricsRepository) Clear ¶
func (r *CloudWatchMetricsRepository) Clear()
Clear clears all cached data.
func (*CloudWatchMetricsRepository) Count ¶
func (r *CloudWatchMetricsRepository) Count() int
Count returns the number of cached service metrics.
func (*CloudWatchMetricsRepository) GetCachedMetrics ¶
func (r *CloudWatchMetricsRepository) GetCachedMetrics(_ context.Context, serviceName string) (*interfaces.ServiceMetrics, error)
GetCachedMetrics retrieves cached metrics from DynamoDB.
func (*CloudWatchMetricsRepository) GetCostBreakdown ¶
func (r *CloudWatchMetricsRepository) GetCostBreakdown(_ context.Context, _ time.Duration) (*interfaces.CostBreakdown, error)
GetCostBreakdown retrieves detailed cost breakdown for the specified period.
func (*CloudWatchMetricsRepository) GetInstanceMetrics ¶
func (r *CloudWatchMetricsRepository) GetInstanceMetrics(ctx context.Context, period time.Duration) (*interfaces.ServiceMetrics, error)
GetInstanceMetrics retrieves instance-level metrics for the past period.
func (*CloudWatchMetricsRepository) GetServiceMetrics ¶
func (r *CloudWatchMetricsRepository) GetServiceMetrics(_ context.Context, serviceName string, _ time.Duration) (*interfaces.ServiceMetrics, error)
GetServiceMetrics retrieves comprehensive metrics for a service over the specified period.
func (*CloudWatchMetricsRepository) SetServiceMetrics ¶
func (r *CloudWatchMetricsRepository) SetServiceMetrics(serviceName string, metrics *interfaces.ServiceMetrics)
SetServiceMetrics sets metrics for a service (test helper).
type CommunityNoteRepository ¶
type CommunityNoteRepository struct {
// contains filtered or unexported fields
}
CommunityNoteRepository is a thread-safe in-memory implementation of interfaces.CommunityNoteRepository.
func NewCommunityNoteRepository ¶
func NewCommunityNoteRepository() *CommunityNoteRepository
NewCommunityNoteRepository creates a new in-memory community note repository
func (*CommunityNoteRepository) Clear ¶
func (r *CommunityNoteRepository) Clear()
Clear clears all data (test helper)
func (*CommunityNoteRepository) CreateCommunityNote ¶
func (r *CommunityNoteRepository) CreateCommunityNote(_ context.Context, note *storage.CommunityNote) error
CreateCommunityNote creates a new community note
func (*CommunityNoteRepository) CreateCommunityNoteVote ¶
func (r *CommunityNoteRepository) CreateCommunityNoteVote(_ context.Context, vote *storage.CommunityNoteVote) error
CreateCommunityNoteVote creates a vote on a note
func (*CommunityNoteRepository) GetCommunityNote ¶
func (r *CommunityNoteRepository) GetCommunityNote(_ context.Context, noteID string) (*storage.CommunityNote, error)
GetCommunityNote retrieves a note by ID
func (*CommunityNoteRepository) GetCommunityNoteVotes ¶
func (r *CommunityNoteRepository) GetCommunityNoteVotes(_ context.Context, noteID string) ([]*storage.CommunityNoteVote, error)
GetCommunityNoteVotes retrieves votes on a specific community note
func (*CommunityNoteRepository) GetCommunityNotesByAuthor ¶
func (r *CommunityNoteRepository) GetCommunityNotesByAuthor(_ context.Context, authorID string, limit int, cursor string) ([]*storage.CommunityNote, string, error)
GetCommunityNotesByAuthor retrieves community notes authored by a specific actor
func (*CommunityNoteRepository) GetUserCommunityNoteVotes ¶
func (r *CommunityNoteRepository) GetUserCommunityNoteVotes(_ context.Context, userID string, noteIDs []string) (map[string]*storage.CommunityNoteVote, error)
GetUserCommunityNoteVotes retrieves a user's votes on specific notes
func (*CommunityNoteRepository) GetUserVotingHistory ¶
func (r *CommunityNoteRepository) GetUserVotingHistory(_ context.Context, userID string, limit int) ([]*storage.CommunityNoteVote, error)
GetUserVotingHistory retrieves a user's voting history for reputation calculation
func (*CommunityNoteRepository) GetVisibleCommunityNotes ¶
func (r *CommunityNoteRepository) GetVisibleCommunityNotes(_ context.Context, objectID string) ([]*storage.CommunityNote, error)
GetVisibleCommunityNotes retrieves visible notes for an object
func (*CommunityNoteRepository) UpdateCommunityNoteAnalysis ¶
func (r *CommunityNoteRepository) UpdateCommunityNoteAnalysis(_ context.Context, noteID string, sentiment, objectivity, sourceQuality float64) error
UpdateCommunityNoteAnalysis updates AI analysis results for a note
func (*CommunityNoteRepository) UpdateCommunityNoteScore ¶
func (r *CommunityNoteRepository) UpdateCommunityNoteScore(_ context.Context, noteID string, score float64, status string) error
UpdateCommunityNoteScore updates a note's score and visibility
type ConversationRepository ¶
type ConversationRepository struct {
// contains filtered or unexported fields
}
ConversationRepository is a thread-safe in-memory implementation of interfaces.ConversationRepository.
func NewConversationRepository ¶
func NewConversationRepository() *ConversationRepository
NewConversationRepository creates a new in-memory conversation repository
func (*ConversationRepository) AddParticipant ¶
func (r *ConversationRepository) AddParticipant(_ context.Context, conversationID, participantID string) error
AddParticipant adds a participant to a conversation
func (*ConversationRepository) AddStatusToConversation ¶
func (r *ConversationRepository) AddStatusToConversation(_ context.Context, conversationID, statusID, senderUsername string) error
AddStatusToConversation adds a status/message to a conversation
func (*ConversationRepository) Clear ¶
func (r *ConversationRepository) Clear()
Clear clears all data (test helper)
func (*ConversationRepository) CreateConversation ¶
func (r *ConversationRepository) CreateConversation(_ context.Context, conversation *models.Conversation, participants []string) error
CreateConversation creates a new conversation with participants
func (*ConversationRepository) CreateConversationMute ¶
func (r *ConversationRepository) CreateConversationMute(_ context.Context, mute *storage.ConversationMute) error
CreateConversationMute creates a new conversation mute
func (*ConversationRepository) DeleteConversation ¶
func (r *ConversationRepository) DeleteConversation(_ context.Context, id string) error
DeleteConversation deletes a conversation by ID
func (*ConversationRepository) DeleteConversationMute ¶
func (r *ConversationRepository) DeleteConversationMute(_ context.Context, username, conversationID string) error
DeleteConversationMute removes a conversation mute
func (*ConversationRepository) GetConversation ¶
func (r *ConversationRepository) GetConversation(_ context.Context, id string) (*models.Conversation, error)
GetConversation retrieves a conversation by ID
func (*ConversationRepository) GetConversationByParticipants ¶
func (r *ConversationRepository) GetConversationByParticipants(_ context.Context, participants []string) (*models.Conversation, error)
GetConversationByParticipants finds a conversation with exact participants
func (*ConversationRepository) GetConversationParticipants ¶
func (r *ConversationRepository) GetConversationParticipants(_ context.Context, conversationID string) ([]string, error)
GetConversationParticipants retrieves the list of participants in a conversation
func (*ConversationRepository) GetConversationStatuses ¶
func (r *ConversationRepository) GetConversationStatuses(_ context.Context, conversationID string, limit int, _ string) ([]*storage.ConversationStatus, string, error)
GetConversationStatuses retrieves messages in a conversation with pagination
func (*ConversationRepository) GetMutedConversations ¶
func (r *ConversationRepository) GetMutedConversations(_ context.Context, username string) ([]string, error)
GetMutedConversations retrieves all muted conversations for a user
func (*ConversationRepository) GetUnreadConversationCount ¶
func (r *ConversationRepository) GetUnreadConversationCount(_ context.Context, username string) (int, error)
GetUnreadConversationCount gets the count of unread conversations for a user
func (*ConversationRepository) GetUnreadConversations ¶
func (r *ConversationRepository) GetUnreadConversations(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Conversation], error)
GetUnreadConversations retrieves unread conversations for a user
func (*ConversationRepository) GetUnreadStatusCount ¶
func (r *ConversationRepository) GetUnreadStatusCount(_ context.Context, conversationID, username string) (int, error)
GetUnreadStatusCount gets the count of unread statuses in a conversation for a user
func (*ConversationRepository) GetUserConversations ¶
func (r *ConversationRepository) GetUserConversations(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Conversation], error)
GetUserConversations retrieves conversations for a user with pagination
func (*ConversationRepository) IsConversationMuted ¶
func (r *ConversationRepository) IsConversationMuted(_ context.Context, username, conversationID string) (bool, error)
IsConversationMuted checks if a conversation is muted by a user
func (*ConversationRepository) LeaveConversation ¶
func (r *ConversationRepository) LeaveConversation(ctx context.Context, conversationID, username string) error
LeaveConversation removes a participant from a conversation
func (*ConversationRepository) MarkConversationRead ¶
func (r *ConversationRepository) MarkConversationRead(_ context.Context, conversationID, username string) error
MarkConversationRead marks a conversation as read for a user
func (*ConversationRepository) MarkConversationUnread ¶
func (r *ConversationRepository) MarkConversationUnread(_ context.Context, conversationID, userID string) error
MarkConversationUnread marks a conversation as unread for a user
func (*ConversationRepository) MarkStatusRead ¶
func (r *ConversationRepository) MarkStatusRead(_ context.Context, conversationID, statusID, username string) error
MarkStatusRead marks a specific status as read by a user
func (*ConversationRepository) RemoveParticipant ¶
func (r *ConversationRepository) RemoveParticipant(_ context.Context, conversationID, participantID string) error
RemoveParticipant removes a participant from a conversation
func (*ConversationRepository) RemoveStatusFromConversation ¶
func (r *ConversationRepository) RemoveStatusFromConversation(_ context.Context, conversationID, statusID string) error
RemoveStatusFromConversation removes a status from a conversation
func (*ConversationRepository) SearchConversations ¶
func (r *ConversationRepository) SearchConversations(_ context.Context, userID, query string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Conversation], error)
SearchConversations searches conversations for a user by query
func (*ConversationRepository) UpdateConversation ¶
func (r *ConversationRepository) UpdateConversation(_ context.Context, conversation *models.Conversation) error
UpdateConversation updates a conversation
func (*ConversationRepository) UpdateConversationLastStatus ¶
func (r *ConversationRepository) UpdateConversationLastStatus(_ context.Context, id, lastStatusID string) error
UpdateConversationLastStatus updates the last status in a conversation
type DLQRepository ¶
type DLQRepository struct {
// contains filtered or unexported fields
}
DLQRepository is a thread-safe in-memory implementation of interfaces.DLQRepository.
func NewDLQRepository ¶
func NewDLQRepository() *DLQRepository
NewDLQRepository creates a new in-memory DLQ repository.
func (*DLQRepository) AnalyzeFailurePatterns ¶
func (r *DLQRepository) AnalyzeFailurePatterns(_ context.Context, service string, days int) (map[string]*interfaces.DLQSimilarityGroup, error)
AnalyzeFailurePatterns analyzes DLQ messages to identify common failure patterns.
func (*DLQRepository) BatchUpdateDLQMessages ¶
func (r *DLQRepository) BatchUpdateDLQMessages(ctx context.Context, messages []*models.DLQMessage) error
BatchUpdateDLQMessages updates multiple DLQ messages.
func (*DLQRepository) CleanupExpiredMessages ¶
CleanupExpiredMessages deletes expired DLQ messages.
func (*DLQRepository) Count ¶
func (r *DLQRepository) Count() int
Count returns the number of messages.
func (*DLQRepository) CreateDLQMessage ¶
func (r *DLQRepository) CreateDLQMessage(_ context.Context, message *models.DLQMessage) error
CreateDLQMessage creates a new DLQ message.
func (*DLQRepository) DeleteDLQMessage ¶
func (r *DLQRepository) DeleteDLQMessage(_ context.Context, message *models.DLQMessage) error
DeleteDLQMessage deletes a DLQ message.
func (*DLQRepository) GetDLQAnalytics ¶
func (r *DLQRepository) GetDLQAnalytics(_ context.Context, service string, timeRange interfaces.DLQTimeRange) (*interfaces.DLQAnalytics, error)
GetDLQAnalytics returns analytics data for DLQ messages.
func (*DLQRepository) GetDLQMessage ¶
func (r *DLQRepository) GetDLQMessage(_ context.Context, id string) (*models.DLQMessage, error)
GetDLQMessage retrieves a DLQ message by ID.
func (*DLQRepository) GetDLQMessagesByErrorType ¶
func (r *DLQRepository) GetDLQMessagesByErrorType(_ context.Context, errorType string, limit int, cursor string) ([]*models.DLQMessage, string, error)
GetDLQMessagesByErrorType retrieves DLQ messages by error type with pagination.
func (*DLQRepository) GetDLQMessagesByService ¶
func (r *DLQRepository) GetDLQMessagesByService(_ context.Context, service string, date time.Time, limit int, cursor string) ([]*models.DLQMessage, string, error)
GetDLQMessagesByService retrieves DLQ messages for a specific service with pagination.
func (*DLQRepository) GetDLQMessagesByServiceDateRange ¶
func (r *DLQRepository) GetDLQMessagesByServiceDateRange(_ context.Context, service string, startDate, endDate time.Time, limit int) ([]*models.DLQMessage, error)
GetDLQMessagesByServiceDateRange retrieves DLQ messages for a service across multiple dates.
func (*DLQRepository) GetDLQMessagesByStatus ¶
func (r *DLQRepository) GetDLQMessagesByStatus(_ context.Context, service, status string, limit int, cursor string) ([]*models.DLQMessage, string, error)
GetDLQMessagesByStatus retrieves messages by status.
func (*DLQRepository) GetDLQMessagesForReprocessing ¶
func (r *DLQRepository) GetDLQMessagesForReprocessing(_ context.Context, service string, status string, limit int, cursor string) ([]*models.DLQMessage, string, error)
GetDLQMessagesForReprocessing retrieves messages that can be reprocessed.
func (*DLQRepository) GetDLQTrends ¶
func (r *DLQRepository) GetDLQTrends(_ context.Context, service string, days int) (*interfaces.DLQTrends, error)
GetDLQTrends returns trend data for DLQ messages over time.
func (*DLQRepository) GetRetryableMessages ¶
func (r *DLQRepository) GetRetryableMessages(_ context.Context, service string, limit int) ([]*models.DLQMessage, error)
GetRetryableMessages returns messages that are ready for retry based on backoff schedule.
func (*DLQRepository) GetSimilarMessages ¶
func (r *DLQRepository) GetSimilarMessages(_ context.Context, similarityHash string, limit int) ([]*models.DLQMessage, error)
GetSimilarMessages finds messages with the same similarity hash.
func (*DLQRepository) MonitorDLQHealth ¶
func (r *DLQRepository) MonitorDLQHealth(_ context.Context, service string) (*interfaces.DLQHealthStatus, error)
MonitorDLQHealth provides health metrics for DLQ monitoring and alerting.
func (*DLQRepository) RetryFailedMessage ¶
func (r *DLQRepository) RetryFailedMessage(_ context.Context, messageID string) error
RetryFailedMessage attempts to reprocess a DLQ message with exponential backoff.
func (*DLQRepository) SearchDLQMessages ¶
func (r *DLQRepository) SearchDLQMessages(_ context.Context, filter *interfaces.DLQSearchFilter) ([]*models.DLQMessage, string, error)
SearchDLQMessages searches DLQ messages with various filters.
func (*DLQRepository) SendToDeadLetterQueue ¶
func (r *DLQRepository) SendToDeadLetterQueue(ctx context.Context, service, messageID, messageBody, errorType, errorMessage string, isPermanent bool) error
SendToDeadLetterQueue creates and stores a DLQ message with proper error categorization.
func (*DLQRepository) UpdateDLQMessage ¶
func (r *DLQRepository) UpdateDLQMessage(_ context.Context, message *models.DLQMessage) error
UpdateDLQMessage updates an existing DLQ message.
type DNSCacheRepository ¶
type DNSCacheRepository struct {
// contains filtered or unexported fields
}
DNSCacheRepository is a thread-safe in-memory implementation of interfaces.DNSCacheRepository.
func NewDNSCacheRepository ¶
func NewDNSCacheRepository() *DNSCacheRepository
NewDNSCacheRepository creates a new in-memory DNS cache repository
func (*DNSCacheRepository) CleanupExpired ¶
func (r *DNSCacheRepository) CleanupExpired()
CleanupExpired removes expired entries (test helper)
func (*DNSCacheRepository) Clear ¶
func (r *DNSCacheRepository) Clear()
Clear clears all data (test helper)
func (*DNSCacheRepository) GetDNSCache ¶
func (r *DNSCacheRepository) GetDNSCache(_ context.Context, hostname string) (*storage.DNSCacheEntry, error)
GetDNSCache retrieves a cached DNS lookup result
func (*DNSCacheRepository) InvalidateDNSCache ¶
func (r *DNSCacheRepository) InvalidateDNSCache(_ context.Context, hostname string) error
InvalidateDNSCache removes a DNS cache entry
func (*DNSCacheRepository) SetDNSCache ¶
func (r *DNSCacheRepository) SetDNSCache(_ context.Context, entry *storage.DNSCacheEntry) error
SetDNSCache stores a DNS lookup result in the cache
type DomainBlockRepository ¶
type DomainBlockRepository struct {
// contains filtered or unexported fields
}
DomainBlockRepository is a thread-safe in-memory implementation of interfaces.DomainBlockRepository.
func NewDomainBlockRepository ¶
func NewDomainBlockRepository() *DomainBlockRepository
NewDomainBlockRepository creates a new in-memory domain block repository
func (*DomainBlockRepository) AddDomainBlock ¶
func (r *DomainBlockRepository) AddDomainBlock(_ context.Context, username, domain string) error
AddDomainBlock adds a domain to the user's block list
func (*DomainBlockRepository) Clear ¶
func (r *DomainBlockRepository) Clear()
Clear clears all data (test helper)
func (*DomainBlockRepository) CreateDomainAllow ¶
func (r *DomainBlockRepository) CreateDomainAllow(_ context.Context, allow *storage.DomainAllow) error
CreateDomainAllow adds a domain to the allowlist
func (*DomainBlockRepository) CreateDomainBlock ¶
func (r *DomainBlockRepository) CreateDomainBlock(ctx context.Context, block *storage.InstanceDomainBlock) error
CreateDomainBlock creates a new instance-level domain block (alias)
func (*DomainBlockRepository) CreateEmailDomainBlock ¶
func (r *DomainBlockRepository) CreateEmailDomainBlock(_ context.Context, block *storage.EmailDomainBlock) error
CreateEmailDomainBlock creates an email domain block
func (*DomainBlockRepository) CreateInstanceDomainBlock ¶
func (r *DomainBlockRepository) CreateInstanceDomainBlock(_ context.Context, block *storage.InstanceDomainBlock) error
CreateInstanceDomainBlock creates an instance-level domain block
func (*DomainBlockRepository) DeleteDomainAllow ¶
func (r *DomainBlockRepository) DeleteDomainAllow(_ context.Context, id string) error
DeleteDomainAllow removes a domain from the allowlist
func (*DomainBlockRepository) DeleteDomainBlock ¶
func (r *DomainBlockRepository) DeleteDomainBlock(_ context.Context, id string) error
DeleteDomainBlock removes a domain block (alias)
func (*DomainBlockRepository) DeleteEmailDomainBlock ¶
func (r *DomainBlockRepository) DeleteEmailDomainBlock(_ context.Context, id string) error
DeleteEmailDomainBlock deletes an email domain block
func (*DomainBlockRepository) DeleteInstanceDomainBlock ¶
func (r *DomainBlockRepository) DeleteInstanceDomainBlock(_ context.Context, domain string) error
DeleteInstanceDomainBlock deletes a domain block
func (*DomainBlockRepository) GetDomainAllows ¶
func (r *DomainBlockRepository) GetDomainAllows(_ context.Context, _ int, _ string) ([]*storage.DomainAllow, string, error)
GetDomainAllows retrieves domain allows (for allowlist mode)
func (*DomainBlockRepository) GetDomainBlock ¶
func (r *DomainBlockRepository) GetDomainBlock(ctx context.Context, id string) (*storage.InstanceDomainBlock, error)
GetDomainBlock retrieves a specific domain block by ID (alias)
func (*DomainBlockRepository) GetDomainBlocks ¶
func (r *DomainBlockRepository) GetDomainBlocks(ctx context.Context, limit int, cursor string) ([]*storage.InstanceDomainBlock, string, error)
GetDomainBlocks retrieves instance-level domain blocks with pagination (alias)
func (*DomainBlockRepository) GetEmailDomainBlocks ¶
func (r *DomainBlockRepository) GetEmailDomainBlocks(_ context.Context, _ int, _ string) ([]*storage.EmailDomainBlock, string, error)
GetEmailDomainBlocks retrieves email domain blocks with pagination
func (*DomainBlockRepository) GetInstanceDomainBlock ¶
func (r *DomainBlockRepository) GetInstanceDomainBlock(_ context.Context, domain string) (*storage.InstanceDomainBlock, error)
GetInstanceDomainBlock retrieves a domain block by domain
func (*DomainBlockRepository) GetInstanceDomainBlockByID ¶
func (r *DomainBlockRepository) GetInstanceDomainBlockByID(_ context.Context, id string) (*storage.InstanceDomainBlock, error)
GetInstanceDomainBlockByID retrieves a domain block by ID
func (*DomainBlockRepository) GetUserDomainBlocks ¶
func (r *DomainBlockRepository) GetUserDomainBlocks(_ context.Context, username string, _ int, _ string) ([]string, string, error)
GetUserDomainBlocks retrieves all domains blocked by a user
func (*DomainBlockRepository) IsBlockedDomain ¶
func (r *DomainBlockRepository) IsBlockedDomain(_ context.Context, username, domain string) (bool, error)
IsBlockedDomain checks if a domain is blocked by a user
func (*DomainBlockRepository) IsDomainBlocked ¶
func (r *DomainBlockRepository) IsDomainBlocked(ctx context.Context, domain string) (bool, *storage.InstanceDomainBlock, error)
IsDomainBlocked checks if a domain is blocked at the instance level (alias)
func (*DomainBlockRepository) IsInstanceDomainBlocked ¶
func (r *DomainBlockRepository) IsInstanceDomainBlocked(_ context.Context, domain string) (bool, *storage.InstanceDomainBlock, error)
IsInstanceDomainBlocked checks if a domain is blocked at the instance level
func (*DomainBlockRepository) ListInstanceDomainBlocks ¶
func (r *DomainBlockRepository) ListInstanceDomainBlocks(_ context.Context, _ int, _ string) ([]*storage.InstanceDomainBlock, string, error)
ListInstanceDomainBlocks lists all instance domain blocks with pagination
func (*DomainBlockRepository) RemoveDomainBlock ¶
func (r *DomainBlockRepository) RemoveDomainBlock(_ context.Context, username, domain string) error
RemoveDomainBlock removes a domain from the user's block list
func (*DomainBlockRepository) UpdateDomainBlock ¶
func (r *DomainBlockRepository) UpdateDomainBlock(_ context.Context, id string, updates map[string]any) error
UpdateDomainBlock updates an existing domain block (alias)
func (*DomainBlockRepository) UpdateInstanceDomainBlock ¶
func (r *DomainBlockRepository) UpdateInstanceDomainBlock(_ context.Context, domain string, updates map[string]any) error
UpdateInstanceDomainBlock updates an existing domain block
type DraftRepository ¶
type DraftRepository struct {
// contains filtered or unexported fields
}
DraftRepository is a thread-safe in-memory implementation of interfaces.DraftRepository.
func NewDraftRepository ¶
func NewDraftRepository() *DraftRepository
NewDraftRepository creates a new in-memory draft repository
func (*DraftRepository) Clear ¶
func (r *DraftRepository) Clear()
Clear clears all data (test helper)
func (*DraftRepository) CreateDraft ¶
CreateDraft creates a new draft
func (*DraftRepository) DeleteDraft ¶
func (r *DraftRepository) DeleteDraft(_ context.Context, authorID, draftID string) error
DeleteDraft deletes a draft
func (*DraftRepository) GetDraft ¶
func (r *DraftRepository) GetDraft(_ context.Context, authorID, draftID string) (*models.Draft, error)
GetDraft retrieves a draft by author ID and draft ID
func (*DraftRepository) ListDraftsByAuthor ¶
func (r *DraftRepository) ListDraftsByAuthor(ctx context.Context, authorID string, limit int) ([]*models.Draft, error)
ListDraftsByAuthor lists drafts for an author
func (*DraftRepository) ListDraftsByAuthorPaginated ¶
func (r *DraftRepository) ListDraftsByAuthorPaginated(_ context.Context, authorID string, limit int, cursor string) ([]*models.Draft, string, error)
ListDraftsByAuthorPaginated lists drafts for an author with cursor pagination
func (*DraftRepository) ListScheduledDraftsDuePaginated ¶
func (r *DraftRepository) ListScheduledDraftsDuePaginated(_ context.Context, dueBefore time.Time, limit int, cursor string) ([]*models.Draft, string, error)
ListScheduledDraftsDuePaginated lists drafts scheduled to publish at or before the provided time
func (*DraftRepository) UpdateDraft ¶
UpdateDraft updates an existing draft
type EmojiRepository ¶
type EmojiRepository struct {
// contains filtered or unexported fields
}
EmojiRepository is a thread-safe in-memory implementation of interfaces.EmojiRepository.
func NewEmojiRepository ¶
func NewEmojiRepository() *EmojiRepository
NewEmojiRepository creates a new in-memory emoji repository
func (*EmojiRepository) Clear ¶
func (r *EmojiRepository) Clear()
Clear clears all data (test helper)
func (*EmojiRepository) CreateCustomEmoji ¶
func (r *EmojiRepository) CreateCustomEmoji(_ context.Context, emoji *storage.CustomEmoji) error
CreateCustomEmoji creates a new custom emoji
func (*EmojiRepository) DeleteCustomEmoji ¶
func (r *EmojiRepository) DeleteCustomEmoji(_ context.Context, shortcode string) error
DeleteCustomEmoji deletes a custom emoji
func (*EmojiRepository) GetCustomEmoji ¶
func (r *EmojiRepository) GetCustomEmoji(_ context.Context, shortcode string) (*storage.CustomEmoji, error)
GetCustomEmoji retrieves a custom emoji by shortcode
func (*EmojiRepository) GetCustomEmojis ¶
func (r *EmojiRepository) GetCustomEmojis(_ context.Context) ([]*storage.CustomEmoji, error)
GetCustomEmojis retrieves all custom emojis (not disabled)
func (*EmojiRepository) GetCustomEmojisByCategory ¶
func (r *EmojiRepository) GetCustomEmojisByCategory(_ context.Context, category string) ([]*storage.CustomEmoji, error)
GetCustomEmojisByCategory retrieves custom emojis by category
func (*EmojiRepository) GetPopularEmojis ¶
func (r *EmojiRepository) GetPopularEmojis(_ context.Context, domain string, limit int) ([]*storage.CustomEmoji, error)
GetPopularEmojis retrieves emojis by popularity score
func (*EmojiRepository) GetRemoteEmoji ¶
func (r *EmojiRepository) GetRemoteEmoji(_ context.Context, shortcode, domain string) (*storage.CustomEmoji, error)
GetRemoteEmoji retrieves a remote emoji by shortcode and domain
func (*EmojiRepository) IncrementEmojiUsage ¶
func (r *EmojiRepository) IncrementEmojiUsage(_ context.Context, shortcode string) error
IncrementEmojiUsage increments the usage count for an emoji
func (*EmojiRepository) SearchEmojis ¶
func (r *EmojiRepository) SearchEmojis(_ context.Context, query string, limit int) ([]*storage.CustomEmoji, error)
SearchEmojis performs sophisticated emoji searches with relevance scoring
func (*EmojiRepository) UpdateCustomEmoji ¶
func (r *EmojiRepository) UpdateCustomEmoji(_ context.Context, emoji *storage.CustomEmoji) error
UpdateCustomEmoji updates an existing custom emoji
type ExportRepository ¶
type ExportRepository struct {
// contains filtered or unexported fields
}
ExportRepository is a thread-safe in-memory implementation of interfaces.ExportRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewExportRepository ¶
func NewExportRepository() *ExportRepository
NewExportRepository creates a new in-memory export repository
func (*ExportRepository) Clear ¶
func (r *ExportRepository) Clear()
Clear clears all data (test helper)
func (*ExportRepository) CreateExport ¶
CreateExport creates a new export record
func (*ExportRepository) CreateExportCostTracking ¶
func (r *ExportRepository) CreateExportCostTracking(_ context.Context, costTracking *models.ExportCostTracking) error
CreateExportCostTracking creates a new export cost tracking record
func (*ExportRepository) GetExportCostSummary ¶
func (r *ExportRepository) GetExportCostSummary(ctx context.Context, username string, startDate, endDate time.Time) (*models.ExportCostSummary, error)
GetExportCostSummary calculates cost summary for a user's exports
func (*ExportRepository) GetExportCostTracking ¶
func (r *ExportRepository) GetExportCostTracking(_ context.Context, exportID string) ([]*models.ExportCostTracking, error)
GetExportCostTracking retrieves export cost tracking records for an export
func (*ExportRepository) GetExportCostsByDateRange ¶
func (r *ExportRepository) GetExportCostsByDateRange(_ context.Context, startDate, endDate time.Time, limit int) ([]*models.ExportCostTracking, error)
GetExportCostsByDateRange retrieves export costs for all users within a date range
func (*ExportRepository) GetExportsForUser ¶
func (r *ExportRepository) GetExportsForUser(_ context.Context, username string, limit int, cursor string) ([]*models.Export, string, error)
GetExportsForUser retrieves all exports for a user
func (*ExportRepository) GetHighCostExports ¶
func (r *ExportRepository) GetHighCostExports(_ context.Context, thresholdMicroCents int64, startDate, endDate time.Time, limit int) ([]*models.ExportCostTracking, error)
GetHighCostExports returns export operations that exceed a cost threshold
func (*ExportRepository) GetUserExportCosts ¶
func (r *ExportRepository) GetUserExportCosts(_ context.Context, username string, startDate, endDate time.Time, limit int) ([]*models.ExportCostTracking, error)
GetUserExportCosts retrieves export costs for a user within a date range
func (*ExportRepository) GetUserExportsByStatus ¶
func (r *ExportRepository) GetUserExportsByStatus(_ context.Context, username string, statuses []string) ([]*models.Export, error)
GetUserExportsByStatus retrieves exports for a user filtered by status
func (*ExportRepository) UpdateExportStatus ¶
func (r *ExportRepository) UpdateExportStatus(_ context.Context, exportID, status string, completionData map[string]any, errorMsg string) error
UpdateExportStatus updates the status and metadata of an export
type FeaturedTagRepository ¶
type FeaturedTagRepository struct {
// contains filtered or unexported fields
}
FeaturedTagRepository is a thread-safe in-memory implementation of interfaces.FeaturedTagRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewFeaturedTagRepository ¶
func NewFeaturedTagRepository() *FeaturedTagRepository
NewFeaturedTagRepository creates a new in-memory featured tag repository
func (*FeaturedTagRepository) Clear ¶
func (r *FeaturedTagRepository) Clear()
Clear clears all data (test helper)
func (*FeaturedTagRepository) CreateFeaturedTag ¶
func (r *FeaturedTagRepository) CreateFeaturedTag(_ context.Context, tag *storage.FeaturedTag) error
CreateFeaturedTag creates a new featured tag for a user
func (*FeaturedTagRepository) DeleteFeaturedTag ¶
func (r *FeaturedTagRepository) DeleteFeaturedTag(_ context.Context, username, name string) error
DeleteFeaturedTag removes a featured tag
func (*FeaturedTagRepository) GetFeaturedTags ¶
func (r *FeaturedTagRepository) GetFeaturedTags(_ context.Context, username string) ([]*storage.FeaturedTag, error)
GetFeaturedTags returns all featured tags for a user
func (*FeaturedTagRepository) GetTagSuggestions ¶
func (r *FeaturedTagRepository) GetTagSuggestions(_ context.Context, username string, limit int) ([]string, error)
GetTagSuggestions returns suggested tags based on user's usage
func (*FeaturedTagRepository) RecordTagUsage ¶
func (r *FeaturedTagRepository) RecordTagUsage(username, tagName string)
RecordTagUsage records tag usage for suggestion generation (test helper)
type FederationRepository ¶
type FederationRepository struct {
// contains filtered or unexported fields
}
FederationRepository is a thread-safe in-memory implementation of interfaces.FederationRepository.
func NewFederationRepository ¶
func NewFederationRepository() *FederationRepository
NewFederationRepository creates a new in-memory federation repository
func (*FederationRepository) CalculateFederationClusters ¶
func (r *FederationRepository) CalculateFederationClusters(_ context.Context) ([]*storage.InstanceCluster, error)
CalculateFederationClusters calculates instance clusters based on connections
func (*FederationRepository) Clear ¶
func (r *FederationRepository) Clear()
Clear clears all data (test helper)
func (*FederationRepository) GetCostProjections ¶
func (r *FederationRepository) GetCostProjections(_ context.Context, _ string) (*storage.CostProjection, error)
GetCostProjections generates cost projections based on historical data
func (*FederationRepository) GetFederationCosts ¶
func (r *FederationRepository) GetFederationCosts(_ context.Context, _, _ time.Time, _ int, _ string) ([]*storage.FederationCost, string, error)
GetFederationCosts retrieves aggregated federation costs
func (*FederationRepository) GetFederationEdges ¶
func (r *FederationRepository) GetFederationEdges(_ context.Context, _ []string) ([]*storage.FederationEdge, error)
GetFederationEdges retrieves edges between specified domains
func (*FederationRepository) GetFederationNodes ¶
func (r *FederationRepository) GetFederationNodes(_ context.Context, _ int) ([]*storage.FederationNode, error)
GetFederationNodes retrieves federation nodes up to a certain depth
func (*FederationRepository) GetFederationNodesByHealth ¶
func (r *FederationRepository) GetFederationNodesByHealth(_ context.Context, _ string, _ int) ([]*storage.FederationNode, error)
GetFederationNodesByHealth retrieves federation nodes filtered by health status
func (*FederationRepository) GetFederationStatistics ¶
func (r *FederationRepository) GetFederationStatistics(_ context.Context, _, _ time.Time) (*storage.FederationStats, error)
GetFederationStatistics retrieves federation statistics for a time range
func (*FederationRepository) GetInstanceHealthReport ¶
func (r *FederationRepository) GetInstanceHealthReport(_ context.Context, domain string, _ time.Duration) (*storage.InstanceHealthReport, error)
GetInstanceHealthReport generates a health report for a specific instance
func (*FederationRepository) GetInstanceInfo ¶
func (r *FederationRepository) GetInstanceInfo(_ context.Context, domain string) (*storage.InstanceInfo, error)
GetInstanceInfo retrieves information about a federated instance
func (*FederationRepository) GetInstanceMetadata ¶
func (r *FederationRepository) GetInstanceMetadata(_ context.Context, domain string) (*storage.InstanceMetadata, error)
GetInstanceMetadata retrieves metadata for a specific instance
func (*FederationRepository) GetInstanceStats ¶
func (r *FederationRepository) GetInstanceStats(_ context.Context, domain string) (*storage.InstanceStats, error)
GetInstanceStats retrieves comprehensive statistics for a specific instance
func (*FederationRepository) GetKnownInstances ¶
func (r *FederationRepository) GetKnownInstances(_ context.Context, limit int, cursor string) ([]*storage.InstanceInfo, string, error)
GetKnownInstances retrieves a list of known federated instances
func (*FederationRepository) RecordFederationActivity ¶
func (r *FederationRepository) RecordFederationActivity(_ context.Context, activity *storage.FederationActivity) error
RecordFederationActivity records a single federation activity for cost tracking
func (*FederationRepository) UpsertInstanceInfo ¶
func (r *FederationRepository) UpsertInstanceInfo(_ context.Context, info *storage.InstanceInfo) error
UpsertInstanceInfo creates or updates instance information
type FilterRepository ¶
type FilterRepository struct {
// contains filtered or unexported fields
}
FilterRepository is a thread-safe in-memory implementation of interfaces.FilterRepository.
func NewFilterRepository ¶
func NewFilterRepository() *FilterRepository
NewFilterRepository creates a new in-memory filter repository
func (*FilterRepository) AddFilterKeyword ¶
func (r *FilterRepository) AddFilterKeyword(_ context.Context, keyword *models.FilterKeyword) error
AddFilterKeyword adds a new keyword to a filter
func (*FilterRepository) AddFilterStatus ¶
func (r *FilterRepository) AddFilterStatus(_ context.Context, filterStatus *models.FilterStatus) error
AddFilterStatus adds a new status to a filter
func (*FilterRepository) CheckContentFiltered ¶
func (r *FilterRepository) CheckContentFiltered(ctx context.Context, username, statusID string, contexts []string) (bool, []*models.Filter, error)
CheckContentFiltered checks if a specific status is filtered for a user
func (*FilterRepository) Clear ¶
func (r *FilterRepository) Clear()
Clear clears all data (test helper)
func (*FilterRepository) CreateFilter ¶
CreateFilter creates a new filter
func (*FilterRepository) DeleteFilter ¶
func (r *FilterRepository) DeleteFilter(_ context.Context, filterID string) error
DeleteFilter deletes a filter and all its associated keywords and statuses
func (*FilterRepository) EvaluateFilters ¶
func (r *FilterRepository) EvaluateFilters(ctx context.Context, username string, content string, contexts []string) ([]*models.Filter, error)
EvaluateFilters evaluates content against user filters
func (*FilterRepository) GetActiveFilters ¶
func (r *FilterRepository) GetActiveFilters(_ context.Context, username string, contexts []string) ([]*models.Filter, error)
GetActiveFilters retrieves active filters for a user in specific contexts
func (*FilterRepository) GetFilterKeywords ¶
func (r *FilterRepository) GetFilterKeywords(_ context.Context, filterID string) ([]*models.FilterKeyword, error)
GetFilterKeywords retrieves all keywords for a filter
func (*FilterRepository) GetFilterStatuses ¶
func (r *FilterRepository) GetFilterStatuses(_ context.Context, filterID string) ([]*models.FilterStatus, error)
GetFilterStatuses retrieves all statuses for a filter
func (*FilterRepository) GetUserFilters ¶
func (r *FilterRepository) GetUserFilters(_ context.Context, username string) ([]*models.Filter, error)
GetUserFilters retrieves all filters for a user
func (*FilterRepository) RemoveFilterKeyword ¶
func (r *FilterRepository) RemoveFilterKeyword(_ context.Context, keywordID string) error
RemoveFilterKeyword removes a filter keyword
func (*FilterRepository) RemoveFilterStatus ¶
func (r *FilterRepository) RemoveFilterStatus(_ context.Context, filterStatusID string) error
RemoveFilterStatus removes a filter status by its ID
func (*FilterRepository) UpdateFilter ¶
UpdateFilter updates a filter
type HashtagRepository ¶
type HashtagRepository struct {
// contains filtered or unexported fields
}
HashtagRepository is a thread-safe in-memory implementation of interfaces.HashtagRepository.
func NewHashtagRepository ¶
func NewHashtagRepository() *HashtagRepository
NewHashtagRepository creates a new in-memory hashtag repository
func (*HashtagRepository) Clear ¶
func (r *HashtagRepository) Clear()
Clear clears all data (test helper)
func (*HashtagRepository) FollowHashtag ¶
func (r *HashtagRepository) FollowHashtag(_ context.Context, userID, hashtag string) error
FollowHashtag creates a hashtag follow relationship
func (*HashtagRepository) GetHashtagActivity ¶
func (r *HashtagRepository) GetHashtagActivity(_ context.Context, hashtag string, since time.Time) ([]*storage.Activity, error)
GetHashtagActivity retrieves activities for a hashtag since a specific time
func (*HashtagRepository) GetHashtagFollow ¶
func (r *HashtagRepository) GetHashtagFollow(_ context.Context, userID string, hashtag string) (*models.HashtagFollow, error)
GetHashtagFollow retrieves the hashtag follow record for a user
func (*HashtagRepository) GetHashtagInfo ¶
func (r *HashtagRepository) GetHashtagInfo(_ context.Context, hashtag string) (*storage.Hashtag, error)
GetHashtagInfo retrieves information about a specific hashtag
func (*HashtagRepository) GetHashtagMute ¶
func (r *HashtagRepository) GetHashtagMute(_ context.Context, userID string, hashtag string) (*models.HashtagMute, error)
GetHashtagMute retrieves the hashtag mute record for a user
func (*HashtagRepository) GetHashtagStats ¶
GetHashtagStats retrieves hashtag statistics
func (*HashtagRepository) GetHashtagTimelineAdvanced ¶
func (r *HashtagRepository) GetHashtagTimelineAdvanced(_ context.Context, _ string, _ *string, _ int, _ string) ([]*storage.StatusSearchResult, error)
GetHashtagTimelineAdvanced retrieves hashtag timeline with advanced filtering
func (*HashtagRepository) GetHashtagUsageHistory ¶
func (r *HashtagRepository) GetHashtagUsageHistory(_ context.Context, _ string, days int) ([]int64, error)
GetHashtagUsageHistory retrieves recent usage history for a hashtag
func (*HashtagRepository) GetMultiHashtagTimeline ¶
func (r *HashtagRepository) GetMultiHashtagTimeline(_ context.Context, _ []string, _ *string, _ int, _ string) ([]*storage.StatusSearchResult, error)
GetMultiHashtagTimeline retrieves timeline for multiple hashtags
func (*HashtagRepository) GetSuggestedHashtags ¶
func (r *HashtagRepository) GetSuggestedHashtags(_ context.Context, _ string, _ int) ([]*storage.HashtagSearchResult, error)
GetSuggestedHashtags gets suggested hashtags for a user
func (*HashtagRepository) IndexHashtag ¶
func (r *HashtagRepository) IndexHashtag(_ context.Context, hashtag string, statusID string, _ string, _ string) error
IndexHashtag indexes a hashtag when used in a status
func (*HashtagRepository) IndexStatusHashtags ¶
func (r *HashtagRepository) IndexStatusHashtags(_ context.Context, statusID string, _ string, _ string, _ string, _ string, hashtags []string, _ time.Time, _ string) error
IndexStatusHashtags indexes a status with its hashtags for efficient search
func (*HashtagRepository) IsFollowingHashtag ¶
func (r *HashtagRepository) IsFollowingHashtag(_ context.Context, userID, hashtag string) (bool, error)
IsFollowingHashtag checks if a user is following a hashtag
func (*HashtagRepository) RemoveStatusFromHashtagIndex ¶
func (r *HashtagRepository) RemoveStatusFromHashtagIndex(_ context.Context, statusID string) error
RemoveStatusFromHashtagIndex removes a status from all hashtag indexes
func (*HashtagRepository) UnfollowHashtag ¶
func (r *HashtagRepository) UnfollowHashtag(_ context.Context, userID, hashtag string) error
UnfollowHashtag removes a hashtag follow relationship
type ImportRepository ¶
type ImportRepository struct {
// contains filtered or unexported fields
}
ImportRepository is a thread-safe in-memory implementation of interfaces.ImportRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewImportRepository ¶
func NewImportRepository() *ImportRepository
NewImportRepository creates a new in-memory import repository
func (*ImportRepository) CheckBudgetLimits ¶
func (r *ImportRepository) CheckBudgetLimits(ctx context.Context, username string, importCostMicroCents, exportCostMicroCents int64) (*models.ImportBudget, bool, error)
CheckBudgetLimits checks if a user is within their budget limits
func (*ImportRepository) Clear ¶
func (r *ImportRepository) Clear()
Clear clears all data (test helper)
func (*ImportRepository) CreateImport ¶
CreateImport creates a new import record
func (*ImportRepository) CreateImportBudget ¶
func (r *ImportRepository) CreateImportBudget(_ context.Context, budget *models.ImportBudget) error
CreateImportBudget creates a new import budget configuration
func (*ImportRepository) CreateImportCostTracking ¶
func (r *ImportRepository) CreateImportCostTracking(_ context.Context, costTracking *models.ImportCostTracking) error
CreateImportCostTracking creates a new import cost tracking record
func (*ImportRepository) GetHighCostImports ¶
func (r *ImportRepository) GetHighCostImports(_ context.Context, thresholdMicroCents int64, startDate, endDate time.Time, limit int) ([]*models.ImportCostTracking, error)
GetHighCostImports returns import operations that exceed a cost threshold
func (*ImportRepository) GetImportBudget ¶
func (r *ImportRepository) GetImportBudget(_ context.Context, username, period string) (*models.ImportBudget, error)
GetImportBudget retrieves import budget configuration for a user
func (*ImportRepository) GetImportCostSummary ¶
func (r *ImportRepository) GetImportCostSummary(ctx context.Context, username string, startDate, endDate time.Time) (*models.ImportCostSummary, error)
GetImportCostSummary calculates cost summary for a user's imports
func (*ImportRepository) GetImportCostTracking ¶
func (r *ImportRepository) GetImportCostTracking(_ context.Context, importID string) ([]*models.ImportCostTracking, error)
GetImportCostTracking retrieves import cost tracking records for an import
func (*ImportRepository) GetImportCostsByDateRange ¶
func (r *ImportRepository) GetImportCostsByDateRange(_ context.Context, startDate, endDate time.Time, limit int) ([]*models.ImportCostTracking, error)
GetImportCostsByDateRange retrieves import costs for all users within a date range
func (*ImportRepository) GetImportsForUser ¶
func (r *ImportRepository) GetImportsForUser(_ context.Context, username string, limit int, cursor string) ([]*models.Import, string, error)
GetImportsForUser retrieves all imports for a user
func (*ImportRepository) GetUserImportCosts ¶
func (r *ImportRepository) GetUserImportCosts(_ context.Context, username string, startDate, endDate time.Time, limit int) ([]*models.ImportCostTracking, error)
GetUserImportCosts retrieves import costs for a user within a date range
func (*ImportRepository) GetUserImportsByStatus ¶
func (r *ImportRepository) GetUserImportsByStatus(_ context.Context, username string, statuses []string) ([]*models.Import, error)
GetUserImportsByStatus retrieves imports for a user filtered by status
func (*ImportRepository) UpdateBudgetUsage ¶
func (r *ImportRepository) UpdateBudgetUsage(ctx context.Context, username, period string, importCostMicroCents, exportCostMicroCents int64) error
UpdateBudgetUsage updates the current usage for a user's budget
func (*ImportRepository) UpdateImportBudget ¶
func (r *ImportRepository) UpdateImportBudget(_ context.Context, budget *models.ImportBudget) error
UpdateImportBudget updates an existing import budget
func (*ImportRepository) UpdateImportProgress ¶
func (r *ImportRepository) UpdateImportProgress(_ context.Context, importID string, progress int) error
UpdateImportProgress updates the progress of an import
func (*ImportRepository) UpdateImportStatus ¶
func (r *ImportRepository) UpdateImportStatus(_ context.Context, importID, status string, completionData map[string]any, errorMsg string) error
UpdateImportStatus updates the status and metadata of an import
type InstanceRepository ¶
type InstanceRepository struct {
// contains filtered or unexported fields
}
InstanceRepository is a thread-safe in-memory implementation of interfaces.InstanceRepository.
func NewInstanceRepository ¶
func NewInstanceRepository() *InstanceRepository
NewInstanceRepository creates a new in-memory instance repository
func (*InstanceRepository) Clear ¶
func (r *InstanceRepository) Clear()
Clear clears all data (test helper)
func (*InstanceRepository) EnsureAgentInstanceConfig ¶
func (r *InstanceRepository) EnsureAgentInstanceConfig(_ context.Context) (*models.AgentInstanceConfig, error)
EnsureAgentInstanceConfig ensures the instance agent policy record exists and returns it.
func (*InstanceRepository) EnsureInstanceState ¶
func (r *InstanceRepository) EnsureInstanceState(_ context.Context) (*models.InstanceState, error)
EnsureInstanceState ensures the instance state record exists and returns it
func (*InstanceRepository) GetActiveUserCount ¶
GetActiveUserCount returns the number of active users in the last N days
func (*InstanceRepository) GetAgentInstanceConfig ¶
func (r *InstanceRepository) GetAgentInstanceConfig(_ context.Context) (*models.AgentInstanceConfig, error)
GetAgentInstanceConfig returns the current instance agent policy.
func (*InstanceRepository) GetContactAccount ¶
func (r *InstanceRepository) GetContactAccount(_ context.Context) (*storage.ActorRecord, error)
GetContactAccount returns the contact account for the instance
func (*InstanceRepository) GetDailyActiveUserCount ¶
func (r *InstanceRepository) GetDailyActiveUserCount(_ context.Context) (int64, error)
GetDailyActiveUserCount returns the number of daily active users
func (*InstanceRepository) GetDomainStats ¶
GetDomainStats returns statistics for a specific domain
func (*InstanceRepository) GetExtendedDescription ¶
GetExtendedDescription retrieves the instance extended description
func (*InstanceRepository) GetInstanceRules ¶
func (r *InstanceRepository) GetInstanceRules(_ context.Context) ([]storage.InstanceRule, error)
GetInstanceRules retrieves the instance rules
func (*InstanceRepository) GetInstanceState ¶
func (r *InstanceRepository) GetInstanceState(_ context.Context) (*models.InstanceState, error)
GetInstanceState returns the current instance activation state
func (*InstanceRepository) GetLocalCommentCount ¶
func (r *InstanceRepository) GetLocalCommentCount(_ context.Context) (int64, error)
GetLocalCommentCount returns the number of local comments
func (*InstanceRepository) GetLocalPostCount ¶
func (r *InstanceRepository) GetLocalPostCount(_ context.Context) (int64, error)
GetLocalPostCount returns the number of local posts
func (*InstanceRepository) GetMetricsSummary ¶
func (r *InstanceRepository) GetMetricsSummary(_ context.Context, _ string) (map[string]interface{}, error)
GetMetricsSummary returns aggregated metrics for a given time range
func (*InstanceRepository) GetRulesByCategory ¶
func (r *InstanceRepository) GetRulesByCategory(_ context.Context, _ string) ([]storage.InstanceRule, error)
GetRulesByCategory retrieves rules filtered by category Note: InstanceRule doesn't have a Category field, so this returns all rules
func (*InstanceRepository) GetStorageHistory ¶
GetStorageHistory returns storage usage history for the last N days
func (*InstanceRepository) GetStorageUsage ¶
func (r *InstanceRepository) GetStorageUsage(_ context.Context) (any, error)
GetStorageUsage returns current storage usage statistics
func (*InstanceRepository) GetTotalDomainCount ¶
func (r *InstanceRepository) GetTotalDomainCount(_ context.Context) (int64, error)
GetTotalDomainCount returns the total number of known domains
func (*InstanceRepository) GetTotalStatusCount ¶
func (r *InstanceRepository) GetTotalStatusCount(_ context.Context) (int64, error)
GetTotalStatusCount returns the total number of statuses
func (*InstanceRepository) GetTotalUserCount ¶
func (r *InstanceRepository) GetTotalUserCount(_ context.Context) (int64, error)
GetTotalUserCount returns the total number of users
func (*InstanceRepository) GetUserGrowthHistory ¶
GetUserGrowthHistory returns user growth data for the last N days
func (*InstanceRepository) GetWeeklyActivity ¶
func (r *InstanceRepository) GetWeeklyActivity(_ context.Context, weekTimestamp int64) (*storage.WeeklyActivity, error)
GetWeeklyActivity retrieves weekly activity data for a specific week
func (*InstanceRepository) RecordActivity ¶
func (r *InstanceRepository) RecordActivity(_ context.Context, _ string, _ string, _ time.Time) error
RecordActivity records activity data for analytics
func (*InstanceRepository) RecordDailyMetrics ¶
func (r *InstanceRepository) RecordDailyMetrics(_ context.Context, date string, metrics map[string]interface{}) error
RecordDailyMetrics records daily historical metrics for the instance
func (*InstanceRepository) SetAgentInstanceConfig ¶
func (r *InstanceRepository) SetAgentInstanceConfig(_ context.Context, cfg *models.AgentInstanceConfig) error
SetAgentInstanceConfig updates the instance agent policy.
func (*InstanceRepository) SetBootstrapWalletAddress ¶
func (r *InstanceRepository) SetBootstrapWalletAddress(_ context.Context, address string) error
SetBootstrapWalletAddress sets the bootstrap wallet address used for setup authentication
func (*InstanceRepository) SetExtendedDescription ¶
func (r *InstanceRepository) SetExtendedDescription(_ context.Context, description string) error
SetExtendedDescription updates the instance extended description
func (*InstanceRepository) SetInstanceLocked ¶
func (r *InstanceRepository) SetInstanceLocked(_ context.Context, locked bool) error
SetInstanceLocked updates the instance lock state
func (*InstanceRepository) SetInstanceRules ¶
func (r *InstanceRepository) SetInstanceRules(_ context.Context, rules []storage.InstanceRule) error
SetInstanceRules updates the instance rules
func (*InstanceRepository) SetPrimaryAdminUsername ¶
func (r *InstanceRepository) SetPrimaryAdminUsername(_ context.Context, username string) error
SetPrimaryAdminUsername records the primary admin username created during setup
type LikeRepository ¶
type LikeRepository struct {
// contains filtered or unexported fields
}
LikeRepository is a thread-safe in-memory implementation of interfaces.LikeRepository.
func NewLikeRepository ¶
func NewLikeRepository() *LikeRepository
NewLikeRepository creates a new in-memory like repository
func (*LikeRepository) CascadeDeleteLikes ¶
func (r *LikeRepository) CascadeDeleteLikes(_ context.Context, objectID string) error
CascadeDeleteLikes deletes all likes for an object
func (*LikeRepository) CountActorLikes ¶
CountActorLikes returns the total number of likes by an actor
func (*LikeRepository) CountForObject ¶
CountForObject provides Storage interface compatibility for CountObjectLikes
func (*LikeRepository) CreateLike ¶
func (r *LikeRepository) CreateLike(_ context.Context, actor, object, statusAuthorID string) (*models.Like, error)
CreateLike creates a new like
func (*LikeRepository) DeleteLike ¶
func (r *LikeRepository) DeleteLike(_ context.Context, actor, object string) error
DeleteLike removes a like
func (*LikeRepository) GetActorLikes ¶
func (r *LikeRepository) GetActorLikes(_ context.Context, actorID string, limit int, cursor string) ([]*models.Like, string, error)
GetActorLikes retrieves all likes by an actor with pagination
func (*LikeRepository) GetBoostCount ¶
GetBoostCount counts boosts/announces for a status
func (*LikeRepository) GetForObject ¶
func (r *LikeRepository) GetForObject(ctx context.Context, objectID string, limit int, cursor string) ([]*models.Like, string, error)
GetForObject provides Storage interface compatibility for GetObjectLikes
func (*LikeRepository) GetLikeCount ¶
GetLikeCount counts likes for a status
func (*LikeRepository) GetLikeCountTotal ¶
func (r *LikeRepository) GetLikeCountTotal() int
GetLikeCountTotal returns the number of likes (test helper).
func (*LikeRepository) GetLikedObjects ¶
func (r *LikeRepository) GetLikedObjects(ctx context.Context, actorID string, limit int, cursor string) ([]*models.Like, string, error)
GetLikedObjects provides Storage interface compatibility
func (*LikeRepository) GetObjectLikes ¶
func (r *LikeRepository) GetObjectLikes(_ context.Context, objectID string, limit int, cursor string) ([]*models.Like, string, error)
GetObjectLikes retrieves all likes for an object with pagination
func (*LikeRepository) GetTombstone ¶
func (r *LikeRepository) GetTombstone(_ context.Context, objectID string) (*storage.Tombstone, error)
GetTombstone retrieves a tombstone by object ID
func (*LikeRepository) HasReblogged ¶
HasReblogged checks if a user has reblogged/boosted a specific status
func (*LikeRepository) IncrementReblogCount ¶
func (r *LikeRepository) IncrementReblogCount(_ context.Context, objectID string) error
IncrementReblogCount increments the reblog count on a status
func (*LikeRepository) SetReblog ¶
func (r *LikeRepository) SetReblog(actorID, statusID string, reblogged bool)
SetReblog sets a reblog status (test helper)
func (*LikeRepository) TombstoneObject ¶
func (r *LikeRepository) TombstoneObject(_ context.Context, objectID string, deletedBy string) error
TombstoneObject creates a tombstone for a deleted object
type ListRepository ¶
type ListRepository struct {
// contains filtered or unexported fields
}
ListRepository is a thread-safe in-memory implementation of interfaces.ListRepository.
func NewListRepository ¶
func NewListRepository() *ListRepository
NewListRepository creates a new in-memory list repository
func (*ListRepository) AddAccountsToList ¶
func (r *ListRepository) AddAccountsToList(_ context.Context, listID string, accountIDs []string) error
AddAccountsToList adds multiple accounts to a list
func (*ListRepository) AddListMember ¶
func (r *ListRepository) AddListMember(_ context.Context, listID, memberUsername string) error
AddListMember adds a member to a list
func (*ListRepository) CountListMembers ¶
CountListMembers returns the number of members in a list
func (*ListRepository) CountUserLists ¶
CountUserLists returns the number of lists owned by a user
func (*ListRepository) CreateList ¶
CreateList creates a new list
func (*ListRepository) DeleteList ¶
func (r *ListRepository) DeleteList(_ context.Context, listID string) error
DeleteList removes a list
func (*ListRepository) GetAccountLists ¶
func (r *ListRepository) GetAccountLists(_ context.Context, accountID string) ([]*storage.List, error)
GetAccountLists retrieves lists containing an account
func (*ListRepository) GetAccountListsForUser ¶
func (r *ListRepository) GetAccountListsForUser(_ context.Context, accountID, username string) ([]*storage.List, error)
GetAccountListsForUser retrieves lists owned by a user that contain an account
func (*ListRepository) GetAccountListsPaginated ¶
func (r *ListRepository) GetAccountListsPaginated(_ context.Context, accountID string, limit int, cursor string) ([]*storage.List, string, error)
GetAccountListsPaginated retrieves lists containing an account with pagination
func (*ListRepository) GetExclusiveLists ¶
func (r *ListRepository) GetExclusiveLists(_ context.Context, username string) ([]*storage.List, error)
GetExclusiveLists retrieves exclusive lists for a user
func (*ListRepository) GetListAccounts ¶
GetListAccounts retrieves all account IDs in a list
func (*ListRepository) GetListCount ¶
func (r *ListRepository) GetListCount() int
GetListCount returns the number of lists (test helper)
func (*ListRepository) GetListMembers ¶
func (r *ListRepository) GetListMembers(_ context.Context, listID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*storage.Account], error)
GetListMembers retrieves all members of a list with pagination
func (*ListRepository) GetListStatuses ¶
func (r *ListRepository) GetListStatuses(_ context.Context, listID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetListStatuses retrieves statuses from list members (stub implementation)
func (*ListRepository) GetListTimeline ¶
func (r *ListRepository) GetListTimeline(_ context.Context, listID string, _ interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetListTimeline retrieves statuses from list members (stub implementation)
func (*ListRepository) GetListsByMember ¶
func (r *ListRepository) GetListsByMember(_ context.Context, memberUsername string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.List], error)
GetListsByMember retrieves all lists containing a member with pagination
func (*ListRepository) GetListsContainingAccount ¶
func (r *ListRepository) GetListsContainingAccount(_ context.Context, accountID, username string) ([]*storage.List, error)
GetListsContainingAccount retrieves lists owned by a user that contain an account
func (*ListRepository) GetListsForUser ¶
func (r *ListRepository) GetListsForUser(_ context.Context, username string) ([]*storage.List, error)
GetListsForUser retrieves all lists for a user (legacy interface)
func (*ListRepository) GetListsForUserPaginated ¶
func (r *ListRepository) GetListsForUserPaginated(_ context.Context, username string, limit int, cursor string) ([]*storage.List, string, error)
GetListsForUserPaginated retrieves lists for a user with pagination
func (*ListRepository) GetMemberCount ¶
func (r *ListRepository) GetMemberCount() int
GetMemberCount returns the total number of memberships (test helper)
func (*ListRepository) GetUserLists ¶
func (r *ListRepository) GetUserLists(_ context.Context, username string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.List], error)
GetUserLists retrieves all lists for a user with pagination
func (*ListRepository) IsListMember ¶
func (r *ListRepository) IsListMember(_ context.Context, listID, memberUsername string) (bool, error)
IsListMember checks if a user is a member of a list
func (*ListRepository) RemoveAccountFromAllLists ¶
func (r *ListRepository) RemoveAccountFromAllLists(_ context.Context, accountID string) error
RemoveAccountFromAllLists removes an account from all lists
func (*ListRepository) RemoveAccountsFromList ¶
func (r *ListRepository) RemoveAccountsFromList(_ context.Context, listID string, accountIDs []string) error
RemoveAccountsFromList removes multiple accounts from a list
func (*ListRepository) RemoveListMember ¶
func (r *ListRepository) RemoveListMember(_ context.Context, listID, memberUsername string) error
RemoveListMember removes a member from a list
func (*ListRepository) UpdateList ¶
UpdateList updates an existing list
type MarkerRepository ¶
type MarkerRepository struct {
// contains filtered or unexported fields
}
MarkerRepository is a thread-safe in-memory implementation of interfaces.MarkerRepository.
func NewMarkerRepository ¶
func NewMarkerRepository() *MarkerRepository
NewMarkerRepository creates a new in-memory marker repository
func (*MarkerRepository) Clear ¶
func (r *MarkerRepository) Clear()
Clear clears all data (test helper)
func (*MarkerRepository) GetMarkers ¶
func (r *MarkerRepository) GetMarkers(_ context.Context, username string, timelines []string) (map[string]*storage.Marker, error)
GetMarkers retrieves timeline position markers for specified timelines
func (*MarkerRepository) SaveMarker ¶
func (r *MarkerRepository) SaveMarker(_ context.Context, username, timeline string, lastReadID string, version int) error
SaveMarker saves or updates a timeline position marker
type MediaAnalyticsRepository ¶
type MediaAnalyticsRepository struct {
// contains filtered or unexported fields
}
MediaAnalyticsRepository is a thread-safe in-memory implementation of interfaces.MediaAnalyticsRepository.
func NewMediaAnalyticsRepository ¶
func NewMediaAnalyticsRepository() *MediaAnalyticsRepository
NewMediaAnalyticsRepository creates a new in-memory media analytics repository
func (*MediaAnalyticsRepository) CalculatePopularityMetrics ¶
func (r *MediaAnalyticsRepository) CalculatePopularityMetrics(_ context.Context, mediaID string, days int) (map[string]interface{}, error)
CalculatePopularityMetrics calculates content popularity metrics
func (*MediaAnalyticsRepository) CleanupOldAnalytics ¶
func (r *MediaAnalyticsRepository) CleanupOldAnalytics(_ context.Context, olderThan time.Duration) error
CleanupOldAnalytics removes analytics records older than the specified duration
func (*MediaAnalyticsRepository) Clear ¶
func (r *MediaAnalyticsRepository) Clear()
Clear clears all data (test helper)
func (*MediaAnalyticsRepository) GenerateAnalyticsReport ¶
func (r *MediaAnalyticsRepository) GenerateAnalyticsReport(_ context.Context, startDate, endDate string) (map[string]interface{}, error)
GenerateAnalyticsReport generates comprehensive analytics report
func (*MediaAnalyticsRepository) GetAllMediaAnalyticsByTimeRange ¶
func (r *MediaAnalyticsRepository) GetAllMediaAnalyticsByTimeRange(_ context.Context, startTime, endTime time.Time, limit int) ([]*models.MediaAnalytics, error)
GetAllMediaAnalyticsByTimeRange retrieves analytics for all media within time range
func (*MediaAnalyticsRepository) GetBandwidthByTimeRange ¶
func (r *MediaAnalyticsRepository) GetBandwidthByTimeRange(_ context.Context, startTime, endTime time.Time, limit int) ([]*models.MediaAnalytics, error)
GetBandwidthByTimeRange retrieves bandwidth usage data within time range
func (*MediaAnalyticsRepository) GetContentRecommendations ¶
func (r *MediaAnalyticsRepository) GetContentRecommendations(_ context.Context, _ string, limit int) ([]map[string]interface{}, error)
GetContentRecommendations generates content recommendations
func (*MediaAnalyticsRepository) GetDailyCostSummary ¶
func (r *MediaAnalyticsRepository) GetDailyCostSummary(ctx context.Context, date string) (map[string]interface{}, error)
GetDailyCostSummary retrieves cost summary for a specific date
func (*MediaAnalyticsRepository) GetMediaAnalyticsByDate ¶
func (r *MediaAnalyticsRepository) GetMediaAnalyticsByDate(_ context.Context, date string) ([]*models.MediaAnalytics, error)
GetMediaAnalyticsByDate retrieves media analytics for a specific date
func (*MediaAnalyticsRepository) GetMediaAnalyticsByID ¶
func (r *MediaAnalyticsRepository) GetMediaAnalyticsByID(_ context.Context, format string, timestamp time.Time, mediaID string) (*models.MediaAnalytics, error)
GetMediaAnalyticsByID retrieves media analytics by format, timestamp, and media ID
func (*MediaAnalyticsRepository) GetMediaAnalyticsByTimeRange ¶
func (r *MediaAnalyticsRepository) GetMediaAnalyticsByTimeRange(_ context.Context, mediaID string, startTime, endTime time.Time, limit int) ([]*models.MediaAnalytics, error)
GetMediaAnalyticsByTimeRange retrieves analytics for a specific media within time range
func (*MediaAnalyticsRepository) GetMediaAnalyticsByVariant ¶
func (r *MediaAnalyticsRepository) GetMediaAnalyticsByVariant(_ context.Context, variantKey string) ([]*models.MediaAnalytics, error)
GetMediaAnalyticsByVariant retrieves media analytics for a specific variant
func (*MediaAnalyticsRepository) GetMediaMetricsForDate ¶
func (r *MediaAnalyticsRepository) GetMediaMetricsForDate(ctx context.Context, mediaID, date string) (map[string]interface{}, error)
GetMediaMetricsForDate gets metrics for a specific media item on a specific date
func (*MediaAnalyticsRepository) GetPopularMedia ¶
func (r *MediaAnalyticsRepository) GetPopularMedia(_ context.Context, _, _ time.Time, _ int, _ *string) ([]*models.MediaAnalytics, error)
GetPopularMedia retrieves popular media (deprecated - returns empty)
func (*MediaAnalyticsRepository) GetTopVariantsByDemand ¶
func (r *MediaAnalyticsRepository) GetTopVariantsByDemand(ctx context.Context, date string, limit int) ([]map[string]interface{}, error)
GetTopVariantsByDemand retrieves the most popular variants by viewer count
func (*MediaAnalyticsRepository) RecordMediaAnalytics ¶
func (r *MediaAnalyticsRepository) RecordMediaAnalytics(_ context.Context, analytics *models.MediaAnalytics) error
RecordMediaAnalytics records a media analytics entry
func (*MediaAnalyticsRepository) RecordMediaView ¶
func (r *MediaAnalyticsRepository) RecordMediaView(ctx context.Context, mediaID, userID string, duration time.Duration, quality string) error
RecordMediaView tracks media view events
func (*MediaAnalyticsRepository) StoreMediaAnalytics ¶
func (r *MediaAnalyticsRepository) StoreMediaAnalytics(ctx context.Context, analytics *models.MediaAnalytics) error
StoreMediaAnalytics stores a media analytics event (alias for RecordMediaAnalytics)
func (*MediaAnalyticsRepository) TrackUserBehavior ¶
func (r *MediaAnalyticsRepository) TrackUserBehavior(ctx context.Context, userID string, behaviorData map[string]interface{}) error
TrackUserBehavior analyzes user behavior patterns
func (*MediaAnalyticsRepository) UpdateMediaAnalytics ¶
func (r *MediaAnalyticsRepository) UpdateMediaAnalytics(_ context.Context, analytics *models.MediaAnalytics) error
UpdateMediaAnalytics updates an existing media analytics record
type MediaMetadataRepository ¶
type MediaMetadataRepository struct {
// contains filtered or unexported fields
}
MediaMetadataRepository is a thread-safe in-memory implementation of interfaces.MediaMetadataRepository.
func NewMediaMetadataRepository ¶
func NewMediaMetadataRepository() *MediaMetadataRepository
NewMediaMetadataRepository creates a new in-memory media metadata repository
func (*MediaMetadataRepository) CleanupExpiredMetadata ¶
func (r *MediaMetadataRepository) CleanupExpiredMetadata(_ context.Context) error
CleanupExpiredMetadata removes expired metadata
func (*MediaMetadataRepository) Clear ¶
func (r *MediaMetadataRepository) Clear()
Clear clears all data (test helper)
func (*MediaMetadataRepository) CreateMediaMetadata ¶
func (r *MediaMetadataRepository) CreateMediaMetadata(_ context.Context, metadata *models.MediaMetadata) error
CreateMediaMetadata creates a new media metadata record
func (*MediaMetadataRepository) DeleteMediaMetadata ¶
func (r *MediaMetadataRepository) DeleteMediaMetadata(_ context.Context, mediaID string) error
DeleteMediaMetadata removes a media metadata record
func (*MediaMetadataRepository) GetMediaMetadata ¶
func (r *MediaMetadataRepository) GetMediaMetadata(_ context.Context, mediaID string) (*models.MediaMetadata, error)
GetMediaMetadata retrieves media metadata by ID
func (*MediaMetadataRepository) GetMediaMetadataByStatus ¶
func (r *MediaMetadataRepository) GetMediaMetadataByStatus(_ context.Context, status string, limit int) ([]*models.MediaMetadata, error)
GetMediaMetadataByStatus retrieves metadata by status
func (*MediaMetadataRepository) GetMetadataCount ¶
func (r *MediaMetadataRepository) GetMetadataCount() int
GetMetadataCount returns the number of metadata records (test helper)
func (*MediaMetadataRepository) GetPendingMediaMetadata ¶
func (r *MediaMetadataRepository) GetPendingMediaMetadata(ctx context.Context, limit int) ([]*models.MediaMetadata, error)
GetPendingMediaMetadata retrieves pending metadata
func (*MediaMetadataRepository) GetProcessingMediaMetadata ¶
func (r *MediaMetadataRepository) GetProcessingMediaMetadata(ctx context.Context, limit int) ([]*models.MediaMetadata, error)
GetProcessingMediaMetadata retrieves processing metadata
func (*MediaMetadataRepository) MarkProcessingComplete ¶
func (r *MediaMetadataRepository) MarkProcessingComplete(_ context.Context, mediaID string, result interfaces.ProcessingResult) error
MarkProcessingComplete marks metadata as complete with result
func (*MediaMetadataRepository) MarkProcessingFailed ¶
func (r *MediaMetadataRepository) MarkProcessingFailed(_ context.Context, mediaID string, _ string) error
MarkProcessingFailed marks metadata as failed
func (*MediaMetadataRepository) MarkProcessingStarted ¶
func (r *MediaMetadataRepository) MarkProcessingStarted(_ context.Context, mediaID string) error
MarkProcessingStarted marks metadata as processing
func (*MediaMetadataRepository) UpdateMediaMetadata ¶
func (r *MediaMetadataRepository) UpdateMediaMetadata(_ context.Context, metadata *models.MediaMetadata) error
UpdateMediaMetadata updates an existing media metadata record
type MediaPopularityRepository ¶
type MediaPopularityRepository struct {
// contains filtered or unexported fields
}
MediaPopularityRepository is a thread-safe in-memory implementation of interfaces.MediaPopularityRepository.
func NewMediaPopularityRepository ¶
func NewMediaPopularityRepository() *MediaPopularityRepository
NewMediaPopularityRepository creates a new in-memory media popularity repository
func (*MediaPopularityRepository) Clear ¶
func (r *MediaPopularityRepository) Clear()
Clear clears all data (test helper)
func (*MediaPopularityRepository) GetPopularMediaByPeriod ¶
func (r *MediaPopularityRepository) GetPopularMediaByPeriod(_ context.Context, period string, limit int, cursor *string) ([]*models.MediaPopularity, error)
GetPopularMediaByPeriod retrieves popular media for a given period with cursor pagination
func (*MediaPopularityRepository) GetPopularityForMedia ¶
func (r *MediaPopularityRepository) GetPopularityForMedia(_ context.Context, mediaID, period string) (*models.MediaPopularity, error)
GetPopularityForMedia retrieves popularity record for specific media
func (*MediaPopularityRepository) IncrementViewCount ¶
func (r *MediaPopularityRepository) IncrementViewCount(_ context.Context, mediaID, period string, incrementBy int64) error
IncrementViewCount atomically increments view count for media
func (*MediaPopularityRepository) UpsertPopularity ¶
func (r *MediaPopularityRepository) UpsertPopularity(_ context.Context, popularity *models.MediaPopularity) error
UpsertPopularity creates or updates media popularity record
type MediaRepository ¶
type MediaRepository struct {
// contains filtered or unexported fields
}
MediaRepository is a thread-safe in-memory implementation of interfaces.MediaRepository.
func NewMediaRepository ¶
func NewMediaRepository() *MediaRepository
NewMediaRepository creates a new in-memory media repository
func (*MediaRepository) AddMediaVariant ¶
func (r *MediaRepository) AddMediaVariant(_ context.Context, mediaID, variantName string, variant models.MediaVariant) error
AddMediaVariant adds a variant to media
func (*MediaRepository) AddSpendingTransaction ¶
func (r *MediaRepository) AddSpendingTransaction(ctx context.Context, transaction *models.MediaSpendingTransaction) error
AddSpendingTransaction adds a spending transaction (alias for CreateMediaSpendingTransaction)
func (*MediaRepository) Clear ¶
func (r *MediaRepository) Clear()
Clear clears all data (test helper)
func (*MediaRepository) CreateMedia ¶
CreateMedia creates a new media record
func (*MediaRepository) CreateMediaJob ¶
CreateMediaJob creates a new media job
func (*MediaRepository) CreateMediaSpending ¶
func (r *MediaRepository) CreateMediaSpending(_ context.Context, spending *models.MediaSpending) error
CreateMediaSpending creates a media spending record
func (*MediaRepository) CreateMediaSpendingTransaction ¶
func (r *MediaRepository) CreateMediaSpendingTransaction(_ context.Context, transaction *models.MediaSpendingTransaction) error
CreateMediaSpendingTransaction creates a spending transaction
func (*MediaRepository) CreateTranscodingJob ¶
func (r *MediaRepository) CreateTranscodingJob(_ context.Context, job *models.TranscodingJob) error
CreateTranscodingJob creates a transcoding job
func (*MediaRepository) CreateUserMediaConfig ¶
func (r *MediaRepository) CreateUserMediaConfig(_ context.Context, config *models.UserMediaConfig) error
CreateUserMediaConfig creates a user media config
func (*MediaRepository) DeleteExpiredMedia ¶
func (r *MediaRepository) DeleteExpiredMedia(_ context.Context, expiredBefore time.Time) (int64, error)
DeleteExpiredMedia deletes media that expired before a given time
func (*MediaRepository) DeleteMedia ¶
func (r *MediaRepository) DeleteMedia(_ context.Context, mediaID string) error
DeleteMedia removes a media record
func (*MediaRepository) DeleteMediaJob ¶
func (r *MediaRepository) DeleteMediaJob(_ context.Context, jobID string) error
DeleteMediaJob removes a media job
func (*MediaRepository) DeleteMediaVariant ¶
func (r *MediaRepository) DeleteMediaVariant(_ context.Context, mediaID, variantName string) error
DeleteMediaVariant removes a media variant
func (*MediaRepository) DeleteTranscodingJob ¶
func (r *MediaRepository) DeleteTranscodingJob(_ context.Context, jobID string) error
DeleteTranscodingJob removes a transcoding job
func (*MediaRepository) DeleteUserMediaConfig ¶
func (r *MediaRepository) DeleteUserMediaConfig(_ context.Context, userID string) error
DeleteUserMediaConfig removes a user media config
func (*MediaRepository) GetJobCount ¶
func (r *MediaRepository) GetJobCount() int
GetJobCount returns the number of jobs (test helper)
func (*MediaRepository) GetJobsByStatus ¶
func (r *MediaRepository) GetJobsByStatus(_ context.Context, status string, limit int) ([]*models.MediaJob, error)
GetJobsByStatus retrieves jobs by status
func (*MediaRepository) GetJobsByUser ¶
func (r *MediaRepository) GetJobsByUser(_ context.Context, username string, limit int) ([]*models.MediaJob, error)
GetJobsByUser retrieves jobs by user
func (*MediaRepository) GetMediaByContentType ¶
func (r *MediaRepository) GetMediaByContentType(_ context.Context, contentType string, limit int) ([]*models.Media, error)
GetMediaByContentType retrieves media by content type
func (*MediaRepository) GetMediaByIDs ¶
func (r *MediaRepository) GetMediaByIDs(_ context.Context, mediaIDs []string) ([]*models.Media, error)
GetMediaByIDs retrieves multiple media by IDs
func (*MediaRepository) GetMediaByStatus ¶
func (r *MediaRepository) GetMediaByStatus(_ context.Context, status string, limit int) ([]*models.Media, error)
GetMediaByStatus retrieves media by status
func (*MediaRepository) GetMediaByUser ¶
func (r *MediaRepository) GetMediaByUser(_ context.Context, userID string, limit int) ([]*models.Media, error)
GetMediaByUser retrieves media for a user
func (*MediaRepository) GetMediaCount ¶
func (r *MediaRepository) GetMediaCount() int
GetMediaCount returns the number of media records (test helper)
func (*MediaRepository) GetMediaJob ¶
GetMediaJob retrieves a media job by ID
func (*MediaRepository) GetMediaSpending ¶
func (r *MediaRepository) GetMediaSpending(_ context.Context, userID, period string) (*models.MediaSpending, error)
GetMediaSpending retrieves a media spending record
func (*MediaRepository) GetMediaSpendingByTimeRange ¶
func (r *MediaRepository) GetMediaSpendingByTimeRange(_ context.Context, userID string, periodType string, limit int) ([]*models.MediaSpending, error)
GetMediaSpendingByTimeRange retrieves spending records by time range
func (*MediaRepository) GetMediaSpendingTransactions ¶
func (r *MediaRepository) GetMediaSpendingTransactions(_ context.Context, userID string, limit int) ([]*models.MediaSpendingTransaction, error)
GetMediaSpendingTransactions retrieves spending transactions for a user
func (*MediaRepository) GetMediaStorageUsage ¶
GetMediaStorageUsage retrieves total storage usage for a user
func (*MediaRepository) GetMediaUsageStats ¶
func (r *MediaRepository) GetMediaUsageStats(_ context.Context, mediaID string) (usageCount int, lastUsed *time.Time, err error)
GetMediaUsageStats retrieves usage stats for media
func (*MediaRepository) GetMediaVariant ¶
func (r *MediaRepository) GetMediaVariant(_ context.Context, mediaID, variantName string) (*models.MediaVariant, error)
GetMediaVariant retrieves a media variant
func (*MediaRepository) GetModerationPendingMedia ¶
func (r *MediaRepository) GetModerationPendingMedia(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
GetModerationPendingMedia retrieves media pending moderation
func (*MediaRepository) GetOrCreateMediaSpending ¶
func (r *MediaRepository) GetOrCreateMediaSpending(_ context.Context, userID, period, periodType string) (*models.MediaSpending, error)
GetOrCreateMediaSpending gets or creates a media spending record
func (*MediaRepository) GetPendingMedia ¶
func (r *MediaRepository) GetPendingMedia(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
GetPendingMedia retrieves pending media with pagination
func (*MediaRepository) GetProcessingMedia ¶
func (r *MediaRepository) GetProcessingMedia(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
GetProcessingMedia retrieves processing media with pagination
func (*MediaRepository) GetTotalStorageUsage ¶
func (r *MediaRepository) GetTotalStorageUsage(_ context.Context) (int64, error)
GetTotalStorageUsage retrieves total storage usage across all users
func (*MediaRepository) GetTranscodingCostsByUser ¶
func (r *MediaRepository) GetTranscodingCostsByUser(_ context.Context, userID string, _ string) (map[string]int64, error)
GetTranscodingCostsByUser retrieves transcoding costs by user
func (*MediaRepository) GetTranscodingJob ¶
func (r *MediaRepository) GetTranscodingJob(_ context.Context, jobID string) (*models.TranscodingJob, error)
GetTranscodingJob retrieves a transcoding job
func (*MediaRepository) GetTranscodingJobCount ¶
func (r *MediaRepository) GetTranscodingJobCount() int
GetTranscodingJobCount returns the number of transcoding jobs (test helper)
func (*MediaRepository) GetTranscodingJobsByMedia ¶
func (r *MediaRepository) GetTranscodingJobsByMedia(_ context.Context, mediaID string, limit int) ([]*models.TranscodingJob, error)
GetTranscodingJobsByMedia retrieves transcoding jobs by media
func (*MediaRepository) GetTranscodingJobsByStatus ¶
func (r *MediaRepository) GetTranscodingJobsByStatus(_ context.Context, status string, limit int) ([]*models.TranscodingJob, error)
GetTranscodingJobsByStatus retrieves transcoding jobs by status
func (*MediaRepository) GetTranscodingJobsByUser ¶
func (r *MediaRepository) GetTranscodingJobsByUser(_ context.Context, userID string, limit int) ([]*models.TranscodingJob, error)
GetTranscodingJobsByUser retrieves transcoding jobs by user
func (*MediaRepository) GetUnusedMedia ¶
func (r *MediaRepository) GetUnusedMedia(_ context.Context, olderThan time.Time, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
GetUnusedMedia retrieves unused media older than a given time
func (*MediaRepository) GetUserMedia ¶
func (r *MediaRepository) GetUserMedia(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
GetUserMedia retrieves media for a user with pagination
func (*MediaRepository) GetUserMediaByType ¶
func (r *MediaRepository) GetUserMediaByType(_ context.Context, userID, contentType string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Media], error)
GetUserMediaByType retrieves media for a user by content type with pagination
func (*MediaRepository) GetUserMediaConfig ¶
func (r *MediaRepository) GetUserMediaConfig(_ context.Context, userID string) (*models.UserMediaConfig, error)
GetUserMediaConfig retrieves a user media config
func (*MediaRepository) GetUserMediaConfigByUsername ¶
func (r *MediaRepository) GetUserMediaConfigByUsername(_ context.Context, username string) (*models.UserMediaConfig, error)
GetUserMediaConfigByUsername retrieves a user media config by username
func (*MediaRepository) GetUserMediaLegacy ¶
GetUserMediaLegacy retrieves user media in legacy format
func (*MediaRepository) MarkMediaFailed ¶
func (r *MediaRepository) MarkMediaFailed(_ context.Context, mediaID, errorMsg string) error
MarkMediaFailed marks media as failed
func (*MediaRepository) MarkMediaProcessing ¶
func (r *MediaRepository) MarkMediaProcessing(_ context.Context, mediaID string) error
MarkMediaProcessing marks media as processing
func (*MediaRepository) MarkMediaReady ¶
func (r *MediaRepository) MarkMediaReady(_ context.Context, mediaID string) error
MarkMediaReady marks media as ready
func (*MediaRepository) MarkMediaUsed ¶
func (r *MediaRepository) MarkMediaUsed(_ context.Context, mediaID string) error
MarkMediaUsed marks media as used
func (*MediaRepository) SetDependencies ¶
func (r *MediaRepository) SetDependencies(deps map[string]interface{})
SetDependencies sets repository dependencies
func (*MediaRepository) SetMediaModeration ¶
func (r *MediaRepository) SetMediaModeration(_ context.Context, mediaID string, isNSFW bool, score float64, labels []string) error
SetMediaModeration sets moderation results for media
func (*MediaRepository) UnmarkAllMediaAsSensitive ¶
func (r *MediaRepository) UnmarkAllMediaAsSensitive(_ context.Context, username string) error
UnmarkAllMediaAsSensitive unmarks all media for a user as sensitive
func (*MediaRepository) UpdateMedia ¶
UpdateMedia updates an existing media record
func (*MediaRepository) UpdateMediaAttachment ¶
func (r *MediaRepository) UpdateMediaAttachment(_ context.Context, mediaID string, updates map[string]any) error
UpdateMediaAttachment updates media attachment fields
func (*MediaRepository) UpdateMediaJob ¶
UpdateMediaJob updates a media job
func (*MediaRepository) UpdateMediaSpending ¶
func (r *MediaRepository) UpdateMediaSpending(_ context.Context, spending *models.MediaSpending) error
UpdateMediaSpending updates a media spending record
func (*MediaRepository) UpdateTranscodingJob ¶
func (r *MediaRepository) UpdateTranscodingJob(_ context.Context, job *models.TranscodingJob) error
UpdateTranscodingJob updates a transcoding job
func (*MediaRepository) UpdateUserMediaConfig ¶
func (r *MediaRepository) UpdateUserMediaConfig(_ context.Context, config *models.UserMediaConfig) error
UpdateUserMediaConfig updates a user media config
type MediaSessionRepository ¶
type MediaSessionRepository struct {
// contains filtered or unexported fields
}
MediaSessionRepository is a thread-safe in-memory implementation of interfaces.MediaSessionRepository.
func NewMediaSessionRepository ¶
func NewMediaSessionRepository() *MediaSessionRepository
NewMediaSessionRepository creates a new in-memory media session repository
func (*MediaSessionRepository) CleanupExpiredSessions ¶
func (r *MediaSessionRepository) CleanupExpiredSessions(_ context.Context, maxAge time.Duration) error
CleanupExpiredSessions removes sessions older than the specified duration
func (*MediaSessionRepository) Clear ¶
func (r *MediaSessionRepository) Clear()
Clear clears all data (test helper)
func (*MediaSessionRepository) CreateSession ¶
func (r *MediaSessionRepository) CreateSession(_ context.Context, session *types.StreamingSession) error
CreateSession creates a new streaming session (legacy compatibility)
func (*MediaSessionRepository) EndSession ¶
func (r *MediaSessionRepository) EndSession(ctx context.Context, sessionID string) error
EndSession marks a session as ended (legacy compatibility)
func (*MediaSessionRepository) EndStreamingSession ¶
func (r *MediaSessionRepository) EndStreamingSession(_ context.Context, sessionID string) error
EndStreamingSession marks a session as ended
func (*MediaSessionRepository) GetActiveSessionsCount ¶
func (r *MediaSessionRepository) GetActiveSessionsCount(_ context.Context) (int, error)
GetActiveSessionsCount returns the count of active sessions
func (*MediaSessionRepository) GetActiveStreams ¶
func (r *MediaSessionRepository) GetActiveStreams(_ context.Context, limit int) ([]*types.StreamingSession, error)
GetActiveStreams retrieves all active streaming sessions
func (*MediaSessionRepository) GetMediaSessions ¶
func (r *MediaSessionRepository) GetMediaSessions(_ context.Context, mediaID string, limit int32) ([]*types.StreamingSession, error)
GetMediaSessions retrieves sessions for a specific media item
func (*MediaSessionRepository) GetSession ¶
func (r *MediaSessionRepository) GetSession(_ context.Context, sessionID string) (*types.StreamingSession, error)
GetSession retrieves a streaming session
func (*MediaSessionRepository) GetSessionsByTimeRange ¶
func (r *MediaSessionRepository) GetSessionsByTimeRange(_ context.Context, startTime, endTime time.Time, limit int32) ([]*types.StreamingSession, error)
GetSessionsByTimeRange retrieves sessions within a specific time range
func (*MediaSessionRepository) GetUserSessions ¶
func (r *MediaSessionRepository) GetUserSessions(_ context.Context, userID string) ([]*types.StreamingSession, error)
GetUserSessions retrieves active sessions for a user
func (*MediaSessionRepository) SetSessionTTL ¶
func (r *MediaSessionRepository) SetSessionTTL(ttl time.Duration)
SetSessionTTL configures the TTL for streaming sessions
func (*MediaSessionRepository) StartStreamingSession ¶
func (r *MediaSessionRepository) StartStreamingSession(_ context.Context, userID, mediaID string, format types.MediaFormat, quality types.Quality) (*types.StreamingSession, error)
StartStreamingSession creates and initializes a new streaming session
func (*MediaSessionRepository) UpdateSession ¶
func (r *MediaSessionRepository) UpdateSession(_ context.Context, session *types.StreamingSession) error
UpdateSession updates a streaming session
func (*MediaSessionRepository) UpdateStreamingMetrics ¶
func (r *MediaSessionRepository) UpdateStreamingMetrics(_ context.Context, sessionID string, segmentIndex int, bytesTransferred int64, bufferHealth float64, currentQuality types.Quality) error
UpdateStreamingMetrics updates session metrics
func (*MediaSessionRepository) ValidateSessionAccess ¶
func (r *MediaSessionRepository) ValidateSessionAccess(_ context.Context, sessionID, userID string) (bool, error)
ValidateSessionAccess validates if user has access to the streaming session
type MetricRecordRepository ¶
type MetricRecordRepository struct {
// contains filtered or unexported fields
}
MetricRecordRepository is a thread-safe in-memory implementation of interfaces.MetricRecordRepository.
func NewMetricRecordRepository ¶
func NewMetricRecordRepository() *MetricRecordRepository
NewMetricRecordRepository creates a new in-memory metric record repository.
func (*MetricRecordRepository) BatchCreateMetricRecords ¶
func (r *MetricRecordRepository) BatchCreateMetricRecords(ctx context.Context, records []*models.MetricRecord) error
BatchCreateMetricRecords creates multiple metric records efficiently.
func (*MetricRecordRepository) Clear ¶
func (r *MetricRecordRepository) Clear()
Clear clears all data.
func (*MetricRecordRepository) Count ¶
func (r *MetricRecordRepository) Count() int
Count returns the number of records.
func (*MetricRecordRepository) CreateMetricRecord ¶
func (r *MetricRecordRepository) CreateMetricRecord(_ context.Context, record *models.MetricRecord) error
CreateMetricRecord creates a new metric record.
func (*MetricRecordRepository) DeleteMetricRecord ¶
func (r *MetricRecordRepository) DeleteMetricRecord(_ context.Context, metricType, _, timestamp string) error
DeleteMetricRecord deletes a metric record by its keys.
func (*MetricRecordRepository) GetMetricRecord ¶
func (r *MetricRecordRepository) GetMetricRecord(_ context.Context, metricType, _, timestamp string) (*models.MetricRecord, error)
GetMetricRecord retrieves a single metric record by its keys.
func (*MetricRecordRepository) GetMetricsByAggregationLevel ¶
func (r *MetricRecordRepository) GetMetricsByAggregationLevel(_ context.Context, level string, startTime, endTime time.Time) ([]*models.MetricRecord, error)
GetMetricsByAggregationLevel queries metrics by aggregation level within a time range using GSI4.
func (*MetricRecordRepository) GetMetricsByDate ¶
func (r *MetricRecordRepository) GetMetricsByDate(_ context.Context, date time.Time, serviceName string) ([]*models.MetricRecord, error)
GetMetricsByDate queries metrics by date and service using GSI3.
func (*MetricRecordRepository) GetMetricsByService ¶
func (r *MetricRecordRepository) GetMetricsByService(_ context.Context, serviceName string, startTime, endTime time.Time) ([]*models.MetricRecord, error)
GetMetricsByService queries metrics by service within a time range using GSI1.
func (*MetricRecordRepository) GetMetricsByType ¶
func (r *MetricRecordRepository) GetMetricsByType(_ context.Context, metricType string, startTime, endTime time.Time) ([]*models.MetricRecord, error)
GetMetricsByType queries metrics by type within a time range using GSI2.
func (*MetricRecordRepository) GetServiceMetricsStats ¶
func (r *MetricRecordRepository) GetServiceMetricsStats(ctx context.Context, serviceName string, metricType string, startTime, endTime time.Time) (*interfaces.MetricRecordStats, error)
GetServiceMetricsStats calculates statistics for a service's metrics.
func (*MetricRecordRepository) UpdateMetricRecord ¶
func (r *MetricRecordRepository) UpdateMetricRecord(_ context.Context, record *models.MetricRecord) error
UpdateMetricRecord updates an existing metric record.
type ModerationMLRepository ¶
type ModerationMLRepository struct {
// contains filtered or unexported fields
}
ModerationMLRepository is a thread-safe in-memory implementation of interfaces.ModerationMLRepository.
func NewModerationMLRepository ¶
func NewModerationMLRepository() *ModerationMLRepository
NewModerationMLRepository creates a new in-memory moderation ML repository
func (*ModerationMLRepository) Clear ¶
func (r *ModerationMLRepository) Clear()
Clear clears all data (test helper)
func (*ModerationMLRepository) CreateEffectivenessMetric ¶
func (r *ModerationMLRepository) CreateEffectivenessMetric(_ context.Context, metric *models.ModerationEffectivenessMetric) error
CreateEffectivenessMetric creates a new effectiveness metric record
func (*ModerationMLRepository) CreateModelVersion ¶
func (r *ModerationMLRepository) CreateModelVersion(_ context.Context, version *models.ModerationModelVersion) error
CreateModelVersion creates a new model version record
func (*ModerationMLRepository) CreateSample ¶
func (r *ModerationMLRepository) CreateSample(_ context.Context, sample *models.ModerationSample) error
CreateSample creates a new moderation training sample
func (*ModerationMLRepository) GetActiveModelVersion ¶
func (r *ModerationMLRepository) GetActiveModelVersion(_ context.Context) (*models.ModerationModelVersion, error)
GetActiveModelVersion retrieves the currently active model version
func (*ModerationMLRepository) GetEffectivenessMetric ¶
func (r *ModerationMLRepository) GetEffectivenessMetric(_ context.Context, patternID, period string, startTime time.Time) (*models.ModerationEffectivenessMetric, error)
GetEffectivenessMetric retrieves effectiveness metrics for a pattern/period
func (*ModerationMLRepository) GetModelVersion ¶
func (r *ModerationMLRepository) GetModelVersion(_ context.Context, versionID string) (*models.ModerationModelVersion, error)
GetModelVersion retrieves a model version by ID
func (*ModerationMLRepository) GetSample ¶
func (r *ModerationMLRepository) GetSample(_ context.Context, sampleID string) (*models.ModerationSample, error)
GetSample retrieves a sample by ID
func (*ModerationMLRepository) ListEffectivenessMetricsByPattern ¶
func (r *ModerationMLRepository) ListEffectivenessMetricsByPattern(_ context.Context, patternID string, limit int) ([]*models.ModerationEffectivenessMetric, error)
ListEffectivenessMetricsByPattern retrieves all metrics for a pattern
func (*ModerationMLRepository) ListEffectivenessMetricsByPeriod ¶
func (r *ModerationMLRepository) ListEffectivenessMetricsByPeriod(_ context.Context, period string, limit int) ([]*models.ModerationEffectivenessMetric, error)
ListEffectivenessMetricsByPeriod retrieves top-performing patterns for a period
func (*ModerationMLRepository) ListSamplesByLabel ¶
func (r *ModerationMLRepository) ListSamplesByLabel(_ context.Context, label string, limit int) ([]*models.ModerationSample, error)
ListSamplesByLabel retrieves samples with a specific label
func (*ModerationMLRepository) ListSamplesByReviewer ¶
func (r *ModerationMLRepository) ListSamplesByReviewer(_ context.Context, reviewerID string, limit int) ([]*models.ModerationSample, error)
ListSamplesByReviewer retrieves samples submitted by a specific reviewer
func (*ModerationMLRepository) UpdateModelVersion ¶
func (r *ModerationMLRepository) UpdateModelVersion(_ context.Context, version *models.ModerationModelVersion) error
UpdateModelVersion updates an existing model version
type ModerationRepository ¶
type ModerationRepository struct {
// contains filtered or unexported fields
}
ModerationRepository is a thread-safe in-memory implementation of interfaces.ModerationRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewModerationRepository ¶
func NewModerationRepository() *ModerationRepository
NewModerationRepository creates a new in-memory moderation repository
func (*ModerationRepository) AddFilterKeyword ¶
func (r *ModerationRepository) AddFilterKeyword(_ context.Context, filterID string, keyword *storage.FilterKeyword) error
AddFilterKeyword adds a new keyword to a filter
func (*ModerationRepository) AddFilterStatus ¶
func (r *ModerationRepository) AddFilterStatus(_ context.Context, filterID string, status *storage.FilterStatus) error
AddFilterStatus adds a new status to a filter
func (*ModerationRepository) AddModerationReview ¶
func (r *ModerationRepository) AddModerationReview(_ context.Context, review *storage.ModerationReview) error
AddModerationReview adds a review to a moderation event
func (*ModerationRepository) AssignReport ¶
func (r *ModerationRepository) AssignReport(_ context.Context, reportID string, assignedTo string) error
AssignReport assigns a report to a moderator
func (*ModerationRepository) Clear ¶
func (r *ModerationRepository) Clear()
Clear clears all data (test helper)
func (*ModerationRepository) CountPendingFlags ¶
func (r *ModerationRepository) CountPendingFlags(_ context.Context) (int, error)
CountPendingFlags returns the count of pending flags
func (*ModerationRepository) CreateAdminReview ¶
func (r *ModerationRepository) CreateAdminReview(ctx context.Context, eventID string, adminID string, action storage.ActionType, reason string) error
CreateAdminReview creates an admin review that overrides consensus
func (*ModerationRepository) CreateAuditLog ¶
CreateAuditLog creates a new audit log entry
func (*ModerationRepository) CreateFilter ¶
CreateFilter creates a new filter
func (*ModerationRepository) CreateFlag ¶
CreateFlag creates a new flag
func (*ModerationRepository) CreateModerationDecision ¶
func (r *ModerationRepository) CreateModerationDecision(_ context.Context, decision *storage.ModerationDecision) error
CreateModerationDecision creates a consensus decision
func (*ModerationRepository) CreateModerationEvent ¶
func (r *ModerationRepository) CreateModerationEvent(_ context.Context, event *storage.ModerationEvent) error
CreateModerationEvent creates a new moderation event
func (*ModerationRepository) CreateModerationPattern ¶
func (r *ModerationRepository) CreateModerationPattern(_ context.Context, pattern *storage.ModerationPattern) error
CreateModerationPattern creates a new moderation pattern
func (*ModerationRepository) CreateReport ¶
CreateReport creates a new report
func (*ModerationRepository) DeleteFilter ¶
func (r *ModerationRepository) DeleteFilter(_ context.Context, filterID string) error
DeleteFilter deletes a filter and all its associated keywords and statuses
func (*ModerationRepository) DeleteFilterKeyword ¶
func (r *ModerationRepository) DeleteFilterKeyword(_ context.Context, keywordID string) error
DeleteFilterKeyword deletes a filter keyword
func (*ModerationRepository) DeleteFilterStatus ¶
func (r *ModerationRepository) DeleteFilterStatus(_ context.Context, statusID string) error
DeleteFilterStatus deletes a filter status
func (*ModerationRepository) DeleteFlag ¶
func (r *ModerationRepository) DeleteFlag(_ context.Context, id string) error
DeleteFlag removes a flag
func (*ModerationRepository) DeleteModerationPattern ¶
func (r *ModerationRepository) DeleteModerationPattern(_ context.Context, patternID string) error
DeleteModerationPattern deletes a moderation pattern
func (*ModerationRepository) GetAuditLogs ¶
func (r *ModerationRepository) GetAuditLogs(_ context.Context, limit int, cursor string) ([]*storage.AuditLog, string, error)
GetAuditLogs retrieves audit log entries with pagination
func (*ModerationRepository) GetAuditLogsByAdmin ¶
func (r *ModerationRepository) GetAuditLogsByAdmin(_ context.Context, adminID string, limit int, cursor string) ([]*storage.AuditLog, string, error)
GetAuditLogsByAdmin retrieves audit log entries for a specific admin
func (*ModerationRepository) GetAuditLogsByTarget ¶
func (r *ModerationRepository) GetAuditLogsByTarget(_ context.Context, targetID string, limit int, cursor string) ([]*storage.AuditLog, string, error)
GetAuditLogsByTarget retrieves audit log entries for a specific target
func (*ModerationRepository) GetDecisionHistory ¶
func (r *ModerationRepository) GetDecisionHistory(_ context.Context, contentID string) ([]*models.ModerationDecisionResult, error)
GetDecisionHistory retrieves decision history for a specific content ID
func (*ModerationRepository) GetFilter ¶
func (r *ModerationRepository) GetFilter(_ context.Context, filterID string) (*storage.Filter, error)
GetFilter retrieves a filter by ID
func (*ModerationRepository) GetFilterKeywords ¶
func (r *ModerationRepository) GetFilterKeywords(_ context.Context, filterID string) ([]*storage.FilterKeyword, error)
GetFilterKeywords retrieves all keywords for a filter
func (*ModerationRepository) GetFilterStatuses ¶
func (r *ModerationRepository) GetFilterStatuses(_ context.Context, filterID string) ([]*storage.FilterStatus, error)
GetFilterStatuses retrieves all statuses for a filter
func (*ModerationRepository) GetFiltersForUser ¶
func (r *ModerationRepository) GetFiltersForUser(_ context.Context, username string) ([]*storage.Filter, error)
GetFiltersForUser retrieves all filters for a user
func (*ModerationRepository) GetFlagsByActor ¶
func (r *ModerationRepository) GetFlagsByActor(_ context.Context, actorID string, limit int, cursor string) ([]*storage.Flag, string, error)
GetFlagsByActor retrieves all flags created by a specific actor
func (*ModerationRepository) GetFlagsByObject ¶
func (r *ModerationRepository) GetFlagsByObject(_ context.Context, objectID string, limit int, cursor string) ([]*storage.Flag, string, error)
GetFlagsByObject retrieves all flags for a specific object
func (*ModerationRepository) GetModerationDecision ¶
func (r *ModerationRepository) GetModerationDecision(_ context.Context, objectID string) (*storage.ModerationDecision, error)
GetModerationDecision retrieves the current decision for an object
func (*ModerationRepository) GetModerationDecisionsByModerator ¶
func (r *ModerationRepository) GetModerationDecisionsByModerator(_ context.Context, moderatorUsername string, limit int) ([]*models.ModerationReview, error)
GetModerationDecisionsByModerator retrieves moderation decisions made by a specific moderator
func (*ModerationRepository) GetModerationEvent ¶
func (r *ModerationRepository) GetModerationEvent(_ context.Context, eventID string) (*storage.ModerationEvent, error)
GetModerationEvent retrieves a moderation event by ID
func (*ModerationRepository) GetModerationEvents ¶
func (r *ModerationRepository) GetModerationEvents(_ context.Context, filter *storage.ModerationEventFilter, limit int, cursor string) ([]*storage.ModerationEvent, string, error)
GetModerationEvents retrieves moderation events with optional filters
func (*ModerationRepository) GetModerationEventsByActor ¶
func (r *ModerationRepository) GetModerationEventsByActor(_ context.Context, actorID string, limit int, cursor string) ([]*storage.ModerationEvent, string, error)
GetModerationEventsByActor retrieves all moderation events created by an actor
func (*ModerationRepository) GetModerationEventsByObject ¶
func (r *ModerationRepository) GetModerationEventsByObject(_ context.Context, objectID string, limit int, cursor string) ([]*storage.ModerationEvent, string, error)
GetModerationEventsByObject retrieves all moderation events for an object
func (*ModerationRepository) GetModerationHistory ¶
func (r *ModerationRepository) GetModerationHistory(_ context.Context, objectID string) (*storage.ModerationHistory, error)
GetModerationHistory retrieves the complete moderation history for an object
func (*ModerationRepository) GetModerationPattern ¶
func (r *ModerationRepository) GetModerationPattern(_ context.Context, patternID string) (*storage.ModerationPattern, error)
GetModerationPattern retrieves a specific moderation pattern
func (*ModerationRepository) GetModerationPatterns ¶
func (r *ModerationRepository) GetModerationPatterns(_ context.Context, active bool, severity string, limit int) ([]*storage.ModerationPattern, error)
GetModerationPatterns retrieves moderation patterns based on criteria
func (*ModerationRepository) GetModerationQueue ¶
func (r *ModerationRepository) GetModerationQueue(_ context.Context, filter *storage.ModerationFilter) ([]*storage.ModerationQueueItem, error)
GetModerationQueue retrieves pending moderation events
func (*ModerationRepository) GetModerationQueueCount ¶
func (r *ModerationRepository) GetModerationQueueCount(_ context.Context) (int, error)
GetModerationQueueCount returns the count of items in the moderation queue
func (*ModerationRepository) GetModerationQueuePaginated ¶
func (r *ModerationRepository) GetModerationQueuePaginated(_ context.Context, limit int, cursor string) ([]*storage.ModerationQueueItem, string, error)
GetModerationQueuePaginated retrieves pending moderation events with pagination
func (*ModerationRepository) GetModerationReviews ¶
func (r *ModerationRepository) GetModerationReviews(_ context.Context, eventID string) ([]*storage.ModerationReview, error)
GetModerationReviews retrieves all reviews for a moderation event
func (*ModerationRepository) GetOpenReportsCount ¶
func (r *ModerationRepository) GetOpenReportsCount(_ context.Context) (int, error)
GetOpenReportsCount returns the count of open reports
func (*ModerationRepository) GetPendingFlags ¶
func (r *ModerationRepository) GetPendingFlags(_ context.Context, limit int, cursor string) ([]*storage.Flag, string, error)
GetPendingFlags retrieves all pending flags
func (*ModerationRepository) GetPendingModerationCount ¶
func (r *ModerationRepository) GetPendingModerationCount(_ context.Context, moderatorID string) (int, error)
GetPendingModerationCount returns the count of pending moderation tasks for a specific moderator
func (*ModerationRepository) GetReportStats ¶
func (r *ModerationRepository) GetReportStats(_ context.Context, username string) (*storage.ReportStats, error)
GetReportStats retrieves reporting statistics for a user
func (*ModerationRepository) GetReportedStatuses ¶
func (r *ModerationRepository) GetReportedStatuses(_ context.Context, reportID string) ([]any, error)
GetReportedStatuses retrieves statuses associated with a report
func (*ModerationRepository) GetReportsByStatus ¶
func (r *ModerationRepository) GetReportsByStatus(_ context.Context, status storage.ReportStatus, limit int, cursor string) ([]*storage.Report, string, error)
GetReportsByStatus retrieves reports with a specific status
func (*ModerationRepository) GetReportsByTarget ¶
func (r *ModerationRepository) GetReportsByTarget(_ context.Context, targetAccountID string, limit int, cursor string) ([]*storage.Report, string, error)
GetReportsByTarget retrieves reports targeting a specific account
func (*ModerationRepository) GetReviewQueue ¶
func (r *ModerationRepository) GetReviewQueue(_ context.Context, filters map[string]interface{}) ([]*models.ModerationReviewQueue, error)
GetReviewQueue retrieves review queue items with filtering
func (*ModerationRepository) GetReviewerStats ¶
func (r *ModerationRepository) GetReviewerStats(_ context.Context, reviewerID string) (*storage.ReviewerStats, error)
GetReviewerStats retrieves statistics for a reviewer
func (*ModerationRepository) GetUserReports ¶
func (r *ModerationRepository) GetUserReports(_ context.Context, username string, limit int, cursor string) ([]*storage.Report, string, error)
GetUserReports retrieves all reports created by a user
func (*ModerationRepository) IncrementFalseReports ¶
func (r *ModerationRepository) IncrementFalseReports(_ context.Context, username string) error
IncrementFalseReports increments the false report count for a user
func (*ModerationRepository) RecordPatternMatch ¶
func (r *ModerationRepository) RecordPatternMatch(_ context.Context, patternID string, matched bool, timestamp time.Time) error
RecordPatternMatch records a moderation pattern match for analytics
func (*ModerationRepository) StoreAnalysisResult ¶
func (r *ModerationRepository) StoreAnalysisResult(_ context.Context, analysisData map[string]interface{}) error
StoreAnalysisResult stores detailed analysis results for audit/appeals
func (*ModerationRepository) StoreDecision ¶
func (r *ModerationRepository) StoreDecision(_ context.Context, decisionData map[string]interface{}) error
StoreDecision stores a moderation decision with enforcement tracking
func (*ModerationRepository) StoreModerationDecision ¶
func (r *ModerationRepository) StoreModerationDecision(ctx context.Context, decision *storage.ModerationDecision) error
StoreModerationDecision stores a moderation decision (alias for CreateModerationDecision)
func (*ModerationRepository) UnassignReport ¶
func (r *ModerationRepository) UnassignReport(_ context.Context, reportID string) error
UnassignReport removes assignment from a report
func (*ModerationRepository) UpdateEnforcementStatus ¶
func (r *ModerationRepository) UpdateEnforcementStatus(_ context.Context, contentID, status string) error
UpdateEnforcementStatus updates the enforcement status of a decision
func (*ModerationRepository) UpdateFilter ¶
func (r *ModerationRepository) UpdateFilter(_ context.Context, filterID string, updates map[string]any) error
UpdateFilter updates a filter
func (*ModerationRepository) UpdateFilterKeyword ¶
func (r *ModerationRepository) UpdateFilterKeyword(_ context.Context, keywordID string, updates map[string]any) error
UpdateFilterKeyword updates a filter keyword
func (*ModerationRepository) UpdateFlagStatus ¶
func (r *ModerationRepository) UpdateFlagStatus(_ context.Context, id string, status storage.FlagStatus, reviewedBy string, reviewNote string) error
UpdateFlagStatus updates the status of a flag
func (*ModerationRepository) UpdateModerationDecision ¶
func (r *ModerationRepository) UpdateModerationDecision(_ context.Context, contentID string, review *storage.ModerationReview) error
UpdateModerationDecision updates a moderation decision based on a review
func (*ModerationRepository) UpdateModerationPattern ¶
func (r *ModerationRepository) UpdateModerationPattern(_ context.Context, pattern *storage.ModerationPattern) error
UpdateModerationPattern updates an existing moderation pattern
func (*ModerationRepository) UpdateReportStatus ¶
func (r *ModerationRepository) UpdateReportStatus(_ context.Context, id string, status storage.ReportStatus, actionTaken string, moderatorID string) error
UpdateReportStatus updates the status of a report
type NotificationRepository ¶
type NotificationRepository struct {
// contains filtered or unexported fields
}
NotificationRepository is a thread-safe in-memory implementation of interfaces.NotificationRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewNotificationRepository ¶
func NewNotificationRepository() *NotificationRepository
NewNotificationRepository creates a new in-memory notification repository
func (*NotificationRepository) ClearOldNotifications ¶
func (r *NotificationRepository) ClearOldNotifications(_ context.Context, username string, olderThan time.Time) (int, error)
ClearOldNotifications clears old notifications for a user
func (*NotificationRepository) ConsolidateNotifications ¶
func (r *NotificationRepository) ConsolidateNotifications(_ context.Context, groupKey string) error
ConsolidateNotifications consolidates notifications by group key
func (*NotificationRepository) CreateNotification ¶
func (r *NotificationRepository) CreateNotification(_ context.Context, notification *models.Notification) error
CreateNotification creates a new notification
func (*NotificationRepository) CreateNotifications ¶
func (r *NotificationRepository) CreateNotifications(ctx context.Context, notifications []*models.Notification) error
CreateNotifications creates multiple notifications efficiently
func (*NotificationRepository) DeleteExpiredNotifications ¶
func (r *NotificationRepository) DeleteExpiredNotifications(_ context.Context, expiredBefore time.Time) (int64, error)
DeleteExpiredNotifications deletes notifications that have expired
func (*NotificationRepository) DeleteNotification ¶
func (r *NotificationRepository) DeleteNotification(_ context.Context, notificationID string) error
DeleteNotification deletes a notification
func (*NotificationRepository) DeleteNotificationsByObject ¶
func (r *NotificationRepository) DeleteNotificationsByObject(_ context.Context, objectID string) error
DeleteNotificationsByObject deletes all notifications related to a specific object
func (*NotificationRepository) DeleteNotificationsByType ¶
func (r *NotificationRepository) DeleteNotificationsByType(_ context.Context, userID, notificationType string) error
DeleteNotificationsByType deletes notifications by type for a user
func (*NotificationRepository) GetNotification ¶
func (r *NotificationRepository) GetNotification(_ context.Context, notificationID string) (*models.Notification, error)
GetNotification retrieves a notification by ID
func (*NotificationRepository) GetNotificationCountsByType ¶
func (r *NotificationRepository) GetNotificationCountsByType(_ context.Context, userID string) (map[string]int64, error)
GetNotificationCountsByType returns notification counts by type
func (*NotificationRepository) GetNotificationGroups ¶
func (r *NotificationRepository) GetNotificationGroups(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
GetNotificationGroups retrieves notification groups for a user with pagination
func (*NotificationRepository) GetNotificationPreferences ¶
func (r *NotificationRepository) GetNotificationPreferences(_ context.Context, userID string) (*models.NotificationPreferences, error)
GetNotificationPreferences gets notification preferences for a user
func (*NotificationRepository) GetNotificationsAdvanced ¶
func (r *NotificationRepository) GetNotificationsAdvanced(_ context.Context, userID string, filters map[string]interface{}, pagination interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
GetNotificationsAdvanced retrieves notifications with advanced filtering options
func (*NotificationRepository) GetNotificationsByType ¶
func (r *NotificationRepository) GetNotificationsByType(_ context.Context, userID, notificationType string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
GetNotificationsByType retrieves notifications by type with pagination
func (*NotificationRepository) GetNotificationsFiltered ¶
func (r *NotificationRepository) GetNotificationsFiltered(ctx context.Context, username string, filter map[string]interface{}) ([]*models.Notification, string, error)
GetNotificationsFiltered gets notifications with a filter
func (*NotificationRepository) GetPendingPushNotifications ¶
func (r *NotificationRepository) GetPendingPushNotifications(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
GetPendingPushNotifications retrieves notifications that need push delivery
func (*NotificationRepository) GetUnreadNotificationCount ¶
func (r *NotificationRepository) GetUnreadNotificationCount(_ context.Context, userID string) (int64, error)
GetUnreadNotificationCount returns the count of unread notifications
func (*NotificationRepository) GetUnreadNotifications ¶
func (r *NotificationRepository) GetUnreadNotifications(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
GetUnreadNotifications retrieves unread notifications for a user with pagination
func (*NotificationRepository) GetUserNotifications ¶
func (r *NotificationRepository) GetUserNotifications(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Notification], error)
GetUserNotifications retrieves notifications for a user with pagination
func (*NotificationRepository) MarkAllNotificationsRead ¶
func (r *NotificationRepository) MarkAllNotificationsRead(_ context.Context, userID string) error
MarkAllNotificationsRead marks all notifications as read for a user
func (*NotificationRepository) MarkNotificationPushFailed ¶
func (r *NotificationRepository) MarkNotificationPushFailed(_ context.Context, notificationID, errorMsg string) error
MarkNotificationPushFailed marks a notification's push as failed
func (*NotificationRepository) MarkNotificationPushSent ¶
func (r *NotificationRepository) MarkNotificationPushSent(_ context.Context, notificationID string) error
MarkNotificationPushSent marks a notification's push as sent
func (*NotificationRepository) MarkNotificationRead ¶
func (r *NotificationRepository) MarkNotificationRead(_ context.Context, notificationID string) error
MarkNotificationRead marks a notification as read
func (*NotificationRepository) MarkNotificationUnread ¶
func (r *NotificationRepository) MarkNotificationUnread(_ context.Context, notificationID string) error
MarkNotificationUnread marks a notification as unread
func (*NotificationRepository) MarkNotificationsReadByType ¶
func (r *NotificationRepository) MarkNotificationsReadByType(_ context.Context, userID, notificationType string) error
MarkNotificationsReadByType marks notifications as read by type for a user
func (*NotificationRepository) SetDispatcher ¶
func (r *NotificationRepository) SetDispatcher(dispatcher interfaces.NotificationDispatcher)
SetDispatcher sets the notification dispatcher
func (*NotificationRepository) SetNotificationPreference ¶
func (r *NotificationRepository) SetNotificationPreference(ctx context.Context, userID string, preferenceType string, enabled bool) error
SetNotificationPreference sets a specific notification preference
func (*NotificationRepository) UpdateNotification ¶
func (r *NotificationRepository) UpdateNotification(_ context.Context, notification *models.Notification) error
UpdateNotification updates an existing notification
func (*NotificationRepository) UpdateNotificationPreferences ¶
func (r *NotificationRepository) UpdateNotificationPreferences(_ context.Context, prefs *models.NotificationPreferences) error
UpdateNotificationPreferences updates notification preferences for a user
type OAuthRepository ¶
type OAuthRepository struct {
// contains filtered or unexported fields
}
OAuthRepository is a thread-safe in-memory implementation of interfaces.OAuthRepository.
func NewOAuthRepository ¶
func NewOAuthRepository() *OAuthRepository
NewOAuthRepository creates a new in-memory OAuth repository
func (*OAuthRepository) Clear ¶
func (r *OAuthRepository) Clear()
Clear clears all data (test helper)
func (*OAuthRepository) CreateAuthorizationCode ¶
func (r *OAuthRepository) CreateAuthorizationCode(_ context.Context, code *storage.AuthorizationCode) error
CreateAuthorizationCode creates a new OAuth authorization code
func (*OAuthRepository) CreateOAuthClient ¶
func (r *OAuthRepository) CreateOAuthClient(_ context.Context, client *storage.OAuthClient) error
CreateOAuthClient creates a new OAuth client
func (*OAuthRepository) CreateRefreshToken ¶
func (r *OAuthRepository) CreateRefreshToken(_ context.Context, token *storage.RefreshToken) error
CreateRefreshToken creates a new OAuth refresh token
func (*OAuthRepository) DeleteAuthorizationCode ¶
func (r *OAuthRepository) DeleteAuthorizationCode(_ context.Context, code string) error
DeleteAuthorizationCode deletes an OAuth authorization code
func (*OAuthRepository) DeleteExpiredTokens ¶
func (r *OAuthRepository) DeleteExpiredTokens(_ context.Context) error
DeleteExpiredTokens removes expired OAuth tokens
func (*OAuthRepository) DeleteOAuthClient ¶
func (r *OAuthRepository) DeleteOAuthClient(_ context.Context, clientID string) error
DeleteOAuthClient deletes an OAuth client
func (*OAuthRepository) DeleteOAuthState ¶
func (r *OAuthRepository) DeleteOAuthState(_ context.Context, state string) error
DeleteOAuthState deletes OAuth state
func (*OAuthRepository) DeleteRefreshToken ¶
func (r *OAuthRepository) DeleteRefreshToken(_ context.Context, token string) error
DeleteRefreshToken deletes an OAuth refresh token
func (*OAuthRepository) GetAuthorizationCode ¶
func (r *OAuthRepository) GetAuthorizationCode(_ context.Context, code string) (*storage.AuthorizationCode, error)
GetAuthorizationCode retrieves an OAuth authorization code
func (*OAuthRepository) GetOAuthClient ¶
func (r *OAuthRepository) GetOAuthClient(_ context.Context, clientID string) (*storage.OAuthClient, error)
GetOAuthClient retrieves an OAuth client by client ID
func (*OAuthRepository) GetOAuthState ¶
func (r *OAuthRepository) GetOAuthState(_ context.Context, state string) (*storage.OAuthState, error)
GetOAuthState retrieves OAuth state
func (*OAuthRepository) GetRefreshToken ¶
func (r *OAuthRepository) GetRefreshToken(_ context.Context, token string) (*storage.RefreshToken, error)
GetRefreshToken retrieves an OAuth refresh token
func (*OAuthRepository) GetUserAppConsent ¶
func (r *OAuthRepository) GetUserAppConsent(_ context.Context, userID, appID string) (*storage.UserAppConsent, error)
GetUserAppConsent retrieves user consent for an OAuth app
func (*OAuthRepository) ListOAuthClients ¶
func (r *OAuthRepository) ListOAuthClients(_ context.Context, limit int32, cursor string) ([]*storage.OAuthClient, string, error)
ListOAuthClients lists OAuth clients with pagination
func (*OAuthRepository) SaveUserAppConsent ¶
func (r *OAuthRepository) SaveUserAppConsent(_ context.Context, consent *storage.UserAppConsent) error
SaveUserAppConsent saves user consent for an OAuth app
func (*OAuthRepository) StoreOAuthState ¶
func (r *OAuthRepository) StoreOAuthState(_ context.Context, state string, data *storage.OAuthState) error
StoreOAuthState stores OAuth state for CSRF protection
func (*OAuthRepository) UpdateOAuthClient ¶
func (r *OAuthRepository) UpdateOAuthClient(_ context.Context, clientID string, updates map[string]any) error
UpdateOAuthClient updates an existing OAuth client
type ObjectRepository ¶
type ObjectRepository struct {
// contains filtered or unexported fields
}
ObjectRepository is a thread-safe in-memory implementation of interfaces.ObjectRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewObjectRepository ¶
func NewObjectRepository() *ObjectRepository
NewObjectRepository creates a new in-memory object repository
func (*ObjectRepository) AddToCollection ¶
func (r *ObjectRepository) AddToCollection(_ context.Context, collection string, item *storage.CollectionItem) error
AddToCollection adds an item to a collection
func (*ObjectRepository) CleanupExpiredTombstones ¶
CleanupExpiredTombstones removes tombstones that have exceeded their TTL
func (*ObjectRepository) CountCollectionItems ¶
CountCollectionItems returns the count of items in a collection
func (*ObjectRepository) CountObjectReplies ¶
CountObjectReplies counts the number of replies to an object
func (*ObjectRepository) CountQuotes ¶
CountQuotes counts the number of quotes for a specific note
func (*ObjectRepository) CountReplies ¶
CountReplies counts the number of replies to an object using GSI6
func (*ObjectRepository) CountWithdrawnQuotes ¶
CountWithdrawnQuotes counts the number of withdrawn quotes for a specific note
func (*ObjectRepository) CreateObject ¶
func (r *ObjectRepository) CreateObject(_ context.Context, object any) error
CreateObject stores a generic ActivityPub object
func (*ObjectRepository) CreateQuoteRelationship ¶
func (r *ObjectRepository) CreateQuoteRelationship(_ context.Context, quote *storage.QuoteRelationship) error
CreateQuoteRelationship creates a new quote relationship between notes
func (*ObjectRepository) CreateTombstone ¶
CreateTombstone creates a tombstone for a deleted object
func (*ObjectRepository) CreateUpdateHistory ¶
func (r *ObjectRepository) CreateUpdateHistory(_ context.Context, history *storage.UpdateHistory) error
CreateUpdateHistory creates a new update history entry for an object
func (*ObjectRepository) DeleteObject ¶
func (r *ObjectRepository) DeleteObject(_ context.Context, objectID string) error
DeleteObject deletes an object by ID
func (*ObjectRepository) GetCollectionItems ¶
func (r *ObjectRepository) GetCollectionItems(_ context.Context, collection string, limit int, cursor string) ([]*storage.CollectionItem, string, error)
GetCollectionItems retrieves items from a collection with pagination
func (*ObjectRepository) GetMissingReplies ¶
func (r *ObjectRepository) GetMissingReplies(_ context.Context, statusID string) ([]*storage.StatusSearchResult, error)
GetMissingReplies returns a list of known missing replies in a thread
func (*ObjectRepository) GetObjectHistory ¶
func (r *ObjectRepository) GetObjectHistory(ctx context.Context, objectID string) ([]*storage.UpdateHistory, error)
GetObjectHistory retrieves the version history of an object
func (*ObjectRepository) GetObjectsByActor ¶
func (r *ObjectRepository) GetObjectsByActor(_ context.Context, actorID string, cursor string, limit int) ([]any, string, error)
GetObjectsByActor retrieves objects created by a specific actor
func (*ObjectRepository) GetQuoteType ¶
GetQuoteType returns the quote type for a status
func (*ObjectRepository) GetQuotesForNote ¶
func (r *ObjectRepository) GetQuotesForNote(_ context.Context, noteID string, limit int, cursor string) ([]*storage.QuoteRelationship, string, error)
GetQuotesForNote retrieves quotes for a specific note with pagination
func (*ObjectRepository) GetQuotesOfStatus ¶
func (r *ObjectRepository) GetQuotesOfStatus(_ context.Context, statusID string, limit int) ([]*storage.StatusSearchResult, error)
GetQuotesOfStatus retrieves quotes of a specific status
func (*ObjectRepository) GetReplies ¶
func (r *ObjectRepository) GetReplies(_ context.Context, objectID string, limit int, cursor string) ([]any, string, error)
GetReplies retrieves replies to an object with pagination
func (*ObjectRepository) GetReplyCount ¶
GetReplyCount gets the reply count for a status
func (*ObjectRepository) GetStatusReplyCount ¶
GetStatusReplyCount counts replies to a specific status
func (*ObjectRepository) GetThreadContext ¶
func (r *ObjectRepository) GetThreadContext(_ context.Context, statusID string) (*storage.ThreadContext, error)
GetThreadContext retrieves the thread context for a status with full hierarchy
func (*ObjectRepository) GetTombstone ¶
func (r *ObjectRepository) GetTombstone(_ context.Context, objectID string) (*models.Tombstone, error)
GetTombstone retrieves a tombstone by object ID
func (*ObjectRepository) GetTombstonesByActor ¶
func (r *ObjectRepository) GetTombstonesByActor(_ context.Context, actorID string, limit int, cursor string) ([]*models.Tombstone, string, error)
GetTombstonesByActor retrieves all tombstones created by a specific actor
func (*ObjectRepository) GetTombstonesByType ¶
func (r *ObjectRepository) GetTombstonesByType(_ context.Context, formerType string, limit int, cursor string) ([]*models.Tombstone, string, error)
GetTombstonesByType retrieves tombstones by their former type
func (*ObjectRepository) GetUpdateHistory ¶
func (r *ObjectRepository) GetUpdateHistory(_ context.Context, objectID string, limit int) ([]*storage.UpdateHistory, error)
GetUpdateHistory retrieves update history for an object
func (*ObjectRepository) GetUserStatusCount ¶
GetUserStatusCount counts the number of statuses by a user
func (*ObjectRepository) IncrementReplyCount ¶
func (r *ObjectRepository) IncrementReplyCount(_ context.Context, objectID string) error
IncrementReplyCount increments the reply count for an object
func (*ObjectRepository) IsInCollection ¶
func (r *ObjectRepository) IsInCollection(_ context.Context, collection, itemID string) (bool, error)
IsInCollection checks if an item is in a collection
func (*ObjectRepository) IsQuoteAllowed ¶
IsQuoteAllowed checks if a quote is allowed for a status by a quoter
func (*ObjectRepository) IsTombstoned ¶
IsTombstoned checks if an object has been tombstoned (deleted)
func (*ObjectRepository) IsWithdrawnFromQuotes ¶
IsWithdrawnFromQuotes checks if a status is withdrawn from quotes
func (*ObjectRepository) MarkThreadAsSynced ¶
func (r *ObjectRepository) MarkThreadAsSynced(_ context.Context, statusID string) error
MarkThreadAsSynced marks a thread as successfully synced
func (*ObjectRepository) RemoveFromCollection ¶
func (r *ObjectRepository) RemoveFromCollection(_ context.Context, collection, itemID string) error
RemoveFromCollection removes an item from a collection
func (*ObjectRepository) ReplaceObjectWithTombstone ¶
func (r *ObjectRepository) ReplaceObjectWithTombstone(_ context.Context, objectID, formerType, deletedBy string) error
ReplaceObjectWithTombstone atomically replaces an object with a tombstone
func (*ObjectRepository) SetMissingReplies ¶
func (r *ObjectRepository) SetMissingReplies(statusID string, replyIDs []string)
SetMissingReplies sets missing replies for a status (test helper)
func (*ObjectRepository) SetThreadContext ¶
func (r *ObjectRepository) SetThreadContext(statusID string, ctx *storage.ThreadContext)
SetThreadContext sets thread context for a status (test helper)
func (*ObjectRepository) SyncMissingRepliesFromRemote ¶
func (r *ObjectRepository) SyncMissingRepliesFromRemote(_ context.Context, statusID string) ([]*storage.StatusSearchResult, error)
SyncMissingRepliesFromRemote syncs missing replies from remote servers
func (*ObjectRepository) SyncThreadFromRemote ¶
func (r *ObjectRepository) SyncThreadFromRemote(_ context.Context, statusID string) (*storage.StatusSearchResult, error)
SyncThreadFromRemote syncs a thread from a remote server
func (*ObjectRepository) TombstoneObject ¶
func (r *ObjectRepository) TombstoneObject(_ context.Context, objectID string, deletedBy string) error
TombstoneObject marks an object as deleted by creating a tombstone
func (*ObjectRepository) UpdateObject ¶
func (r *ObjectRepository) UpdateObject(_ context.Context, object any) error
UpdateObject updates an existing object
func (*ObjectRepository) UpdateObjectWithHistory ¶
func (r *ObjectRepository) UpdateObjectWithHistory(_ context.Context, object any, updatedBy string) error
UpdateObjectWithHistory updates an object and tracks the edit history
func (*ObjectRepository) UpdateQuotePermissions ¶
func (r *ObjectRepository) UpdateQuotePermissions(_ context.Context, statusID string, permissions *storage.QuotePermissions) error
UpdateQuotePermissions updates the quote permissions for a status
func (*ObjectRepository) WithdrawQuote ¶
func (r *ObjectRepository) WithdrawQuote(_ context.Context, quoteNoteID string) error
WithdrawQuote withdraws a quote by marking it as withdrawn
func (*ObjectRepository) WithdrawStatusFromQuotes ¶
func (r *ObjectRepository) WithdrawStatusFromQuotes(_ context.Context, statusID string) error
WithdrawStatusFromQuotes withdraws a status from being quoted with proper cascade effects
type PollRepository ¶
type PollRepository struct {
// contains filtered or unexported fields
}
PollRepository is a thread-safe in-memory implementation of interfaces.PollRepository.
func NewPollRepository ¶
func NewPollRepository() *PollRepository
NewPollRepository creates a new in-memory poll repository
func (*PollRepository) CreatePoll ¶
CreatePoll creates a new poll
func (*PollRepository) GetPollByStatusID ¶
func (r *PollRepository) GetPollByStatusID(_ context.Context, statusID string) (*storage.Poll, error)
GetPollByStatusID retrieves a poll by status ID
func (*PollRepository) GetPollCount ¶
func (r *PollRepository) GetPollCount() int
GetPollCount returns the number of polls (test helper)
func (*PollRepository) GetPollVotes ¶
GetPollVotes retrieves all votes for a poll
func (*PollRepository) GetVoteCount ¶
func (r *PollRepository) GetVoteCount() int
GetVoteCount returns the total number of votes (test helper)
func (*PollRepository) HasUserVoted ¶
func (r *PollRepository) HasUserVoted(_ context.Context, pollID string, userID string) (bool, []int, error)
HasUserVoted checks if a user has voted on a poll
func (*PollRepository) VoteOnPoll ¶
func (r *PollRepository) VoteOnPoll(_ context.Context, pollID string, voterID string, choices []int) error
VoteOnPoll records a vote on a poll
type PublicationMemberRepository ¶
type PublicationMemberRepository struct {
// contains filtered or unexported fields
}
PublicationMemberRepository is a thread-safe in-memory implementation of interfaces.PublicationMemberRepository.
func NewPublicationMemberRepository ¶
func NewPublicationMemberRepository() *PublicationMemberRepository
NewPublicationMemberRepository creates a new in-memory publication member repository
func (*PublicationMemberRepository) Clear ¶
func (r *PublicationMemberRepository) Clear()
Clear clears all data (test helper)
func (*PublicationMemberRepository) CreateMember ¶
func (r *PublicationMemberRepository) CreateMember(_ context.Context, member *models.PublicationMember) error
CreateMember adds a new member to a publication
func (*PublicationMemberRepository) DeleteMember ¶
func (r *PublicationMemberRepository) DeleteMember(_ context.Context, publicationID, userID string) error
DeleteMember removes a member from a publication
func (*PublicationMemberRepository) GetMember ¶
func (r *PublicationMemberRepository) GetMember(_ context.Context, publicationID, userID string) (*models.PublicationMember, error)
GetMember retrieves a member by publication ID and user ID
func (*PublicationMemberRepository) ListMembers ¶
func (r *PublicationMemberRepository) ListMembers(_ context.Context, publicationID string) ([]*models.PublicationMember, error)
ListMembers lists all members of a publication
func (*PublicationMemberRepository) ListMembershipsForUserPaginated ¶
func (r *PublicationMemberRepository) ListMembershipsForUserPaginated(_ context.Context, userID string, limit int, cursor string) ([]*models.PublicationMember, string, error)
ListMembershipsForUserPaginated lists publications a user is a member of with pagination
func (*PublicationMemberRepository) Update ¶
func (r *PublicationMemberRepository) Update(_ context.Context, member *models.PublicationMember) error
Update updates an existing publication member
type PublicationRepository ¶
type PublicationRepository struct {
// contains filtered or unexported fields
}
PublicationRepository is a thread-safe in-memory implementation of interfaces.PublicationRepository.
func NewPublicationRepository ¶
func NewPublicationRepository() *PublicationRepository
NewPublicationRepository creates a new in-memory publication repository
func (*PublicationRepository) Clear ¶
func (r *PublicationRepository) Clear()
Clear clears all data (test helper)
func (*PublicationRepository) CreatePublication ¶
func (r *PublicationRepository) CreatePublication(_ context.Context, publication *models.Publication) error
CreatePublication creates a new publication
func (*PublicationRepository) Delete ¶
func (r *PublicationRepository) Delete(_ context.Context, pk, _ string) error
Delete deletes a publication by PK and SK
func (*PublicationRepository) GetDB ¶
func (r *PublicationRepository) GetDB() dynamormcore.DB
GetDB returns the underlying DynamoDB connection. For in-memory implementation, this returns nil.
func (*PublicationRepository) GetPublication ¶
func (r *PublicationRepository) GetPublication(_ context.Context, id string) (*models.Publication, error)
GetPublication retrieves a publication by ID
func (*PublicationRepository) Update ¶
func (r *PublicationRepository) Update(_ context.Context, publication *models.Publication) error
Update updates an existing publication
type PushSubscriptionRepository ¶
type PushSubscriptionRepository struct {
// contains filtered or unexported fields
}
PushSubscriptionRepository is a thread-safe in-memory implementation of interfaces.PushSubscriptionRepository.
func NewPushSubscriptionRepository ¶
func NewPushSubscriptionRepository() *PushSubscriptionRepository
NewPushSubscriptionRepository creates a new in-memory push subscription repository
func (*PushSubscriptionRepository) Clear ¶
func (r *PushSubscriptionRepository) Clear()
Clear clears all data (test helper)
func (*PushSubscriptionRepository) CreatePushSubscription ¶
func (r *PushSubscriptionRepository) CreatePushSubscription(_ context.Context, username string, subscription *storage.PushSubscription) error
CreatePushSubscription creates a new push subscription
func (*PushSubscriptionRepository) DeleteAllPushSubscriptions ¶
func (r *PushSubscriptionRepository) DeleteAllPushSubscriptions(_ context.Context, username string) error
DeleteAllPushSubscriptions removes all push subscriptions for a user
func (*PushSubscriptionRepository) DeletePushSubscription ¶
func (r *PushSubscriptionRepository) DeletePushSubscription(_ context.Context, username, subscriptionID string) error
DeletePushSubscription removes a push subscription
func (*PushSubscriptionRepository) GetPushSubscription ¶
func (r *PushSubscriptionRepository) GetPushSubscription(_ context.Context, username, subscriptionID string) (*storage.PushSubscription, error)
GetPushSubscription retrieves a push subscription
func (*PushSubscriptionRepository) GetSubscriptionCount ¶
func (r *PushSubscriptionRepository) GetSubscriptionCount() int
GetSubscriptionCount returns the number of subscriptions (test helper)
func (*PushSubscriptionRepository) GetUserPushSubscriptions ¶
func (r *PushSubscriptionRepository) GetUserPushSubscriptions(_ context.Context, username string) ([]*storage.PushSubscription, error)
GetUserPushSubscriptions retrieves all push subscriptions for a user
func (*PushSubscriptionRepository) GetVAPIDKeys ¶
GetVAPIDKeys retrieves the VAPID keys
func (*PushSubscriptionRepository) HasVAPIDKeys ¶
func (r *PushSubscriptionRepository) HasVAPIDKeys() bool
HasVAPIDKeys returns whether VAPID keys are set (test helper)
func (*PushSubscriptionRepository) SetVAPIDKeys ¶
SetVAPIDKeys sets the VAPID keys
func (*PushSubscriptionRepository) UpdatePushSubscription ¶
func (r *PushSubscriptionRepository) UpdatePushSubscription(_ context.Context, username, subscriptionID string, alerts storage.PushSubscriptionAlerts) error
UpdatePushSubscription updates a push subscription's alerts
type QuoteRepository ¶
type QuoteRepository struct {
// contains filtered or unexported fields
}
QuoteRepository is a thread-safe in-memory implementation of interfaces.QuoteRepository.
func NewQuoteRepository ¶
func NewQuoteRepository() *QuoteRepository
NewQuoteRepository creates a new in-memory quote repository
func (*QuoteRepository) Clear ¶
func (r *QuoteRepository) Clear()
Clear clears all data (test helper)
func (*QuoteRepository) CreateQuotePermissions ¶
func (r *QuoteRepository) CreateQuotePermissions(_ context.Context, permissions *models.QuotePermissions) error
CreateQuotePermissions creates new quote permissions for a user
func (*QuoteRepository) CreateQuoteRelationship ¶
func (r *QuoteRepository) CreateQuoteRelationship(_ context.Context, relationship *models.QuoteRelationship) error
CreateQuoteRelationship creates a new quote relationship
func (*QuoteRepository) DecrementQuoteCount ¶
func (r *QuoteRepository) DecrementQuoteCount(_ context.Context, statusID string) error
DecrementQuoteCount decrements the quote count for a status
func (*QuoteRepository) DeleteQuotePermissions ¶
func (r *QuoteRepository) DeleteQuotePermissions(_ context.Context, username string) error
DeleteQuotePermissions deletes quote permissions for a user
func (*QuoteRepository) DeleteQuoteRelationship ¶
func (r *QuoteRepository) DeleteQuoteRelationship(_ context.Context, quoteStatusID, targetStatusID string) error
DeleteQuoteRelationship deletes a quote relationship
func (*QuoteRepository) GetQuoteCount ¶
GetQuoteCount gets the total number of quotes for a status
func (*QuoteRepository) GetQuotePermissions ¶
func (r *QuoteRepository) GetQuotePermissions(_ context.Context, username string) (*models.QuotePermissions, error)
GetQuotePermissions retrieves quote permissions for a user
func (*QuoteRepository) GetQuoteRelationship ¶
func (r *QuoteRepository) GetQuoteRelationship(_ context.Context, quoteStatusID, targetStatusID string) (*models.QuoteRelationship, error)
GetQuoteRelationship retrieves a quote relationship by quoter and target note IDs
func (*QuoteRepository) GetQuotesByUser ¶
func (r *QuoteRepository) GetQuotesByUser(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.QuoteRelationship], error)
GetQuotesByUser retrieves quotes created by a specific user
func (*QuoteRepository) GetQuotesForStatus ¶
func (r *QuoteRepository) GetQuotesForStatus(_ context.Context, statusID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.QuoteRelationship], error)
GetQuotesForStatus retrieves quotes for a given status
func (*QuoteRepository) IncrementQuoteCount ¶
func (r *QuoteRepository) IncrementQuoteCount(_ context.Context, statusID string) error
IncrementQuoteCount increments the quote count for a status
func (*QuoteRepository) UpdateQuotePermissions ¶
func (r *QuoteRepository) UpdateQuotePermissions(_ context.Context, permissions *models.QuotePermissions) error
UpdateQuotePermissions updates existing quote permissions
func (*QuoteRepository) UpdateQuoteRelationship ¶
func (r *QuoteRepository) UpdateQuoteRelationship(_ context.Context, relationship *models.QuoteRelationship) error
UpdateQuoteRelationship updates an existing quote relationship
func (*QuoteRepository) WithdrawQuotes ¶
WithdrawQuotes withdraws all quotes of a note created by a specific user
type RateLimitRepository ¶
type RateLimitRepository struct {
// contains filtered or unexported fields
}
RateLimitRepository is a thread-safe in-memory implementation of interfaces.RateLimitRepository.
func NewRateLimitRepository ¶
func NewRateLimitRepository() *RateLimitRepository
NewRateLimitRepository creates a new in-memory rate limit repository
func (*RateLimitRepository) BlockDomain ¶
func (r *RateLimitRepository) BlockDomain(domain string, until time.Time)
BlockDomain blocks a domain until the specified time (test helper)
func (*RateLimitRepository) BlockUser ¶
func (r *RateLimitRepository) BlockUser(userID string, until time.Time)
BlockUser blocks a user until the specified time (test helper)
func (*RateLimitRepository) CheckAPIRateLimit ¶
func (r *RateLimitRepository) CheckAPIRateLimit(_ context.Context, userID, endpoint string, limit int, window time.Duration) error
CheckAPIRateLimit checks and updates API rate limiting
func (*RateLimitRepository) CheckCommunityNoteRateLimit ¶
func (r *RateLimitRepository) CheckCommunityNoteRateLimit(_ context.Context, userID string, limit int) (bool, int, error)
CheckCommunityNoteRateLimit checks if a user can create more community notes today
func (*RateLimitRepository) CheckFederationRateLimit ¶
func (r *RateLimitRepository) CheckFederationRateLimit(_ context.Context, domain, endpoint string, limit int, window time.Duration) error
CheckFederationRateLimit checks and updates federation rate limiting
func (*RateLimitRepository) Clear ¶
func (r *RateLimitRepository) Clear()
Clear clears all data (test helper)
func (*RateLimitRepository) ClearLoginAttempts ¶
func (r *RateLimitRepository) ClearLoginAttempts(_ context.Context, identifier string) error
ClearLoginAttempts clears all login attempts for an identifier
func (*RateLimitRepository) GetAPIRateLimitInfo ¶
func (r *RateLimitRepository) GetAPIRateLimitInfo(_ context.Context, userID, endpoint string, limit int, window time.Duration) (remaining int, resetTime time.Time, err error)
GetAPIRateLimitInfo returns current rate limit info
func (*RateLimitRepository) GetFederationRateLimitInfo ¶
func (r *RateLimitRepository) GetFederationRateLimitInfo(_ context.Context, domain, endpoint string, limit int, window time.Duration) (remaining int, resetTime time.Time, err error)
GetFederationRateLimitInfo returns current federation rate limit info
func (*RateLimitRepository) GetLoginAttemptCount ¶
func (r *RateLimitRepository) GetLoginAttemptCount(_ context.Context, identifier string, since time.Time) (int, error)
GetLoginAttemptCount returns the number of login attempts since the given time
func (*RateLimitRepository) GetViolationCount ¶
func (r *RateLimitRepository) GetViolationCount(_ context.Context, userID, domain string, _ time.Duration) (int, error)
GetViolationCount returns the number of violations in a time period
func (*RateLimitRepository) IsDomainBlocked ¶
func (r *RateLimitRepository) IsDomainBlocked(_ context.Context, domain string) (bool, time.Time, error)
IsDomainBlocked checks if a federation domain is currently blocked
func (*RateLimitRepository) IsRateLimited ¶
func (r *RateLimitRepository) IsRateLimited(_ context.Context, identifier string) (bool, time.Time, error)
IsRateLimited checks if an identifier is currently rate limited
func (*RateLimitRepository) IsUserBlocked ¶
func (r *RateLimitRepository) IsUserBlocked(_ context.Context, userID string) (bool, time.Time, error)
IsUserBlocked checks if a user is currently blocked
func (*RateLimitRepository) RecordLoginAttempt ¶
func (r *RateLimitRepository) RecordLoginAttempt(_ context.Context, identifier string, success bool) error
RecordLoginAttempt records a login attempt for rate limiting
type RecoveryRepository ¶
type RecoveryRepository struct {
// contains filtered or unexported fields
}
RecoveryRepository is a thread-safe in-memory implementation of interfaces.RecoveryRepository.
func NewRecoveryRepository ¶
func NewRecoveryRepository() *RecoveryRepository
NewRecoveryRepository creates a new in-memory recovery repository
func (*RecoveryRepository) Clear ¶
func (r *RecoveryRepository) Clear()
Clear clears all data (test helper)
func (*RecoveryRepository) CountUnusedRecoveryCodes ¶
func (r *RecoveryRepository) CountUnusedRecoveryCodes(_ context.Context, username string) (int, error)
CountUnusedRecoveryCodes counts how many unused recovery codes the user has
func (*RecoveryRepository) DeleteAllRecoveryCodes ¶
func (r *RecoveryRepository) DeleteAllRecoveryCodes(_ context.Context, username string) error
DeleteAllRecoveryCodes deletes all recovery codes for a user
func (*RecoveryRepository) DeleteRecoveryRequest ¶
func (r *RecoveryRepository) DeleteRecoveryRequest(_ context.Context, requestID string) error
DeleteRecoveryRequest deletes a recovery request
func (*RecoveryRepository) DeleteRecoveryToken ¶
func (r *RecoveryRepository) DeleteRecoveryToken(_ context.Context, key string) error
DeleteRecoveryToken deletes a recovery token
func (*RecoveryRepository) DeleteTrustee ¶
func (r *RecoveryRepository) DeleteTrustee(_ context.Context, username, trusteeActorID string) error
DeleteTrustee removes a trustee
func (*RecoveryRepository) GetActiveRecoveryRequests ¶
func (r *RecoveryRepository) GetActiveRecoveryRequests(_ context.Context, username string) ([]*storage.SocialRecoveryRequest, error)
GetActiveRecoveryRequests gets all active recovery requests for a user
func (*RecoveryRepository) GetRecoveryCodes ¶
func (r *RecoveryRepository) GetRecoveryCodes(_ context.Context, username string) ([]*storage.RecoveryCodeItem, error)
GetRecoveryCodes retrieves all recovery codes for a user
func (*RecoveryRepository) GetRecoveryRequest ¶
func (r *RecoveryRepository) GetRecoveryRequest(_ context.Context, requestID string) (*storage.SocialRecoveryRequest, error)
GetRecoveryRequest retrieves a recovery request by ID
func (*RecoveryRepository) GetRecoveryToken ¶
func (r *RecoveryRepository) GetRecoveryToken(_ context.Context, key string) (map[string]any, error)
GetRecoveryToken retrieves a recovery token by key
func (*RecoveryRepository) GetTrustees ¶
func (r *RecoveryRepository) GetTrustees(_ context.Context, username string) ([]*storage.TrusteeConfig, error)
GetTrustees retrieves all trustees for a user
func (*RecoveryRepository) MarkRecoveryCodeUsed ¶
func (r *RecoveryRepository) MarkRecoveryCodeUsed(_ context.Context, username, codeHash string) error
MarkRecoveryCodeUsed marks a recovery code as used
func (*RecoveryRepository) StoreRecoveryCode ¶
func (r *RecoveryRepository) StoreRecoveryCode(_ context.Context, username string, code *storage.RecoveryCodeItem) error
StoreRecoveryCode stores a recovery code
func (*RecoveryRepository) StoreRecoveryRequest ¶
func (r *RecoveryRepository) StoreRecoveryRequest(_ context.Context, request *storage.SocialRecoveryRequest) error
StoreRecoveryRequest stores a social recovery request
func (*RecoveryRepository) StoreRecoveryToken ¶
func (r *RecoveryRepository) StoreRecoveryToken(_ context.Context, key string, data map[string]any) error
StoreRecoveryToken stores a generic recovery token with data
func (*RecoveryRepository) StoreTrustee ¶
func (r *RecoveryRepository) StoreTrustee(_ context.Context, username string, trustee *storage.TrusteeConfig) error
StoreTrustee stores a trustee configuration for social recovery
func (*RecoveryRepository) UpdateRecoveryRequest ¶
func (r *RecoveryRepository) UpdateRecoveryRequest(_ context.Context, request *storage.SocialRecoveryRequest) error
UpdateRecoveryRequest updates a recovery request
func (*RecoveryRepository) UpdateTrusteeConfirmed ¶
func (r *RecoveryRepository) UpdateTrusteeConfirmed(_ context.Context, username, trusteeActorID string, confirmed bool) error
UpdateTrusteeConfirmed updates the confirmed status of a trustee
type RelationshipRepository ¶
type RelationshipRepository struct {
// contains filtered or unexported fields
}
RelationshipRepository is a thread-safe in-memory implementation of interfaces.RelationshipRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewRelationshipRepository ¶
func NewRelationshipRepository() *RelationshipRepository
NewRelationshipRepository creates a new in-memory relationship repository
func (*RelationshipRepository) AcceptFollowRequest ¶
func (r *RelationshipRepository) AcceptFollowRequest(_ context.Context, followerUsername, followingUsername string) error
AcceptFollowRequest accepts a follow request
func (*RelationshipRepository) AddToCollection ¶
func (r *RelationshipRepository) AddToCollection(_ context.Context, collection string, item *storage.CollectionItem) error
AddToCollection adds an item to a collection
func (*RelationshipRepository) BlockUser ¶
func (r *RelationshipRepository) BlockUser(ctx context.Context, blockerID, blockedID string) error
BlockUser blocks another user
func (*RelationshipRepository) ClearCollection ¶
func (r *RelationshipRepository) ClearCollection(_ context.Context, collection string) error
ClearCollection removes all items from a collection
func (*RelationshipRepository) CountBlockedUsers ¶
func (r *RelationshipRepository) CountBlockedUsers(_ context.Context, blockerActor string) (int, error)
CountBlockedUsers returns the number of users blocked by the given actor
func (*RelationshipRepository) CountCollectionItems ¶
func (r *RelationshipRepository) CountCollectionItems(_ context.Context, collection string) (int, error)
CountCollectionItems returns the count of items in a collection
func (*RelationshipRepository) CountFollowers ¶
CountFollowers returns the number of followers for a user
func (*RelationshipRepository) CountFollowing ¶
CountFollowing returns the number of users that a user is following
func (*RelationshipRepository) CountMutedUsers ¶
CountMutedUsers returns the number of users muted by the given actor
func (*RelationshipRepository) CountRelationshipsByDomain ¶
func (r *RelationshipRepository) CountRelationshipsByDomain(_ context.Context, _ string) (followers, following int, err error)
CountRelationshipsByDomain counts follower/following relationships involving a remote domain
func (*RelationshipRepository) CountUsersWhoBlocked ¶
func (r *RelationshipRepository) CountUsersWhoBlocked(_ context.Context, blockedActor string) (int, error)
CountUsersWhoBlocked returns the number of users who have blocked the given actor
func (*RelationshipRepository) CountUsersWhoMuted ¶
func (r *RelationshipRepository) CountUsersWhoMuted(_ context.Context, mutedActor string) (int, error)
CountUsersWhoMuted returns the number of users who have muted the given actor
func (*RelationshipRepository) CreateBlock ¶
func (r *RelationshipRepository) CreateBlock(_ context.Context, blockerActor, blockedActor, _ string) error
CreateBlock creates a new block relationship
func (*RelationshipRepository) CreateEndorsement ¶
func (r *RelationshipRepository) CreateEndorsement(_ context.Context, endorsement *storage.AccountPin) error
CreateEndorsement creates a new endorsement (account pin) relationship
func (*RelationshipRepository) CreateMove ¶
CreateMove creates a new move record
func (*RelationshipRepository) CreateMute ¶
func (r *RelationshipRepository) CreateMute(_ context.Context, muterActor, mutedActor, _ string, hideNotifications bool, duration *time.Duration) error
CreateMute creates a new mute relationship
func (*RelationshipRepository) CreateRelationship ¶
func (r *RelationshipRepository) CreateRelationship(_ context.Context, followerUsername, followingUsername, activityID string) error
CreateRelationship creates a new follow relationship
func (*RelationshipRepository) DeleteBlock ¶
func (r *RelationshipRepository) DeleteBlock(_ context.Context, blockerActor, blockedActor string) error
DeleteBlock removes a block relationship
func (*RelationshipRepository) DeleteEndorsement ¶
func (r *RelationshipRepository) DeleteEndorsement(_ context.Context, endorserID, endorsedID string) error
DeleteEndorsement removes an endorsement (account pin) relationship
func (*RelationshipRepository) DeleteMute ¶
func (r *RelationshipRepository) DeleteMute(_ context.Context, muterActor, mutedActor string) error
DeleteMute removes a mute relationship
func (*RelationshipRepository) DeleteRelationship ¶
func (r *RelationshipRepository) DeleteRelationship(_ context.Context, followerUsername, followingUsername string) error
DeleteRelationship removes a follow relationship
func (*RelationshipRepository) GetAccountMoves ¶
func (r *RelationshipRepository) GetAccountMoves(_ context.Context, actor string) ([]*storage.Move, error)
GetAccountMoves retrieves all moves for an account (as actor)
func (*RelationshipRepository) GetBlock ¶
func (r *RelationshipRepository) GetBlock(_ context.Context, blockerActor, blockedActor string) (*storage.Block, error)
GetBlock retrieves a specific block relationship
func (*RelationshipRepository) GetBlockedUsers ¶
func (r *RelationshipRepository) GetBlockedUsers(_ context.Context, blockerActor string, limit int, _ string) ([]string, string, error)
GetBlockedUsers returns a list of users blocked by the given actor
func (*RelationshipRepository) GetCollectionItems ¶
func (r *RelationshipRepository) GetCollectionItems(_ context.Context, collection string, limit int, _ string) ([]*storage.CollectionItem, string, error)
GetCollectionItems retrieves items from a collection with pagination
func (*RelationshipRepository) GetEndorsements ¶
func (r *RelationshipRepository) GetEndorsements(_ context.Context, userID string, limit int, _ string) ([]*storage.AccountPin, string, error)
GetEndorsements retrieves all endorsements (account pins) for a user
func (*RelationshipRepository) GetFollowRequest ¶
func (r *RelationshipRepository) GetFollowRequest(_ context.Context, followerID, targetID string) (*storage.RelationshipRecord, error)
GetFollowRequest gets a follow request by follower and target IDs
func (*RelationshipRepository) GetFollowerCount ¶
func (r *RelationshipRepository) GetFollowerCount(ctx context.Context, userID string) (int64, error)
GetFollowerCount returns the number of followers for a user (int64 version)
func (*RelationshipRepository) GetFollowers ¶
func (r *RelationshipRepository) GetFollowers(_ context.Context, username string, limit int, _ string) ([]string, string, error)
GetFollowers retrieves all followers for a user
func (*RelationshipRepository) GetFollowing ¶
func (r *RelationshipRepository) GetFollowing(_ context.Context, username string, limit int, _ string) ([]string, string, error)
GetFollowing retrieves all users that a user is following
func (*RelationshipRepository) GetFollowingCount ¶
func (r *RelationshipRepository) GetFollowingCount(ctx context.Context, userID string) (int64, error)
GetFollowingCount returns the number of users that a user is following (int64 version)
func (*RelationshipRepository) GetMoveByTarget ¶
func (r *RelationshipRepository) GetMoveByTarget(_ context.Context, target string) ([]*storage.Move, error)
GetMoveByTarget retrieves all moves to a specific target account
func (*RelationshipRepository) GetMute ¶
func (r *RelationshipRepository) GetMute(_ context.Context, muterActor, mutedActor string) (*storage.Mute, error)
GetMute retrieves a specific mute relationship
func (*RelationshipRepository) GetMutedUsers ¶
func (r *RelationshipRepository) GetMutedUsers(_ context.Context, muterActor string, limit int, _ string) ([]string, string, error)
GetMutedUsers returns a list of users muted by the given actor
func (*RelationshipRepository) GetPendingFollowRequests ¶
func (r *RelationshipRepository) GetPendingFollowRequests(_ context.Context, username string, limit int, _ string) ([]string, string, error)
GetPendingFollowRequests retrieves pending follow requests for a user
func (*RelationshipRepository) GetPendingMoves ¶
func (r *RelationshipRepository) GetPendingMoves(_ context.Context, limit int) ([]*storage.Move, error)
GetPendingMoves retrieves moves that haven't been fully processed
func (*RelationshipRepository) GetRelationship ¶
func (r *RelationshipRepository) GetRelationship(_ context.Context, followerUsername, followingUsername string) (*models.RelationshipRecord, error)
GetRelationship retrieves a specific follow relationship
func (*RelationshipRepository) GetRelationshipNote ¶
func (r *RelationshipRepository) GetRelationshipNote(_ context.Context, userID, targetID string) (*storage.AccountNote, error)
GetRelationshipNote retrieves a private note on an account
func (*RelationshipRepository) GetUsersWhoBlocked ¶
func (r *RelationshipRepository) GetUsersWhoBlocked(_ context.Context, blockedActor string, limit int, _ string) ([]string, string, error)
GetUsersWhoBlocked returns a list of users who have blocked the given actor
func (*RelationshipRepository) GetUsersWhoMuted ¶
func (r *RelationshipRepository) GetUsersWhoMuted(_ context.Context, mutedActor string, limit int, _ string) ([]string, string, error)
GetUsersWhoMuted returns a list of users who have muted the given actor
func (*RelationshipRepository) HasFollowRequest ¶
func (r *RelationshipRepository) HasFollowRequest(_ context.Context, requesterID, targetID string) (bool, error)
HasFollowRequest checks if there's a follow request between two users
func (*RelationshipRepository) HasMovedFrom ¶
func (r *RelationshipRepository) HasMovedFrom(_ context.Context, oldActor, newActor string) (bool, error)
HasMovedFrom checks if newActor has moved from oldActor
func (*RelationshipRepository) HasPendingFollowRequest ¶
func (r *RelationshipRepository) HasPendingFollowRequest(_ context.Context, requesterID, targetID string) (bool, error)
HasPendingFollowRequest checks if there's a pending follow request between two users
func (*RelationshipRepository) IsBlocked ¶
func (r *RelationshipRepository) IsBlocked(_ context.Context, blockerActor, blockedActor string) (bool, error)
IsBlocked checks if one actor has blocked another
func (*RelationshipRepository) IsBlockedBidirectional ¶
func (r *RelationshipRepository) IsBlockedBidirectional(ctx context.Context, actor1, actor2 string) (bool, error)
IsBlockedBidirectional checks if either actor has blocked the other
func (*RelationshipRepository) IsEndorsed ¶
func (r *RelationshipRepository) IsEndorsed(_ context.Context, userID, targetID string) (bool, error)
IsEndorsed checks if a user has endorsed (pinned) a target account
func (*RelationshipRepository) IsFollowing ¶
func (r *RelationshipRepository) IsFollowing(_ context.Context, followerUsername, targetActorID string) (bool, error)
IsFollowing checks if followerUsername is following the targetActorID
func (*RelationshipRepository) IsInCollection ¶
func (r *RelationshipRepository) IsInCollection(_ context.Context, collection, itemID string) (bool, error)
IsInCollection checks if an item is in a collection
func (*RelationshipRepository) IsMuted ¶
func (r *RelationshipRepository) IsMuted(_ context.Context, muterActor, mutedActor string) (bool, error)
IsMuted checks if one actor has muted another
func (*RelationshipRepository) RejectFollowRequest ¶
func (r *RelationshipRepository) RejectFollowRequest(_ context.Context, followerUsername, followingUsername string) error
RejectFollowRequest rejects a follow request
func (*RelationshipRepository) RemoveFromCollection ¶
func (r *RelationshipRepository) RemoveFromCollection(_ context.Context, collection, itemID string) error
RemoveFromCollection removes an item from a collection
func (*RelationshipRepository) SetRelationshipNote ¶
func (r *RelationshipRepository) SetRelationshipNote(userID, targetID, noteText string)
SetRelationshipNote sets a private note on an account (test helper)
func (*RelationshipRepository) UnblockUser ¶
func (r *RelationshipRepository) UnblockUser(ctx context.Context, blockerID, blockedID string) error
UnblockUser removes a block relationship
func (*RelationshipRepository) Unfollow ¶
func (r *RelationshipRepository) Unfollow(ctx context.Context, followerID, followingID string) error
Unfollow removes a follow relationship (wrapper for DeleteRelationship)
func (*RelationshipRepository) UnmuteUser ¶
func (r *RelationshipRepository) UnmuteUser(ctx context.Context, muterID, mutedID string) error
UnmuteUser removes a mute relationship
func (*RelationshipRepository) UpdateMoveProgress ¶
func (r *RelationshipRepository) UpdateMoveProgress(_ context.Context, actor, target string, _ map[string]interface{}) error
UpdateMoveProgress updates move migration progress
func (*RelationshipRepository) UpdateRelationship ¶
func (r *RelationshipRepository) UpdateRelationship(_ context.Context, followerUsername, followingUsername string, updates map[string]interface{}) error
UpdateRelationship updates relationship settings
func (*RelationshipRepository) VerifyMove ¶
func (r *RelationshipRepository) VerifyMove(ctx context.Context, actor, target string) error
VerifyMove marks a move as verified
type RelayRepository ¶
type RelayRepository struct {
// contains filtered or unexported fields
}
RelayRepository is a thread-safe in-memory implementation of interfaces.RelayRepository.
func NewRelayRepository ¶
func NewRelayRepository() *RelayRepository
NewRelayRepository creates a new in-memory relay repository
func (*RelayRepository) Clear ¶
func (r *RelayRepository) Clear()
Clear clears all data (test helper)
func (*RelayRepository) CreateRelay ¶
CreateRelay creates a new relay
func (*RelayRepository) DeleteRelay ¶
func (r *RelayRepository) DeleteRelay(ctx context.Context, relayURL string) error
DeleteRelay removes a relay
func (*RelayRepository) GetActiveRelays ¶
GetActiveRelays retrieves all active relays
func (*RelayRepository) GetAllRelays ¶
func (r *RelayRepository) GetAllRelays(_ context.Context, limit int, cursor string) ([]*storage.RelayInfo, string, error)
GetAllRelays retrieves all relays with pagination
func (*RelayRepository) GetRelay ¶
func (r *RelayRepository) GetRelay(ctx context.Context, relayURL string) (*storage.RelayInfo, error)
GetRelay retrieves a relay by URL
func (*RelayRepository) GetRelayInfo ¶
func (r *RelayRepository) GetRelayInfo(_ context.Context, relayURL string) (*storage.RelayInfo, error)
GetRelayInfo retrieves relay information
func (*RelayRepository) ListRelays ¶
ListRelays retrieves all relays
func (*RelayRepository) RemoveRelayInfo ¶
func (r *RelayRepository) RemoveRelayInfo(_ context.Context, relayURL string) error
RemoveRelayInfo removes relay information
func (*RelayRepository) StoreRelayInfo ¶
StoreRelayInfo stores relay information
func (*RelayRepository) UpdateRelayState ¶
func (r *RelayRepository) UpdateRelayState(_ context.Context, relayURL string, state storage.RelayState) error
UpdateRelayState updates multiple relay fields
func (*RelayRepository) UpdateRelayStatus ¶
UpdateRelayStatus updates the active status of a relay
type RevisionRepository ¶
type RevisionRepository struct {
// contains filtered or unexported fields
}
RevisionRepository is a thread-safe in-memory implementation of interfaces.RevisionRepository.
func NewRevisionRepository ¶
func NewRevisionRepository() *RevisionRepository
NewRevisionRepository creates a new in-memory revision repository
func (*RevisionRepository) Clear ¶
func (r *RevisionRepository) Clear()
Clear clears all data (test helper)
func (*RevisionRepository) CreateRevision ¶
CreateRevision creates a new revision
func (*RevisionRepository) Delete ¶
func (r *RevisionRepository) Delete(_ context.Context, pk, sk string) error
Delete deletes a revision by PK and SK
func (*RevisionRepository) GetRevision ¶
func (r *RevisionRepository) GetRevision(_ context.Context, objectID string, version int) (*models.Revision, error)
GetRevision retrieves a revision by object ID and version
func (*RevisionRepository) ListRevisions ¶
func (r *RevisionRepository) ListRevisions(ctx context.Context, objectID string, limit int) ([]*models.Revision, error)
ListRevisions lists revisions for an object
type ScheduledStatusRepository ¶
type ScheduledStatusRepository struct {
// contains filtered or unexported fields
}
ScheduledStatusRepository is a thread-safe in-memory implementation of interfaces.ScheduledStatusRepository.
func NewScheduledStatusRepository ¶
func NewScheduledStatusRepository() *ScheduledStatusRepository
NewScheduledStatusRepository creates a new in-memory scheduled status repository
func (*ScheduledStatusRepository) Clear ¶
func (r *ScheduledStatusRepository) Clear()
Clear clears all data (test helper)
func (*ScheduledStatusRepository) CreateScheduledStatus ¶
func (r *ScheduledStatusRepository) CreateScheduledStatus(_ context.Context, scheduled *storage.ScheduledStatus) error
CreateScheduledStatus creates a new scheduled status
func (*ScheduledStatusRepository) DeleteScheduledStatus ¶
func (r *ScheduledStatusRepository) DeleteScheduledStatus(_ context.Context, id string) error
DeleteScheduledStatus deletes a scheduled status
func (*ScheduledStatusRepository) GetDueScheduledStatuses ¶
func (r *ScheduledStatusRepository) GetDueScheduledStatuses(_ context.Context, before time.Time, limit int) ([]*storage.ScheduledStatus, error)
GetDueScheduledStatuses retrieves scheduled statuses that are due to be published
func (*ScheduledStatusRepository) GetScheduledStatus ¶
func (r *ScheduledStatusRepository) GetScheduledStatus(_ context.Context, id string) (*storage.ScheduledStatus, error)
GetScheduledStatus retrieves a scheduled status by ID
func (*ScheduledStatusRepository) GetScheduledStatusMedia ¶
func (r *ScheduledStatusRepository) GetScheduledStatusMedia(ctx context.Context, id string) ([]*models.Media, error)
GetScheduledStatusMedia gets media for scheduled status
func (*ScheduledStatusRepository) GetScheduledStatuses ¶
func (r *ScheduledStatusRepository) GetScheduledStatuses(_ context.Context, username string, limit int, cursor string) ([]*storage.ScheduledStatus, string, error)
GetScheduledStatuses retrieves scheduled statuses for a user
func (*ScheduledStatusRepository) MarkScheduledStatusPublished ¶
func (r *ScheduledStatusRepository) MarkScheduledStatusPublished(_ context.Context, id string) error
MarkScheduledStatusPublished marks a scheduled status as published
func (*ScheduledStatusRepository) SetMediaRepository ¶
func (r *ScheduledStatusRepository) SetMediaRepository(mediaRepo interfaces.MediaRepositoryInterface)
SetMediaRepository sets the media repository dependency
func (*ScheduledStatusRepository) UpdateScheduledStatus ¶
func (r *ScheduledStatusRepository) UpdateScheduledStatus(_ context.Context, scheduled *storage.ScheduledStatus) error
UpdateScheduledStatus updates a scheduled status
type SearchRepository ¶
type SearchRepository struct {
// contains filtered or unexported fields
}
SearchRepository is a thread-safe in-memory implementation of interfaces.SearchRepository.
func NewSearchRepository ¶
func NewSearchRepository() *SearchRepository
NewSearchRepository creates a new in-memory search repository
func (*SearchRepository) AddActor ¶
func (r *SearchRepository) AddActor(actor *activitypub.Actor)
AddActor adds an actor for testing
func (*SearchRepository) AddStatus ¶
func (r *SearchRepository) AddStatus(status *storage.StatusSearchResult)
AddStatus adds a status for testing
func (*SearchRepository) Clear ¶
func (r *SearchRepository) Clear()
Clear clears all data (test helper)
func (*SearchRepository) SearchAccounts ¶
func (r *SearchRepository) SearchAccounts(_ context.Context, query string, limit int, _ bool, offset int) ([]*activitypub.Actor, error)
SearchAccounts searches for accounts matching the given query
func (*SearchRepository) SearchAccountsAdvanced ¶
func (r *SearchRepository) SearchAccountsAdvanced(ctx context.Context, query string, _ bool, limit int, offset int, following bool, _ string) ([]*activitypub.Actor, error)
SearchAccountsAdvanced searches for accounts with advanced filtering
func (*SearchRepository) SearchAccountsWithPrivacy ¶
func (r *SearchRepository) SearchAccountsWithPrivacy(ctx context.Context, query string, limit int, followingOnly bool, offset int, _ string) ([]*activitypub.Actor, error)
SearchAccountsWithPrivacy searches for accounts with privacy enforcement
func (*SearchRepository) SearchStatuses ¶
func (r *SearchRepository) SearchStatuses(_ context.Context, query string, limit int) ([]*storage.StatusSearchResult, error)
SearchStatuses searches for statuses matching the given query
func (*SearchRepository) SearchStatusesAdvanced ¶
func (r *SearchRepository) SearchStatusesAdvanced(ctx context.Context, query string, limit int, _, _ *string, _ string) ([]*storage.StatusSearchResult, error)
SearchStatusesAdvanced searches for statuses with advanced filtering
func (*SearchRepository) SearchStatusesWithOptions ¶
func (r *SearchRepository) SearchStatusesWithOptions(ctx context.Context, query string, options storage.StatusSearchOptions) ([]*storage.StatusSearchResult, error)
SearchStatusesWithOptions searches for statuses with advanced options
func (*SearchRepository) SearchStatusesWithOptionsPaginated ¶
func (r *SearchRepository) SearchStatusesWithOptionsPaginated(ctx context.Context, query string, options storage.StatusSearchOptions) ([]*storage.StatusSearchResult, *interfaces.PaginationResult, error)
SearchStatusesWithOptionsPaginated searches for statuses with pagination
func (*SearchRepository) SearchStatusesWithPrivacy ¶
func (r *SearchRepository) SearchStatusesWithPrivacy(ctx context.Context, query string, options storage.StatusSearchOptions, _ string) ([]*storage.StatusSearchResult, error)
SearchStatusesWithPrivacy searches for statuses with privacy enforcement
func (*SearchRepository) SearchStatusesWithPrivacyPaginated ¶
func (r *SearchRepository) SearchStatusesWithPrivacyPaginated(ctx context.Context, query string, options storage.StatusSearchOptions, _ string) ([]*storage.StatusSearchResult, *interfaces.PaginationResult, error)
SearchStatusesWithPrivacyPaginated searches for statuses with privacy and pagination
func (*SearchRepository) SetDependencies ¶
func (r *SearchRepository) SetDependencies(deps interfaces.SearchRepositoryDeps)
SetDependencies sets the dependencies for cross-repository operations
type SeriesRepository ¶
type SeriesRepository struct {
// contains filtered or unexported fields
}
SeriesRepository is a thread-safe in-memory implementation of interfaces.SeriesRepository.
func NewSeriesRepository ¶
func NewSeriesRepository() *SeriesRepository
NewSeriesRepository creates a new in-memory series repository
func (*SeriesRepository) Clear ¶
func (r *SeriesRepository) Clear()
Clear clears all data (test helper)
func (*SeriesRepository) CreateSeries ¶
CreateSeries creates a new series
func (*SeriesRepository) Delete ¶
func (r *SeriesRepository) Delete(_ context.Context, pk, sk string) error
Delete deletes a series by PK and SK
func (*SeriesRepository) GetSeries ¶
func (r *SeriesRepository) GetSeries(_ context.Context, authorID, seriesID string) (*models.Series, error)
GetSeries retrieves a series by author ID and series ID
func (*SeriesRepository) ListSeriesByAuthor ¶
func (r *SeriesRepository) ListSeriesByAuthor(ctx context.Context, authorID string, limit int) ([]*models.Series, error)
ListSeriesByAuthor lists series for an author
func (*SeriesRepository) ListSeriesByAuthorPaginated ¶
func (r *SeriesRepository) ListSeriesByAuthorPaginated(_ context.Context, authorID string, limit int, cursor string) ([]*models.Series, string, error)
ListSeriesByAuthorPaginated lists series for an author with cursor pagination
func (*SeriesRepository) UpdateArticleCount ¶
func (r *SeriesRepository) UpdateArticleCount(_ context.Context, authorID string, seriesID string, delta int) error
UpdateArticleCount atomically increments/decrements a series's ArticleCount
type SeveranceRepository ¶
type SeveranceRepository struct {
// contains filtered or unexported fields
}
SeveranceRepository is a thread-safe in-memory implementation of interfaces.SeveranceRepository.
func NewSeveranceRepository ¶
func NewSeveranceRepository() *SeveranceRepository
NewSeveranceRepository creates a new in-memory severance repository
func (*SeveranceRepository) Clear ¶
func (r *SeveranceRepository) Clear()
Clear clears all data (test helper)
func (*SeveranceRepository) CreateAffectedRelationship ¶
func (r *SeveranceRepository) CreateAffectedRelationship(_ context.Context, affected *models.AffectedRelationship) error
CreateAffectedRelationship creates a new affected relationship record
func (*SeveranceRepository) CreateReconnectionAttempt ¶
func (r *SeveranceRepository) CreateReconnectionAttempt(_ context.Context, attempt *models.SeveranceReconnectionAttempt) error
CreateReconnectionAttempt creates a new reconnection attempt record
func (*SeveranceRepository) CreateSeveredRelationship ¶
func (r *SeveranceRepository) CreateSeveredRelationship(_ context.Context, severance *models.SeveredRelationship) error
CreateSeveredRelationship creates a new severed relationship record
func (*SeveranceRepository) GetAffectedRelationships ¶
func (r *SeveranceRepository) GetAffectedRelationships(_ context.Context, severanceID string, limit int, cursor string) ([]*models.AffectedRelationship, string, error)
GetAffectedRelationships retrieves affected relationships for a severance
func (*SeveranceRepository) GetReconnectionAttempt ¶
func (r *SeveranceRepository) GetReconnectionAttempt(_ context.Context, severanceID, attemptID string) (*models.SeveranceReconnectionAttempt, error)
GetReconnectionAttempt retrieves a reconnection attempt by ID
func (*SeveranceRepository) GetReconnectionAttempts ¶
func (r *SeveranceRepository) GetReconnectionAttempts(_ context.Context, severanceID string) ([]*models.SeveranceReconnectionAttempt, error)
GetReconnectionAttempts retrieves all reconnection attempts for a severance
func (*SeveranceRepository) GetSeveredRelationship ¶
func (r *SeveranceRepository) GetSeveredRelationship(_ context.Context, id string) (*models.SeveredRelationship, error)
GetSeveredRelationship retrieves a severed relationship by ID
func (*SeveranceRepository) ListSeveredRelationships ¶
func (r *SeveranceRepository) ListSeveredRelationships(_ context.Context, localInstance string, filters interfaces.SeveranceFilters, limit int, cursor string) ([]*models.SeveredRelationship, string, error)
ListSeveredRelationships retrieves severed relationships with filters and pagination
func (*SeveranceRepository) UpdateReconnectionAttempt ¶
func (r *SeveranceRepository) UpdateReconnectionAttempt(_ context.Context, attempt *models.SeveranceReconnectionAttempt) error
UpdateReconnectionAttempt updates a reconnection attempt record
func (*SeveranceRepository) UpdateSeveranceStatus ¶
func (r *SeveranceRepository) UpdateSeveranceStatus(_ context.Context, id string, status models.SeveranceStatus) error
UpdateSeveranceStatus updates the status of a severed relationship
type SocialRepository ¶
type SocialRepository struct {
// contains filtered or unexported fields
}
SocialRepository is a thread-safe in-memory implementation of interfaces.SocialRepository.
func NewSocialRepository ¶
func NewSocialRepository() *SocialRepository
NewSocialRepository creates a new in-memory social repository
func (*SocialRepository) CascadeDeleteAnnounces ¶
func (r *SocialRepository) CascadeDeleteAnnounces(_ context.Context, objectID string) error
CascadeDeleteAnnounces deletes all announces for an object
func (*SocialRepository) Clear ¶
func (r *SocialRepository) Clear()
Clear clears all data (test helper)
func (*SocialRepository) CountObjectAnnounces ¶
CountObjectAnnounces returns the total number of announces for an object
func (*SocialRepository) CountUserPinnedStatuses ¶
CountUserPinnedStatuses counts the number of pinned statuses for a user
func (*SocialRepository) CreateAccountNote ¶
func (r *SocialRepository) CreateAccountNote(_ context.Context, note *storage.AccountNote) error
CreateAccountNote creates a new private note on an account
func (*SocialRepository) CreateAccountPin ¶
func (r *SocialRepository) CreateAccountPin(_ context.Context, pin *storage.AccountPin) error
CreateAccountPin creates a new account pin (endorsed account)
func (*SocialRepository) CreateAnnounce ¶
CreateAnnounce creates a new Announce activity
func (*SocialRepository) CreateBlock ¶
CreateBlock creates a new block relationship
func (*SocialRepository) CreateMute ¶
CreateMute creates a new mute relationship
func (*SocialRepository) CreateStatusPin ¶
CreateStatusPin creates a new status pin
func (*SocialRepository) DeleteAccountNote ¶
func (r *SocialRepository) DeleteAccountNote(_ context.Context, username, targetActorID string) error
DeleteAccountNote deletes a private note on an account
func (*SocialRepository) DeleteAccountPin ¶
func (r *SocialRepository) DeleteAccountPin(_ context.Context, username, pinnedActorID string) error
DeleteAccountPin deletes an account pin
func (*SocialRepository) DeleteAnnounce ¶
func (r *SocialRepository) DeleteAnnounce(_ context.Context, actor, object string) error
DeleteAnnounce removes an Announce activity
func (*SocialRepository) DeleteBlock ¶
func (r *SocialRepository) DeleteBlock(_ context.Context, actor, blockedActor string) error
DeleteBlock removes a block relationship
func (*SocialRepository) DeleteMute ¶
func (r *SocialRepository) DeleteMute(_ context.Context, actor, mutedActor string) error
DeleteMute removes a mute relationship
func (*SocialRepository) DeleteStatusPin ¶
func (r *SocialRepository) DeleteStatusPin(_ context.Context, username, statusID string) error
DeleteStatusPin deletes a status pin
func (*SocialRepository) GetAccountNote ¶
func (r *SocialRepository) GetAccountNote(_ context.Context, username, targetActorID string) (*storage.AccountNote, error)
GetAccountNote retrieves a private note on an account
func (*SocialRepository) GetAccountPins ¶
func (r *SocialRepository) GetAccountPins(_ context.Context, username string) ([]*storage.AccountPin, error)
GetAccountPins retrieves all pinned accounts for a user
func (*SocialRepository) GetAccountPinsPaginated ¶
func (r *SocialRepository) GetAccountPinsPaginated(_ context.Context, username string, _ int, _ string) ([]*storage.AccountPin, string, error)
GetAccountPinsPaginated retrieves pinned accounts for a user with pagination
func (*SocialRepository) GetActorAnnounces ¶
func (r *SocialRepository) GetActorAnnounces(_ context.Context, actorID string, _ int, _ string) ([]*storage.Announce, string, error)
GetActorAnnounces retrieves all objects announced by a specific actor with pagination
func (*SocialRepository) GetAnnounce ¶
func (r *SocialRepository) GetAnnounce(_ context.Context, actor, object string) (*storage.Announce, error)
GetAnnounce retrieves a specific Announce by actor and object
func (*SocialRepository) GetBlock ¶
func (r *SocialRepository) GetBlock(_ context.Context, actor, blockedActor string) (*storage.Block, error)
GetBlock retrieves a specific block relationship
func (*SocialRepository) GetBlockedByUsers ¶
func (r *SocialRepository) GetBlockedByUsers(_ context.Context, actor string, _ int, _ string) ([]*storage.Block, string, error)
GetBlockedByUsers returns a paginated list of actors who have blocked the given actor
func (*SocialRepository) GetBlockedUsers ¶
func (r *SocialRepository) GetBlockedUsers(_ context.Context, actor string, _ int, _ string) ([]*storage.Block, string, error)
GetBlockedUsers returns a paginated list of actors blocked by the given actor
func (*SocialRepository) GetMute ¶
func (r *SocialRepository) GetMute(_ context.Context, actor, mutedActor string) (*storage.Mute, error)
GetMute retrieves a specific mute relationship
func (*SocialRepository) GetMutedUsers ¶
func (r *SocialRepository) GetMutedUsers(_ context.Context, actor string, _ int, _ string) ([]*storage.Mute, string, error)
GetMutedUsers returns all actors muted by the given actor
func (*SocialRepository) GetStatusAnnounces ¶
func (r *SocialRepository) GetStatusAnnounces(_ context.Context, objectID string, _ int, _ string) ([]*storage.Announce, string, error)
GetStatusAnnounces retrieves all announces for a specific object
func (*SocialRepository) GetStatusPins ¶
func (r *SocialRepository) GetStatusPins(_ context.Context, username string) ([]*storage.StatusPin, error)
GetStatusPins retrieves all pinned statuses for a user
func (*SocialRepository) GetStatusPinsPaginated ¶
func (r *SocialRepository) GetStatusPinsPaginated(_ context.Context, username string, limit int, _ string) ([]*storage.StatusPin, string, error)
GetStatusPinsPaginated retrieves pinned statuses for a user with pagination
func (*SocialRepository) HasUserAnnounced ¶
HasUserAnnounced checks if a user has announced a specific object
func (*SocialRepository) IsAccountPinned ¶
func (r *SocialRepository) IsAccountPinned(_ context.Context, username, pinnedActorID string) (bool, error)
IsAccountPinned checks if an account is pinned
func (*SocialRepository) IsStatusPinned ¶
func (r *SocialRepository) IsStatusPinned(_ context.Context, username, statusID string) (bool, error)
IsStatusPinned checks if a status is pinned by a user
func (*SocialRepository) ReorderStatusPins ¶
ReorderStatusPins reorders pinned statuses
func (*SocialRepository) UpdateAccountNote ¶
func (r *SocialRepository) UpdateAccountNote(_ context.Context, note *storage.AccountNote) error
UpdateAccountNote updates an existing private note on an account
type StatusRepository ¶
type StatusRepository struct {
// contains filtered or unexported fields
}
StatusRepository is a thread-safe in-memory implementation of interfaces.StatusRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewStatusRepository ¶
func NewStatusRepository() *StatusRepository
NewStatusRepository creates a new in-memory status repository
func (*StatusRepository) BookmarkStatus ¶
func (r *StatusRepository) BookmarkStatus(_ context.Context, userID, statusID string) error
BookmarkStatus bookmarks a status
func (*StatusRepository) CountReplies ¶
CountReplies counts the number of replies to a status
func (*StatusRepository) CountStatusesByAuthor ¶
CountStatusesByAuthor counts the total number of statuses by an author
func (*StatusRepository) CreateBoostStatus ¶
CreateBoostStatus creates a boost status
func (*StatusRepository) CreateStatus ¶
CreateStatus creates a new status
func (*StatusRepository) DeleteBoostStatus ¶
func (r *StatusRepository) DeleteBoostStatus(_ context.Context, boosterID, targetStatusID string) (*models.Status, error)
DeleteBoostStatus removes a boost status
func (*StatusRepository) DeleteStatus ¶
func (r *StatusRepository) DeleteStatus(_ context.Context, statusID string) error
DeleteStatus marks a status as deleted
func (*StatusRepository) FlagStatus ¶
FlagStatus flags a status for moderation
func (*StatusRepository) GetConversationThread ¶
func (r *StatusRepository) GetConversationThread(_ context.Context, conversationID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetConversationThread retrieves a conversation thread
func (*StatusRepository) GetFlaggedStatuses ¶
func (r *StatusRepository) GetFlaggedStatuses(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetFlaggedStatuses retrieves flagged statuses
func (*StatusRepository) GetHomeTimeline ¶
func (r *StatusRepository) GetHomeTimeline(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetHomeTimeline retrieves the home timeline for a user
func (*StatusRepository) GetPublicTimeline ¶
func (r *StatusRepository) GetPublicTimeline(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetPublicTimeline retrieves the public timeline
func (*StatusRepository) GetReplies ¶
func (r *StatusRepository) GetReplies(_ context.Context, parentStatusID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetReplies retrieves replies to a status
func (*StatusRepository) GetStatusByURL ¶
GetStatusByURL retrieves a status by its URL
func (*StatusRepository) GetStatusContext ¶
func (r *StatusRepository) GetStatusContext(_ context.Context, statusID string) (ancestors, descendants []*models.Status, err error)
GetStatusContext retrieves ancestors and descendants of a status
func (*StatusRepository) GetStatusCounts ¶
func (r *StatusRepository) GetStatusCounts(_ context.Context, statusID string) (likes, reblogs, replies int, err error)
GetStatusCounts retrieves engagement counts for a status
func (*StatusRepository) GetStatusEngagement ¶
func (r *StatusRepository) GetStatusEngagement(_ context.Context, statusID, userID string) (liked, reblogged, bookmarked bool, err error)
GetStatusEngagement retrieves user's engagement state with a status
func (*StatusRepository) GetStatusesByHashtag ¶
func (r *StatusRepository) GetStatusesByHashtag(_ context.Context, hashtag string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetStatusesByHashtag retrieves statuses by hashtag
func (*StatusRepository) GetStatusesByIDs ¶
func (r *StatusRepository) GetStatusesByIDs(_ context.Context, statusIDs []string) ([]*models.Status, error)
GetStatusesByIDs retrieves multiple statuses by their IDs
func (*StatusRepository) GetTrendingStatuses ¶
func (r *StatusRepository) GetTrendingStatuses(_ context.Context, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetTrendingStatuses retrieves trending statuses
func (*StatusRepository) GetUserTimeline ¶
func (r *StatusRepository) GetUserTimeline(_ context.Context, userID string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
GetUserTimeline retrieves a user's timeline
func (*StatusRepository) LikeStatus ¶
func (r *StatusRepository) LikeStatus(_ context.Context, userID, statusID string) error
LikeStatus likes a status
func (*StatusRepository) ListStatusesForAdmin ¶
func (r *StatusRepository) ListStatusesForAdmin(_ context.Context, filter *interfaces.StatusFilter, limit int, cursor string) ([]*models.Status, string, error)
ListStatusesForAdmin retrieves statuses with comprehensive admin filtering
func (*StatusRepository) ReblogStatus ¶
ReblogStatus reblogs a status
func (*StatusRepository) SearchStatuses ¶
func (r *StatusRepository) SearchStatuses(_ context.Context, query string, opts interfaces.PaginationOptions) (*interfaces.PaginatedResult[*models.Status], error)
SearchStatuses searches statuses by content
func (*StatusRepository) UnbookmarkStatus ¶
func (r *StatusRepository) UnbookmarkStatus(_ context.Context, userID, statusID string) error
UnbookmarkStatus unbookmarks a status
func (*StatusRepository) UnflagStatus ¶
func (r *StatusRepository) UnflagStatus(_ context.Context, statusID string) error
UnflagStatus unflags a status
func (*StatusRepository) UnlikeStatus ¶
func (r *StatusRepository) UnlikeStatus(_ context.Context, userID, statusID string) error
UnlikeStatus unlikes a status
func (*StatusRepository) UnreblogStatus ¶
func (r *StatusRepository) UnreblogStatus(_ context.Context, userID, statusID string) error
UnreblogStatus unreblogs a status
func (*StatusRepository) UpdateStatus ¶
UpdateStatus updates an existing status
type StreamingCloudWatchRepository ¶
type StreamingCloudWatchRepository struct {
// contains filtered or unexported fields
}
StreamingCloudWatchRepository is a thread-safe in-memory implementation of interfaces.StreamingCloudWatchRepository.
func NewStreamingCloudWatchRepository ¶
func NewStreamingCloudWatchRepository() *StreamingCloudWatchRepository
NewStreamingCloudWatchRepository creates a new in-memory streaming CloudWatch repository.
func (*StreamingCloudWatchRepository) CacheConcurrentViewers ¶
func (r *StreamingCloudWatchRepository) CacheConcurrentViewers(_ context.Context, mediaID string, concurrentMetrics models.ConcurrentViewerMetrics) error
CacheConcurrentViewers stores concurrent viewer metrics in cache.
func (*StreamingCloudWatchRepository) CacheGeographicData ¶
func (r *StreamingCloudWatchRepository) CacheGeographicData(_ context.Context, mediaID string, geoMetrics map[string]models.GeographicMetric) error
CacheGeographicData stores geographic distribution metrics in cache.
func (*StreamingCloudWatchRepository) CachePerformanceMetrics ¶
func (r *StreamingCloudWatchRepository) CachePerformanceMetrics(_ context.Context, mediaID string, perfMetrics models.StreamingPerformanceMetrics) error
CachePerformanceMetrics stores performance metrics in cache.
func (*StreamingCloudWatchRepository) CacheQualityBreakdown ¶
func (r *StreamingCloudWatchRepository) CacheQualityBreakdown(_ context.Context, mediaID string, qualityMetrics map[string]models.QualityMetric) error
CacheQualityBreakdown stores quality breakdown metrics in cache.
func (*StreamingCloudWatchRepository) CleanupExpiredMetrics ¶
func (r *StreamingCloudWatchRepository) CleanupExpiredMetrics(_ context.Context) error
CleanupExpiredMetrics removes expired metrics from cache.
func (*StreamingCloudWatchRepository) Clear ¶
func (r *StreamingCloudWatchRepository) Clear()
Clear clears all cached data.
func (*StreamingCloudWatchRepository) Count ¶
func (r *StreamingCloudWatchRepository) Count() int
Count returns the total number of cached metrics across all media items.
func (*StreamingCloudWatchRepository) GetAllCachedMetrics ¶
func (r *StreamingCloudWatchRepository) GetAllCachedMetrics(_ context.Context, mediaID string) (map[string]*models.StreamingCloudWatchMetrics, error)
GetAllCachedMetrics retrieves all cached metrics for a media item.
func (*StreamingCloudWatchRepository) GetConcurrentViewers ¶
func (r *StreamingCloudWatchRepository) GetConcurrentViewers(_ context.Context, mediaID string) (*models.StreamingCloudWatchMetrics, error)
GetConcurrentViewers retrieves cached concurrent viewer metrics.
func (*StreamingCloudWatchRepository) GetGeographicData ¶
func (r *StreamingCloudWatchRepository) GetGeographicData(_ context.Context, mediaID string) (*models.StreamingCloudWatchMetrics, error)
GetGeographicData retrieves cached geographic distribution metrics.
func (*StreamingCloudWatchRepository) GetPerformanceMetrics ¶
func (r *StreamingCloudWatchRepository) GetPerformanceMetrics(_ context.Context, mediaID string) (*models.StreamingCloudWatchMetrics, error)
GetPerformanceMetrics retrieves cached performance metrics.
func (*StreamingCloudWatchRepository) GetQualityBreakdown ¶
func (r *StreamingCloudWatchRepository) GetQualityBreakdown(_ context.Context, mediaID string) (*models.StreamingCloudWatchMetrics, error)
GetQualityBreakdown retrieves cached quality breakdown metrics for a media item.
func (*StreamingCloudWatchRepository) MediaCount ¶
func (r *StreamingCloudWatchRepository) MediaCount() int
MediaCount returns the number of media items with cached metrics.
type StreamingConnectionRepository ¶
type StreamingConnectionRepository struct {
// contains filtered or unexported fields
}
StreamingConnectionRepository is a thread-safe in-memory implementation of interfaces.StreamingConnectionRepository.
func NewStreamingConnectionRepository ¶
func NewStreamingConnectionRepository() *StreamingConnectionRepository
NewStreamingConnectionRepository creates a new in-memory streaming connection repository
func (*StreamingConnectionRepository) CleanupExpiredConnections ¶
func (r *StreamingConnectionRepository) CleanupExpiredConnections(_ context.Context) (int, error)
CleanupExpiredConnections removes connections that have exceeded their TTL
func (*StreamingConnectionRepository) Clear ¶
func (r *StreamingConnectionRepository) Clear()
Clear clears all data (test helper)
func (*StreamingConnectionRepository) CloseTimedOutConnections ¶
func (r *StreamingConnectionRepository) CloseTimedOutConnections(_ context.Context) (int, error)
CloseTimedOutConnections closes connections that have exceeded their idle timeout
func (*StreamingConnectionRepository) DeleteAllSubscriptions ¶
func (r *StreamingConnectionRepository) DeleteAllSubscriptions(_ context.Context, connectionID string) error
DeleteAllSubscriptions removes all subscriptions for a connection
func (*StreamingConnectionRepository) DeleteConnection ¶
func (r *StreamingConnectionRepository) DeleteConnection(_ context.Context, connectionID string) error
DeleteConnection removes a WebSocket connection
func (*StreamingConnectionRepository) DeleteSubscription ¶
func (r *StreamingConnectionRepository) DeleteSubscription(_ context.Context, connectionID, stream string) error
DeleteSubscription removes a stream subscription
func (*StreamingConnectionRepository) EnforceResourceLimits ¶
func (r *StreamingConnectionRepository) EnforceResourceLimits(_ context.Context, connectionID string, messageSize int64) error
EnforceResourceLimits enforces resource limits on connections
func (*StreamingConnectionRepository) GetActiveConnectionsCount ¶
func (r *StreamingConnectionRepository) GetActiveConnectionsCount(_ context.Context, userID string) (int, error)
GetActiveConnectionsCount gets the count of active connections for a user
func (*StreamingConnectionRepository) GetConnection ¶
func (r *StreamingConnectionRepository) GetConnection(_ context.Context, connectionID string) (*models.WebSocketConnection, error)
GetConnection retrieves a WebSocket connection by connection ID
func (*StreamingConnectionRepository) GetConnectionCountByState ¶
func (r *StreamingConnectionRepository) GetConnectionCountByState(_ context.Context, state models.ConnectionState) (int, error)
GetConnectionCountByState returns the number of connections in the provided state
func (*StreamingConnectionRepository) GetConnectionPool ¶
func (r *StreamingConnectionRepository) GetConnectionPool(_ context.Context) (map[string]interface{}, error)
GetConnectionPool returns current connection pool statistics
func (*StreamingConnectionRepository) GetConnectionsByState ¶
func (r *StreamingConnectionRepository) GetConnectionsByState(_ context.Context, state models.ConnectionState) ([]models.WebSocketConnection, error)
GetConnectionsByState gets all connections in a specific state
func (*StreamingConnectionRepository) GetConnectionsByUser ¶
func (r *StreamingConnectionRepository) GetConnectionsByUser(_ context.Context, userID string) ([]models.WebSocketConnection, error)
GetConnectionsByUser gets all connections for a user
func (*StreamingConnectionRepository) GetHealthyConnections ¶
func (r *StreamingConnectionRepository) GetHealthyConnections(_ context.Context) ([]models.WebSocketConnection, error)
GetHealthyConnections gets all healthy connections
func (*StreamingConnectionRepository) GetIdleConnections ¶
func (r *StreamingConnectionRepository) GetIdleConnections(_ context.Context, idleThreshold time.Time) ([]models.WebSocketConnection, error)
GetIdleConnections gets connections that have been idle past the threshold
func (*StreamingConnectionRepository) GetStaleConnections ¶
func (r *StreamingConnectionRepository) GetStaleConnections(_ context.Context, staleThreshold time.Time) ([]models.WebSocketConnection, error)
GetStaleConnections gets connections that are considered stale
func (*StreamingConnectionRepository) GetSubscriptionsForStream ¶
func (r *StreamingConnectionRepository) GetSubscriptionsForStream(_ context.Context, stream string) ([]models.WebSocketSubscription, error)
GetSubscriptionsForStream gets all subscriptions for a specific stream
func (*StreamingConnectionRepository) GetTotalActiveConnectionsCount ¶
func (r *StreamingConnectionRepository) GetTotalActiveConnectionsCount(_ context.Context) (int, error)
GetTotalActiveConnectionsCount gets the total count of active connections
func (*StreamingConnectionRepository) GetUnhealthyConnections ¶
func (r *StreamingConnectionRepository) GetUnhealthyConnections(_ context.Context) ([]models.WebSocketConnection, error)
GetUnhealthyConnections gets connections that need attention
func (*StreamingConnectionRepository) GetUserConnectionCount ¶
func (r *StreamingConnectionRepository) GetUserConnectionCount(_ context.Context, userID string) (int, error)
GetUserConnectionCount returns the number of connections for a user
func (*StreamingConnectionRepository) MarkConnectionsIdle ¶
func (r *StreamingConnectionRepository) MarkConnectionsIdle(_ context.Context, idleThreshold time.Duration) (int, error)
MarkConnectionsIdle marks inactive connections as idle
func (*StreamingConnectionRepository) ReclaimIdleConnections ¶
func (r *StreamingConnectionRepository) ReclaimIdleConnections(_ context.Context, maxIdleConnections int) (int, error)
ReclaimIdleConnections proactively closes old idle connections
func (*StreamingConnectionRepository) RecordConnectionError ¶
func (r *StreamingConnectionRepository) RecordConnectionError(_ context.Context, connectionID string, errorMsg string) error
RecordConnectionError records an error for a connection
func (*StreamingConnectionRepository) RecordConnectionMessage ¶
func (r *StreamingConnectionRepository) RecordConnectionMessage(_ context.Context, connectionID string, sent bool, messageSize int64) error
RecordConnectionMessage records message statistics
func (*StreamingConnectionRepository) RecordPing ¶
func (r *StreamingConnectionRepository) RecordPing(_ context.Context, connectionID string) error
RecordPing records a ping for a connection
func (*StreamingConnectionRepository) RecordPong ¶
func (r *StreamingConnectionRepository) RecordPong(_ context.Context, connectionID string) error
RecordPong records a pong for a connection
func (*StreamingConnectionRepository) UpdateConnection ¶
func (r *StreamingConnectionRepository) UpdateConnection(_ context.Context, connection *models.WebSocketConnection) error
UpdateConnection updates an existing WebSocket connection
func (*StreamingConnectionRepository) UpdateConnectionActivity ¶
func (r *StreamingConnectionRepository) UpdateConnectionActivity(_ context.Context, connectionID string) error
UpdateConnectionActivity updates the last activity timestamp
func (*StreamingConnectionRepository) UpdateConnectionState ¶
func (r *StreamingConnectionRepository) UpdateConnectionState(_ context.Context, connectionID string, newState models.ConnectionState, reason string) error
UpdateConnectionState updates the connection state
func (*StreamingConnectionRepository) WriteConnection ¶
func (r *StreamingConnectionRepository) WriteConnection(_ context.Context, connectionID, userID, username string, streams []string) (*models.WebSocketConnection, error)
WriteConnection stores a WebSocket connection
func (*StreamingConnectionRepository) WriteSubscription ¶
func (r *StreamingConnectionRepository) WriteSubscription(_ context.Context, connectionID, userID, stream string) error
WriteSubscription stores a stream subscription
type ThreadRepository ¶
type ThreadRepository struct {
// contains filtered or unexported fields
}
ThreadRepository is a thread-safe in-memory implementation of interfaces.ThreadRepository.
func NewThreadRepository ¶
func NewThreadRepository() *ThreadRepository
NewThreadRepository creates a new in-memory thread repository
func (*ThreadRepository) BulkSaveThreadNodes ¶
func (r *ThreadRepository) BulkSaveThreadNodes(ctx context.Context, nodes []*models.ThreadNode) error
BulkSaveThreadNodes saves multiple thread nodes in a batch
func (*ThreadRepository) Clear ¶
func (r *ThreadRepository) Clear()
Clear clears all data (test helper)
func (*ThreadRepository) DeleteMissingReply ¶
func (r *ThreadRepository) DeleteMissingReply(_ context.Context, rootStatusID, replyID string) error
DeleteMissingReply deletes a missing reply record (used when resolved)
func (*ThreadRepository) GetMissingReplies ¶
func (r *ThreadRepository) GetMissingReplies(_ context.Context, rootStatusID string) ([]*models.MissingReply, error)
GetMissingReplies retrieves all missing replies for a thread
func (*ThreadRepository) GetPendingMissingReplies ¶
func (r *ThreadRepository) GetPendingMissingReplies(_ context.Context, limit int) ([]*models.MissingReply, error)
GetPendingMissingReplies retrieves missing replies that should be retried
func (*ThreadRepository) GetThreadContext ¶
func (r *ThreadRepository) GetThreadContext(ctx context.Context, statusID string) (*interfaces.ThreadContextResult, error)
GetThreadContext builds a complete thread context by querying nodes
func (*ThreadRepository) GetThreadNode ¶
func (r *ThreadRepository) GetThreadNode(_ context.Context, rootStatusID, statusID string) (*models.ThreadNode, error)
GetThreadNode retrieves a single thread node by status ID
func (*ThreadRepository) GetThreadNodeByStatusID ¶
func (r *ThreadRepository) GetThreadNodeByStatusID(_ context.Context, statusID string) (*models.ThreadNode, error)
GetThreadNodeByStatusID retrieves a thread node by status ID using GSI
func (*ThreadRepository) GetThreadNodes ¶
func (r *ThreadRepository) GetThreadNodes(_ context.Context, rootStatusID string) ([]*models.ThreadNode, error)
GetThreadNodes retrieves all nodes for a thread by root status ID
func (*ThreadRepository) GetThreadSync ¶
func (r *ThreadRepository) GetThreadSync(_ context.Context, statusID string) (*models.ThreadSync, error)
GetThreadSync retrieves a thread sync record by status ID
func (*ThreadRepository) MarkMissingReplies ¶
func (r *ThreadRepository) MarkMissingReplies(_ context.Context, rootStatusID, parentStatusID string, replyIDs []string) error
MarkMissingReplies marks multiple replies as missing in a thread
func (*ThreadRepository) SaveMissingReply ¶
func (r *ThreadRepository) SaveMissingReply(_ context.Context, missing *models.MissingReply) error
SaveMissingReply saves or updates a missing reply record
func (*ThreadRepository) SaveThreadNode ¶
func (r *ThreadRepository) SaveThreadNode(_ context.Context, node *models.ThreadNode) error
SaveThreadNode saves or updates a thread node
func (*ThreadRepository) SaveThreadSync ¶
func (r *ThreadRepository) SaveThreadSync(_ context.Context, sync *models.ThreadSync) error
SaveThreadSync saves or updates a thread sync record
type TimelineRepository ¶
type TimelineRepository struct {
// contains filtered or unexported fields
}
TimelineRepository is a thread-safe in-memory implementation of interfaces.TimelineRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewTimelineRepository ¶
func NewTimelineRepository() *TimelineRepository
NewTimelineRepository creates a new in-memory timeline repository
func (*TimelineRepository) AddConversation ¶
func (r *TimelineRepository) AddConversation(conv *models.Conversation, participants []string)
AddConversation adds a conversation for testing purposes
func (*TimelineRepository) CountTimelineEntries ¶
func (r *TimelineRepository) CountTimelineEntries(_ context.Context, timelineType, timelineID string) (int, error)
CountTimelineEntries counts the number of entries in a timeline
func (*TimelineRepository) CreateTimelineEntries ¶
func (r *TimelineRepository) CreateTimelineEntries(ctx context.Context, entries []*models.Timeline) error
CreateTimelineEntries creates multiple timeline entries in batch
func (*TimelineRepository) CreateTimelineEntry ¶
CreateTimelineEntry creates a new timeline entry
func (*TimelineRepository) DeleteExpiredTimelineEntries ¶
func (r *TimelineRepository) DeleteExpiredTimelineEntries(_ context.Context, before time.Time) error
DeleteExpiredTimelineEntries deletes timeline entries that have expired
func (*TimelineRepository) DeleteTimelineEntriesByPost ¶
func (r *TimelineRepository) DeleteTimelineEntriesByPost(_ context.Context, postID string) error
DeleteTimelineEntriesByPost deletes all timeline entries for a specific post
func (*TimelineRepository) DeleteTimelineEntry ¶
func (r *TimelineRepository) DeleteTimelineEntry(_ context.Context, timelineType, timelineID, entryID string, timelineAt time.Time) error
DeleteTimelineEntry deletes a specific timeline entry
func (*TimelineRepository) GetConversations ¶
func (r *TimelineRepository) GetConversations(_ context.Context, username string, limit int, cursor string) ([]*models.Conversation, string, error)
GetConversations retrieves conversations for a user
func (*TimelineRepository) GetDirectTimeline ¶
func (r *TimelineRepository) GetDirectTimeline(_ context.Context, username string, limit int, cursor string) ([]*models.Timeline, string, error)
GetDirectTimeline retrieves direct message timeline entries for a user
func (*TimelineRepository) GetHashtagTimeline ¶
func (r *TimelineRepository) GetHashtagTimeline(_ context.Context, hashtag string, local bool, limit int, cursor string) ([]*models.Timeline, string, error)
GetHashtagTimeline retrieves timeline entries for a specific hashtag
func (*TimelineRepository) GetHomeTimeline ¶
func (r *TimelineRepository) GetHomeTimeline(_ context.Context, username string, limit int, cursor string) ([]*models.Timeline, string, error)
GetHomeTimeline retrieves home timeline entries for a user
func (*TimelineRepository) GetListTimeline ¶
func (r *TimelineRepository) GetListTimeline(_ context.Context, listID string, limit int, cursor string) ([]*models.Timeline, string, error)
GetListTimeline retrieves timeline entries for a specific list
func (*TimelineRepository) GetPublicTimeline ¶
func (r *TimelineRepository) GetPublicTimeline(_ context.Context, local bool, limit int, cursor string) ([]*models.Timeline, string, error)
GetPublicTimeline retrieves public timeline entries
func (*TimelineRepository) GetTimelineEntriesByActor ¶
func (r *TimelineRepository) GetTimelineEntriesByActor(_ context.Context, actorID string, limit int, cursor string) ([]*models.Timeline, string, error)
GetTimelineEntriesByActor retrieves all timeline entries by a specific actor
func (*TimelineRepository) GetTimelineEntriesByLanguage ¶
func (r *TimelineRepository) GetTimelineEntriesByLanguage(_ context.Context, language string, limit int, cursor string) ([]*models.Timeline, string, error)
GetTimelineEntriesByLanguage retrieves timeline entries by language
func (*TimelineRepository) GetTimelineEntriesByPost ¶
func (r *TimelineRepository) GetTimelineEntriesByPost(_ context.Context, postID string, limit int, cursor string) ([]*models.Timeline, string, error)
GetTimelineEntriesByPost retrieves all timeline entries for a specific post
func (*TimelineRepository) GetTimelineEntriesByVisibility ¶
func (r *TimelineRepository) GetTimelineEntriesByVisibility(_ context.Context, visibility string, limit int, cursor string) ([]*models.Timeline, string, error)
GetTimelineEntriesByVisibility retrieves timeline entries by visibility level
func (*TimelineRepository) GetTimelineEntriesInRange ¶
func (r *TimelineRepository) GetTimelineEntriesInRange(_ context.Context, timelineType, timelineID string, startTime, endTime time.Time, limit int) ([]*models.Timeline, error)
GetTimelineEntriesInRange retrieves timeline entries within a time range
func (*TimelineRepository) GetTimelineEntriesWithFilters ¶
func (r *TimelineRepository) GetTimelineEntriesWithFilters(_ context.Context, timelineType, timelineID string, filters interfaces.TimelineFilters, limit int, cursor string) ([]*models.Timeline, string, error)
GetTimelineEntriesWithFilters retrieves timeline entries with various filters
func (*TimelineRepository) GetTimelineEntry ¶
func (r *TimelineRepository) GetTimelineEntry(_ context.Context, timelineType, timelineID, entryID string, timelineAt time.Time) (*models.Timeline, error)
GetTimelineEntry retrieves a specific timeline entry
func (*TimelineRepository) RemoveFromTimelines ¶
func (r *TimelineRepository) RemoveFromTimelines(ctx context.Context, objectID string) error
RemoveFromTimelines removes timeline entries for a specific object across all timelines
func (*TimelineRepository) UpdateTimelineEntry ¶
UpdateTimelineEntry updates an existing timeline entry
type TrackingRepository ¶
type TrackingRepository struct {
// contains filtered or unexported fields
}
TrackingRepository is a thread-safe in-memory implementation of interfaces.TrackingRepository.
func NewTrackingRepository ¶
func NewTrackingRepository() *TrackingRepository
NewTrackingRepository creates a new in-memory tracking repository
func (*TrackingRepository) BatchCreate ¶
func (r *TrackingRepository) BatchCreate(ctx context.Context, trackingList []*models.DynamoDBCostRecord) error
BatchCreate creates multiple cost tracking records efficiently
func (*TrackingRepository) Clear ¶
func (r *TrackingRepository) Clear()
Clear clears all data (test helper)
func (*TrackingRepository) Create ¶
func (r *TrackingRepository) Create(_ context.Context, tracking *models.DynamoDBCostRecord) error
Create creates a new cost tracking record
func (*TrackingRepository) CreateAggregated ¶
func (r *TrackingRepository) CreateAggregated(_ context.Context, aggregated *models.DynamoDBCostAggregation) error
CreateAggregated creates an aggregated cost tracking record
func (*TrackingRepository) CreateRelayBudget ¶
func (r *TrackingRepository) CreateRelayBudget(_ context.Context, budget *models.RelayBudget) error
CreateRelayBudget creates a new relay budget configuration
func (*TrackingRepository) CreateRelayCost ¶
CreateRelayCost creates a new relay cost record
func (*TrackingRepository) CreateRelayMetrics ¶
func (r *TrackingRepository) CreateRelayMetrics(_ context.Context, metrics *models.RelayMetrics) error
CreateRelayMetrics creates or updates relay metrics
func (*TrackingRepository) Get ¶
func (r *TrackingRepository) Get(_ context.Context, operationType, id string, timestamp time.Time) (*models.DynamoDBCostRecord, error)
Get retrieves a cost tracking record
func (*TrackingRepository) GetAggregated ¶
func (r *TrackingRepository) GetAggregated(_ context.Context, period, operationType string, windowStart time.Time) (*models.DynamoDBCostAggregation, error)
GetAggregated retrieves aggregated cost tracking
func (*TrackingRepository) GetAggregatedCostsByPeriod ¶
func (r *TrackingRepository) GetAggregatedCostsByPeriod(_ context.Context, period string, startDate, endDate time.Time) ([]*models.DynamoDBCostAggregation, error)
GetAggregatedCostsByPeriod retrieves aggregated costs for a specific period
func (*TrackingRepository) GetCostProjections ¶
func (r *TrackingRepository) GetCostProjections(_ context.Context, _ string) (*storage.CostProjection, error)
GetCostProjections retrieves the most recent cost projection
func (*TrackingRepository) GetCostTrends ¶
func (r *TrackingRepository) GetCostTrends(_ context.Context, period string, operationType string, _ int) (*interfaces.CostTrend, error)
GetCostTrends calculates cost trends over time
func (*TrackingRepository) GetCostsByDateRange ¶
func (r *TrackingRepository) GetCostsByDateRange(_ context.Context, startDate, endDate time.Time) ([]*models.DynamoDBCostRecord, error)
GetCostsByDateRange returns individual cost records for the specified date range
func (*TrackingRepository) GetCostsByOperationType ¶
func (r *TrackingRepository) GetCostsByOperationType(_ context.Context, _, _ time.Time) (map[string]*models.DynamoDBServiceCostStats, error)
GetCostsByOperationType retrieves costs grouped by operation type
func (*TrackingRepository) GetCostsByService ¶
func (r *TrackingRepository) GetCostsByService(_ context.Context, _, _ time.Time) (map[string]*models.DynamoDBServiceCostStats, error)
GetCostsByService retrieves costs grouped by service/function
func (*TrackingRepository) GetDailyAggregates ¶
func (r *TrackingRepository) GetDailyAggregates(_ context.Context, _, _ time.Time) ([]*interfaces.DailyAggregate, error)
GetDailyAggregates returns aggregated daily costs
func (*TrackingRepository) GetHighCostOperations ¶
func (r *TrackingRepository) GetHighCostOperations(_ context.Context, thresholdDollars float64, startTime, endTime time.Time, limit int) ([]*models.DynamoDBCostRecord, error)
GetHighCostOperations returns operations that exceed a cost threshold
func (*TrackingRepository) GetMonthlyAggregate ¶
func (r *TrackingRepository) GetMonthlyAggregate(_ context.Context, year, month int) (*interfaces.MonthlyAggregate, error)
GetMonthlyAggregate returns aggregated costs for the specified month
func (*TrackingRepository) GetRecentCosts ¶
func (r *TrackingRepository) GetRecentCosts(_ context.Context, since time.Time, limit int) ([]*models.DynamoDBCostRecord, error)
GetRecentCosts retrieves recent cost tracking records
func (*TrackingRepository) GetRelayCostsByDateRange ¶
func (r *TrackingRepository) GetRelayCostsByDateRange(_ context.Context, startDate, endDate time.Time, limit int) ([]*models.RelayCost, error)
GetRelayCostsByDateRange retrieves relay costs for all relays within a date range
func (*TrackingRepository) GetRelayCostsByURL ¶
func (r *TrackingRepository) GetRelayCostsByURL(_ context.Context, relayURL string, startTime, endTime time.Time, limit int, _ string, operationType string) ([]*models.RelayCost, string, error)
GetRelayCostsByURL retrieves relay costs for a specific relay URL
func (*TrackingRepository) GetRelayMetrics ¶
func (r *TrackingRepository) GetRelayMetrics(_ context.Context, relayURL, period string, windowStart time.Time) (*models.RelayMetrics, error)
GetRelayMetrics retrieves relay metrics for a specific relay and period
func (*TrackingRepository) GetRelayMetricsHistory ¶
func (r *TrackingRepository) GetRelayMetricsHistory(_ context.Context, relayURL string, startTime, endTime time.Time, limit int, _ string) ([]*models.RelayMetrics, string, error)
GetRelayMetricsHistory retrieves metrics history for a relay
func (*TrackingRepository) GetTableCostStats ¶
func (r *TrackingRepository) GetTableCostStats(_ context.Context, tableName string, startTime, endTime time.Time) (*interfaces.TableCostStats, error)
GetTableCostStats calculates cost statistics for a table
func (*TrackingRepository) ListAggregatedByPeriod ¶
func (r *TrackingRepository) ListAggregatedByPeriod(_ context.Context, period, operationType string, startTime, endTime time.Time, limit int, _ string) ([]*models.DynamoDBCostAggregation, string, error)
ListAggregatedByPeriod lists aggregated cost tracking for a period
func (*TrackingRepository) ListByOperationType ¶
func (r *TrackingRepository) ListByOperationType(_ context.Context, operationType string, startTime, endTime time.Time, limit int) ([]*models.DynamoDBCostRecord, error)
ListByOperationType lists cost tracking records by operation type
func (*TrackingRepository) ListByTable ¶
func (r *TrackingRepository) ListByTable(_ context.Context, tableName string, startTime, endTime time.Time, limit int, _ string) ([]*models.DynamoDBCostRecord, string, error)
ListByTable lists cost tracking records by table
func (*TrackingRepository) UpdateAggregated ¶
func (r *TrackingRepository) UpdateAggregated(_ context.Context, aggregated *models.DynamoDBCostAggregation) error
UpdateAggregated updates an existing aggregated cost tracking record
func (*TrackingRepository) UpdateRelayMetrics ¶
func (r *TrackingRepository) UpdateRelayMetrics(_ context.Context, metrics *models.RelayMetrics) error
UpdateRelayMetrics updates existing relay metrics
type TrendingRepository ¶
type TrendingRepository struct {
// contains filtered or unexported fields
}
TrendingRepository is a thread-safe in-memory implementation of interfaces.TrendingRepository.
func NewTrendingRepository ¶
func NewTrendingRepository() *TrendingRepository
NewTrendingRepository creates a new in-memory trending repository
func (*TrendingRepository) Clear ¶
func (r *TrendingRepository) Clear()
Clear clears all data (test helper)
func (*TrendingRepository) GetEngagementMetrics ¶
func (r *TrendingRepository) GetEngagementMetrics(_ context.Context, statusID string) (*storage.EngagementMetrics, error)
GetEngagementMetrics retrieves stored engagement metrics for a status
func (*TrendingRepository) GetRecentHashtags ¶
func (r *TrendingRepository) GetRecentHashtags(ctx context.Context, since time.Time, limit int) ([]*storage.TrendingHashtag, error)
GetRecentHashtags returns recent hashtags since the given time
func (*TrendingRepository) GetRecentLinks ¶
func (r *TrendingRepository) GetRecentLinks(ctx context.Context, since time.Time, limit int) ([]*storage.TrendingLink, error)
GetRecentLinks returns recent links since the given time
func (*TrendingRepository) GetRecentStatusesWithEngagement ¶
func (r *TrendingRepository) GetRecentStatusesWithEngagement(ctx context.Context, since time.Time, limit int) ([]*storage.TrendingStatus, error)
GetRecentStatusesWithEngagement returns recent statuses with engagement since the given time
func (*TrendingRepository) GetTrendingHashtags ¶
func (r *TrendingRepository) GetTrendingHashtags(_ context.Context, since time.Time, limit int) ([]*storage.TrendingHashtag, error)
GetTrendingHashtags returns the top trending hashtags since the given time
func (*TrendingRepository) GetTrendingLinks ¶
func (r *TrendingRepository) GetTrendingLinks(_ context.Context, since time.Time, limit int) ([]*storage.TrendingLink, error)
GetTrendingLinks returns the top trending links since the given time
func (*TrendingRepository) GetTrendingStatuses ¶
func (r *TrendingRepository) GetTrendingStatuses(_ context.Context, since time.Time, limit int) ([]*storage.TrendingStatus, error)
GetTrendingStatuses returns the top trending statuses since the given time
func (*TrendingRepository) RecordHashtagUsage ¶
func (r *TrendingRepository) RecordHashtagUsage(_ context.Context, hashtag string, statusID string, authorID string) error
RecordHashtagUsage records when a hashtag is used in a status
func (*TrendingRepository) RecordLinkShare ¶
func (r *TrendingRepository) RecordLinkShare(_ context.Context, linkURL string, statusID string, authorID string) error
RecordLinkShare records when a link is shared in a status
func (*TrendingRepository) RecordStatusEngagement ¶
func (r *TrendingRepository) RecordStatusEngagement(_ context.Context, statusID string, engagementType string, userID string) error
RecordStatusEngagement records engagement on a status (like, boost, reply)
func (*TrendingRepository) SetStatusRepository ¶
func (r *TrendingRepository) SetStatusRepository(statusRepo interface{})
SetStatusRepository sets the status repository dependency for cross-repository operations
func (*TrendingRepository) StoreEngagementMetrics ¶
func (r *TrendingRepository) StoreEngagementMetrics(_ context.Context, metrics *storage.EngagementMetrics) error
StoreEngagementMetrics stores engagement metrics for a status
func (*TrendingRepository) StoreHashtagTrend ¶
func (r *TrendingRepository) StoreHashtagTrend(_ context.Context, _ any) error
StoreHashtagTrend stores a hashtag trend record
func (*TrendingRepository) StoreLinkTrend ¶
func (r *TrendingRepository) StoreLinkTrend(_ context.Context, _ any) error
StoreLinkTrend stores a link trend record
func (*TrendingRepository) StoreStatusTrend ¶
func (r *TrendingRepository) StoreStatusTrend(_ context.Context, _ any) error
StoreStatusTrend stores a status trend record
type TrustRepository ¶
type TrustRepository struct {
// contains filtered or unexported fields
}
TrustRepository is a thread-safe in-memory implementation of interfaces.TrustRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewTrustRepository ¶
func NewTrustRepository() *TrustRepository
NewTrustRepository creates a new in-memory trust repository
func (*TrustRepository) Clear ¶
func (r *TrustRepository) Clear()
Clear clears all data (test helper)
func (*TrustRepository) CreateTrustRelationship ¶
func (r *TrustRepository) CreateTrustRelationship(_ context.Context, relationship *storage.TrustRelationship) error
CreateTrustRelationship creates or updates a trust relationship between two actors
func (*TrustRepository) DeleteTrustRelationship ¶
func (r *TrustRepository) DeleteTrustRelationship(_ context.Context, trusterID, trusteeID, category string) error
DeleteTrustRelationship removes a trust relationship
func (*TrustRepository) GetAllTrustRelationships ¶
func (r *TrustRepository) GetAllTrustRelationships(_ context.Context, limit int) ([]*storage.TrustRelationship, error)
GetAllTrustRelationships retrieves all trust relationships for admin visualization
func (*TrustRepository) GetRelationshipCount ¶
func (r *TrustRepository) GetRelationshipCount() int
GetRelationshipCount returns the number of relationships (test helper)
func (*TrustRepository) GetScoreCount ¶
func (r *TrustRepository) GetScoreCount() int
GetScoreCount returns the number of scores (test helper)
func (*TrustRepository) GetTrustRelationship ¶
func (r *TrustRepository) GetTrustRelationship(_ context.Context, trusterID, trusteeID, category string) (*storage.TrustRelationship, error)
GetTrustRelationship retrieves a specific trust relationship
func (*TrustRepository) GetTrustRelationships ¶
func (r *TrustRepository) GetTrustRelationships(_ context.Context, trusterID string, limit int, cursor string) ([]*storage.TrustRelationship, string, error)
GetTrustRelationships retrieves all trust relationships for a truster with pagination
func (*TrustRepository) GetTrustScore ¶
func (r *TrustRepository) GetTrustScore(_ context.Context, actorID, category string) (*storage.TrustScore, error)
GetTrustScore retrieves a cached trust score or calculates it
func (*TrustRepository) GetTrustedByRelationships ¶
func (r *TrustRepository) GetTrustedByRelationships(_ context.Context, trusteeID string, limit int, cursor string) ([]*storage.TrustRelationship, string, error)
GetTrustedByRelationships retrieves all relationships where the actor is trusted with pagination
func (*TrustRepository) GetUpdateCount ¶
func (r *TrustRepository) GetUpdateCount() int
GetUpdateCount returns the number of updates (test helper)
func (*TrustRepository) GetUserTrustScore ¶
GetUserTrustScore retrieves the trust score for a user
func (*TrustRepository) RecordTrustUpdate ¶
func (r *TrustRepository) RecordTrustUpdate(_ context.Context, update *storage.TrustUpdate) error
RecordTrustUpdate records a trust score update event
func (*TrustRepository) UpdateTrustRelationship ¶
func (r *TrustRepository) UpdateTrustRelationship(_ context.Context, relationship *storage.TrustRelationship) error
UpdateTrustRelationship updates an existing trust relationship
func (*TrustRepository) UpdateTrustScore ¶
func (r *TrustRepository) UpdateTrustScore(_ context.Context, score *storage.TrustScore) error
UpdateTrustScore updates a cached trust score
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository is a thread-safe in-memory implementation of interfaces.UserRepository. It stores data in memory for integration-style testing without requiring DynamoDB.
func NewUserRepository ¶
func NewUserRepository() *UserRepository
NewUserRepository creates a new in-memory user repository
func (*UserRepository) AcceptFollow ¶
func (r *UserRepository) AcceptFollow(_ context.Context, followerUsername, followedUsername string) error
AcceptFollow accepts a follow request
func (*UserRepository) CacheRemoteActor ¶
func (r *UserRepository) CacheRemoteActor(_ context.Context, handle string, actor *activitypub.Actor, ttl time.Duration) error
CacheRemoteActor caches a remote actor
func (*UserRepository) CreateAccountNote ¶
func (r *UserRepository) CreateAccountNote(_ context.Context, note *storage.AccountNote) error
CreateAccountNote creates an account note
func (*UserRepository) CreateAccountPin ¶
func (r *UserRepository) CreateAccountPin(_ context.Context, pin *storage.AccountPin) error
CreateAccountPin creates an account pin
func (*UserRepository) CreateBookmark ¶
func (r *UserRepository) CreateBookmark(_ context.Context, username, objectID string) error
CreateBookmark creates a bookmark
func (*UserRepository) CreateConversationMute ¶
func (r *UserRepository) CreateConversationMute(_ context.Context, mute *storage.ConversationMute) error
CreateConversationMute creates a conversation mute
func (*UserRepository) CreateTrustRelationship ¶
func (r *UserRepository) CreateTrustRelationship(_ context.Context, relationship *storage.TrustRelationship) error
CreateTrustRelationship creates a trust relationship
func (*UserRepository) CreateUser ¶
CreateUser creates a new user
func (*UserRepository) CreateVouch ¶
CreateVouch creates a vouch
func (*UserRepository) DeleteAccountNote ¶
func (r *UserRepository) DeleteAccountNote(_ context.Context, username, targetActorID string) error
DeleteAccountNote deletes an account note
func (*UserRepository) DeleteAccountPin ¶
func (r *UserRepository) DeleteAccountPin(_ context.Context, username, pinnedActorID string) error
DeleteAccountPin deletes an account pin
func (*UserRepository) DeleteConversationMute ¶
func (r *UserRepository) DeleteConversationMute(_ context.Context, username, conversationID string) error
DeleteConversationMute deletes a conversation mute
func (*UserRepository) DeleteExpiredTimelineEntries ¶
DeleteExpiredTimelineEntries deletes expired timeline entries
func (*UserRepository) DeleteFromTimeline ¶
func (r *UserRepository) DeleteFromTimeline(_ context.Context, timelineType, timelineID, entryID string) error
DeleteFromTimeline deletes an entry from a timeline
func (*UserRepository) DeleteTrustRelationship ¶
func (r *UserRepository) DeleteTrustRelationship(_ context.Context, trusterID, trusteeID, category string) error
DeleteTrustRelationship deletes a trust relationship
func (*UserRepository) DeleteUser ¶
func (r *UserRepository) DeleteUser(_ context.Context, username string) error
DeleteUser deletes a user
func (*UserRepository) FanOutPost ¶
func (r *UserRepository) FanOutPost(_ context.Context, _ *activitypub.Activity) error
FanOutPost fans out a post to followers' timelines
func (*UserRepository) GetAccountNote ¶
func (r *UserRepository) GetAccountNote(_ context.Context, username, targetActorID string) (*storage.AccountNote, error)
GetAccountNote gets an account note
func (*UserRepository) GetAccountPins ¶
func (r *UserRepository) GetAccountPins(_ context.Context, username string) ([]*storage.AccountPin, error)
GetAccountPins gets all account pins for a user
func (*UserRepository) GetActiveUserCount ¶
GetActiveUserCount returns the count of active users
func (*UserRepository) GetAllPreferences ¶
func (r *UserRepository) GetAllPreferences(_ context.Context, username string) (map[string]any, error)
GetAllPreferences gets all preferences as a map for a user
func (*UserRepository) GetAllTrustRelationships ¶
func (r *UserRepository) GetAllTrustRelationships(_ context.Context, limit int) ([]*storage.TrustRelationship, error)
GetAllTrustRelationships gets all trust relationships
func (*UserRepository) GetBookmarks ¶
func (r *UserRepository) GetBookmarks(_ context.Context, username string, limit int, _ string) ([]string, string, error)
GetBookmarks gets bookmarks for a user
func (*UserRepository) GetDirectTimeline ¶
func (r *UserRepository) GetDirectTimeline(_ context.Context, username string, limit int, _ string) ([]*storage.TimelineEntry, string, error)
GetDirectTimeline gets the direct message timeline for a user
func (*UserRepository) GetFollowRequestState ¶
func (r *UserRepository) GetFollowRequestState(_ context.Context, followerID, targetID string) (string, error)
GetFollowRequestState gets the state of a follow request
func (*UserRepository) GetHashtagTimeline ¶
func (r *UserRepository) GetHashtagTimeline(_ context.Context, hashtag string, _ bool, limit int, _ string) ([]*storage.TimelineEntry, string, error)
GetHashtagTimeline gets the timeline for a hashtag
func (*UserRepository) GetLinkedProviders ¶
GetLinkedProviders gets all linked OAuth providers for a user
func (*UserRepository) GetListTimeline ¶
func (r *UserRepository) GetListTimeline(_ context.Context, listID string, limit int, _ string) ([]*storage.TimelineEntry, string, error)
GetListTimeline gets the timeline for a list
func (*UserRepository) GetMonthlyVouchCount ¶
func (r *UserRepository) GetMonthlyVouchCount(_ context.Context, actorID string, year int, month time.Month) (int, error)
GetMonthlyVouchCount gets the count of vouches in a month
func (*UserRepository) GetMutedConversations ¶
func (r *UserRepository) GetMutedConversations(_ context.Context, username string) ([]string, error)
GetMutedConversations gets all muted conversations for a user
func (*UserRepository) GetPendingFollowRequests ¶
func (r *UserRepository) GetPendingFollowRequests(_ context.Context, username string, limit int, _ string) ([]string, string, error)
GetPendingFollowRequests gets pending follow requests for a user
func (*UserRepository) GetPreference ¶
GetPreference gets a single preference for a user
func (*UserRepository) GetReputation ¶
func (r *UserRepository) GetReputation(_ context.Context, actorID string) (*storage.Reputation, error)
GetReputation gets the latest reputation for an actor
func (*UserRepository) GetReputationHistory ¶
func (r *UserRepository) GetReputationHistory(_ context.Context, actorID string, limit int) ([]*storage.Reputation, error)
GetReputationHistory gets reputation history for an actor
func (*UserRepository) GetTotalUserCount ¶
func (r *UserRepository) GetTotalUserCount(_ context.Context) (int64, error)
GetTotalUserCount returns the total count of users
func (*UserRepository) GetTrustRelationship ¶
func (r *UserRepository) GetTrustRelationship(_ context.Context, trusterID, trusteeID, category string) (*storage.TrustRelationship, error)
GetTrustRelationship gets a trust relationship
func (*UserRepository) GetTrustRelationships ¶
func (r *UserRepository) GetTrustRelationships(_ context.Context, trusterID string, limit int, _ string) ([]*storage.TrustRelationship, string, error)
GetTrustRelationships gets trust relationships for a truster
func (*UserRepository) GetTrustScore ¶
func (r *UserRepository) GetTrustScore(_ context.Context, actorID, category string) (*storage.TrustScore, error)
GetTrustScore gets a trust score
func (*UserRepository) GetTrustedByRelationships ¶
func (r *UserRepository) GetTrustedByRelationships(_ context.Context, trusteeID string, limit int, _ string) ([]*storage.TrustRelationship, string, error)
GetTrustedByRelationships gets relationships where the actor is trusted
func (*UserRepository) GetUserByEmail ¶
GetUserByEmail retrieves a user by email
func (*UserRepository) GetUserByProviderID ¶
func (r *UserRepository) GetUserByProviderID(_ context.Context, provider, providerID string) (*storage.User, error)
GetUserByProviderID gets a user by OAuth provider ID
func (*UserRepository) GetUserLanguagePreference ¶
func (r *UserRepository) GetUserLanguagePreference(_ context.Context, username string) (string, error)
GetUserLanguagePreference gets the language preference for a user
func (*UserRepository) GetUserPreferences ¶
func (r *UserRepository) GetUserPreferences(_ context.Context, username string) (*storage.UserPreferences, error)
GetUserPreferences gets all preferences for a user
func (*UserRepository) GetUserTrustScore ¶
GetUserTrustScore gets the trust score for a user
func (*UserRepository) GetVouchesByActor ¶
func (r *UserRepository) GetVouchesByActor(_ context.Context, actorID string, activeOnly bool) ([]*storage.Vouch, error)
GetVouchesByActor gets vouches given by an actor
func (*UserRepository) GetVouchesForActor ¶
func (r *UserRepository) GetVouchesForActor(_ context.Context, actorID string, activeOnly bool) ([]*storage.Vouch, error)
GetVouchesForActor gets vouches received by an actor
func (*UserRepository) IsAccountPinned ¶
IsAccountPinned checks if an account is pinned
func (*UserRepository) IsBookmarked ¶
IsBookmarked checks if an object is bookmarked
func (*UserRepository) IsConversationMuted ¶
func (r *UserRepository) IsConversationMuted(_ context.Context, username, conversationID string) (bool, error)
IsConversationMuted checks if a conversation is muted
func (*UserRepository) IsNotificationMuted ¶
func (r *UserRepository) IsNotificationMuted(_ context.Context, userID, targetID string) (bool, error)
IsNotificationMuted checks if notifications from a target are muted
func (*UserRepository) LinkProviderAccount ¶
func (r *UserRepository) LinkProviderAccount(_ context.Context, username, provider, providerID string) error
LinkProviderAccount links an OAuth provider account to a user
func (*UserRepository) ListAgents ¶
func (r *UserRepository) ListAgents(_ context.Context, limit int32, cursor string) ([]*storage.User, string, error)
ListAgents lists agent accounts with pagination.
func (*UserRepository) ListUsers ¶
func (r *UserRepository) ListUsers(_ context.Context, limit int32, cursor string) ([]*storage.User, string, error)
ListUsers lists users with pagination
func (*UserRepository) ListUsersByRole ¶
ListUsersByRole lists users by role
func (*UserRepository) RecordTrustUpdate ¶
func (r *UserRepository) RecordTrustUpdate(_ context.Context, update *storage.TrustUpdate) error
RecordTrustUpdate records a trust update
func (*UserRepository) RejectFollow ¶
func (r *UserRepository) RejectFollow(_ context.Context, followerUsername, followedUsername string) error
RejectFollow rejects a follow request
func (*UserRepository) RemoveBookmark ¶
func (r *UserRepository) RemoveBookmark(_ context.Context, username, objectID string) error
RemoveBookmark removes a bookmark
func (*UserRepository) RemoveFromFollowers ¶
func (r *UserRepository) RemoveFromFollowers(_ context.Context, username, followerUsername string) error
RemoveFromFollowers removes a follower from a user's followers list
func (*UserRepository) SetPreference ¶
SetPreference sets a single preference for a user
func (*UserRepository) SetUserLanguagePreference ¶
func (r *UserRepository) SetUserLanguagePreference(_ context.Context, username string, language string) error
SetUserLanguagePreference sets the language preference for a user
func (*UserRepository) StoreReputation ¶
func (r *UserRepository) StoreReputation(_ context.Context, actorID string, reputation *storage.Reputation) error
StoreReputation stores a reputation record
func (*UserRepository) UnlinkProviderAccount ¶
func (r *UserRepository) UnlinkProviderAccount(_ context.Context, username, provider string) error
UnlinkProviderAccount unlinks an OAuth provider account from a user
func (*UserRepository) UpdateAccountNote ¶
func (r *UserRepository) UpdateAccountNote(_ context.Context, note *storage.AccountNote) error
UpdateAccountNote updates an account note
func (*UserRepository) UpdatePreferences ¶
func (r *UserRepository) UpdatePreferences(_ context.Context, username string, preferences map[string]any) error
UpdatePreferences updates multiple preferences for a user
func (*UserRepository) UpdateTrustRelationship ¶
func (r *UserRepository) UpdateTrustRelationship(ctx context.Context, relationship *storage.TrustRelationship) error
UpdateTrustRelationship updates a trust relationship
func (*UserRepository) UpdateTrustScore ¶
func (r *UserRepository) UpdateTrustScore(_ context.Context, score *storage.TrustScore) error
UpdateTrustScore updates a trust score
func (*UserRepository) UpdateUser ¶
func (r *UserRepository) UpdateUser(_ context.Context, username string, updates map[string]any) error
UpdateUser updates an existing user
func (*UserRepository) UpdateUserPreferences ¶
func (r *UserRepository) UpdateUserPreferences(_ context.Context, username string, preferences *storage.UserPreferences) error
UpdateUserPreferences updates preferences for a user
func (*UserRepository) UpdateVouchStatus ¶
func (r *UserRepository) UpdateVouchStatus(_ context.Context, vouchID string, active bool, revokedAt *time.Time) error
UpdateVouchStatus updates the status of a vouch
type WebSocketCostRepository ¶
type WebSocketCostRepository struct {
// contains filtered or unexported fields
}
WebSocketCostRepository is a thread-safe in-memory implementation of interfaces.WebSocketCostRepository.
func NewWebSocketCostRepository ¶
func NewWebSocketCostRepository() *WebSocketCostRepository
NewWebSocketCostRepository creates a new in-memory WebSocket cost repository
func (*WebSocketCostRepository) AggregateWebSocketCosts ¶
func (r *WebSocketCostRepository) AggregateWebSocketCosts(_ context.Context, _, _ string, _, _ time.Time) error
AggregateWebSocketCosts performs aggregation of raw WebSocket cost data
func (*WebSocketCostRepository) BatchCreate ¶
func (r *WebSocketCostRepository) BatchCreate(ctx context.Context, records []*models.WebSocketCostRecord) error
BatchCreate creates multiple WebSocket cost tracking records
func (*WebSocketCostRepository) CheckBudgetLimits ¶
func (r *WebSocketCostRepository) CheckBudgetLimits(_ context.Context, userID string) (*interfaces.BudgetStatus, error)
CheckBudgetLimits checks if a user has exceeded their budget limits
func (*WebSocketCostRepository) Clear ¶
func (r *WebSocketCostRepository) Clear()
Clear clears all data (test helper)
func (*WebSocketCostRepository) Create ¶
func (r *WebSocketCostRepository) Create(ctx context.Context, record *models.WebSocketCostRecord) error
Create creates a new WebSocket cost tracking record (legacy)
func (*WebSocketCostRepository) CreateAggregation ¶
func (r *WebSocketCostRepository) CreateAggregation(_ context.Context, aggregation *models.WebSocketCostAggregation) error
CreateAggregation creates a new WebSocket cost aggregation
func (*WebSocketCostRepository) CreateBudget ¶
func (r *WebSocketCostRepository) CreateBudget(_ context.Context, budget *models.WebSocketCostBudget) error
CreateBudget creates a new WebSocket cost budget for a user
func (*WebSocketCostRepository) CreateRecord ¶
func (r *WebSocketCostRepository) CreateRecord(_ context.Context, record *models.WebSocketCostRecord) error
CreateRecord creates a new WebSocket cost tracking record
func (*WebSocketCostRepository) Get ¶
func (r *WebSocketCostRepository) Get(ctx context.Context, operationType, id string, timestamp time.Time) (*models.WebSocketCostRecord, error)
Get retrieves a WebSocket cost tracking record (legacy)
func (*WebSocketCostRepository) GetAggregation ¶
func (r *WebSocketCostRepository) GetAggregation(_ context.Context, period, operationType string, windowStart time.Time) (*models.WebSocketCostAggregation, error)
GetAggregation retrieves WebSocket cost aggregation
func (*WebSocketCostRepository) GetBudget ¶
func (r *WebSocketCostRepository) GetBudget(_ context.Context, userID, period string) (*models.WebSocketCostBudget, error)
GetBudget retrieves WebSocket cost budget for a user and period
func (*WebSocketCostRepository) GetConnectionCostSummary ¶
func (r *WebSocketCostRepository) GetConnectionCostSummary(_ context.Context, connectionID string, startTime, endTime time.Time) (*interfaces.WebSocketConnectionCostSummary, error)
GetConnectionCostSummary calculates cost summary for a specific connection
func (*WebSocketCostRepository) GetRecentCosts ¶
func (r *WebSocketCostRepository) GetRecentCosts(_ context.Context, since time.Time, limit int) ([]*models.WebSocketCostRecord, error)
GetRecentCosts retrieves recent WebSocket cost tracking records
func (*WebSocketCostRepository) GetRecord ¶
func (r *WebSocketCostRepository) GetRecord(_ context.Context, operationType, id string, timestamp time.Time) (*models.WebSocketCostRecord, error)
GetRecord retrieves a WebSocket cost tracking record
func (*WebSocketCostRepository) GetUserAggregation ¶
func (r *WebSocketCostRepository) GetUserAggregation(_ context.Context, userID, period, operationType string, windowStart time.Time) (*models.WebSocketCostAggregation, error)
GetUserAggregation retrieves WebSocket cost aggregation for a specific user
func (*WebSocketCostRepository) GetUserBudgets ¶
func (r *WebSocketCostRepository) GetUserBudgets(_ context.Context, userID string) ([]*models.WebSocketCostBudget, error)
GetUserBudgets retrieves all budgets for a user
func (*WebSocketCostRepository) GetUserCostSummary ¶
func (r *WebSocketCostRepository) GetUserCostSummary(_ context.Context, userID string, startTime, endTime time.Time) (*interfaces.WebSocketUserCostSummary, error)
GetUserCostSummary calculates cost summary for a specific user
func (*WebSocketCostRepository) ListAggregationsByPeriod ¶
func (r *WebSocketCostRepository) ListAggregationsByPeriod(_ context.Context, period, operationType string, startTime, endTime time.Time, limit int) ([]*models.WebSocketCostAggregation, error)
ListAggregationsByPeriod lists WebSocket cost aggregations for a period
func (*WebSocketCostRepository) ListByConnection ¶
func (r *WebSocketCostRepository) ListByConnection(_ context.Context, connectionID string, startTime, endTime time.Time, limit int) ([]*models.WebSocketCostRecord, error)
ListByConnection lists WebSocket cost tracking records by connection ID
func (*WebSocketCostRepository) ListByOperationType ¶
func (r *WebSocketCostRepository) ListByOperationType(_ context.Context, operationType string, startTime, endTime time.Time, limit int) ([]*models.WebSocketCostRecord, error)
ListByOperationType lists WebSocket cost tracking records by operation type
func (*WebSocketCostRepository) ListByUser ¶
func (r *WebSocketCostRepository) ListByUser(_ context.Context, userID string, startTime, endTime time.Time, limit int) ([]*models.WebSocketCostRecord, error)
ListByUser lists WebSocket cost tracking records by user ID
func (*WebSocketCostRepository) UpdateAggregation ¶
func (r *WebSocketCostRepository) UpdateAggregation(_ context.Context, aggregation *models.WebSocketCostAggregation) error
UpdateAggregation updates an existing WebSocket cost aggregation
func (*WebSocketCostRepository) UpdateBudget ¶
func (r *WebSocketCostRepository) UpdateBudget(_ context.Context, budget *models.WebSocketCostBudget) error
UpdateBudget updates an existing WebSocket cost budget
func (*WebSocketCostRepository) UpdateBudgetUsage ¶
func (r *WebSocketCostRepository) UpdateBudgetUsage(_ context.Context, userID string, additionalCostMicroCents int64) error
UpdateBudgetUsage updates budget usage based on new cost records
Source Files
¶
- account_repository.go
- activity_repository.go
- actor_repository.go
- ai_repository.go
- announcement_repository.go
- article_repository.go
- audit_repository.go
- author_pagination_helper.go
- bookmark_repository.go
- category_repository.go
- cloudwatch_metrics_repository.go
- community_note_repository.go
- conversation_repository.go
- cost_tracking_helper.go
- dlq_repository.go
- dns_cache_repository.go
- doc.go
- domain_block_repository.go
- draft_repository.go
- emoji_repository.go
- export_repository.go
- featured_tag_repository.go
- federation_repository.go
- filter_repository.go
- hashtag_repository.go
- import_repository.go
- instance_repository.go
- like_repository.go
- list_repository.go
- marker_repository.go
- media_analytics_repository.go
- media_metadata_repository.go
- media_popularity_repository.go
- media_repository.go
- media_session_repository.go
- metric_record_repository.go
- moderation_ml_repository.go
- moderation_repository.go
- notification_repository.go
- oauth_repository.go
- object_repository.go
- pagination_helper.go
- poll_repository.go
- publication_member_repository.go
- publication_repository.go
- push_subscription_repository.go
- quote_repository.go
- rate_limit_repository.go
- recovery_repository.go
- relationship_repository.go
- relay_repository.go
- revision_repository.go
- scheduled_status_repository.go
- search_repository.go
- series_repository.go
- severance_repository.go
- social_repository.go
- status_constants.go
- status_repository.go
- streaming_cloudwatch_repository.go
- streaming_connection_repository.go
- thread_repository.go
- timeline_repository.go
- tracking_repository.go
- trending_repository.go
- trust_repository.go
- user_repository.go
- websocket_cost_repository.go