Documentation
¶
Index ¶
- func IsRetryableError(err error) bool
- func NewEventBus(cfg config.Config, redis *redisclient.Client) interfaces.EventBus
- func NewIdentityProvider(cfg config.AuthConfig, repos *Repositories) interfaces.IdentityProvider
- func NewJobQueue(logger *slog.Logger, cfg config.Config, client *redisclient.Client, ...) interfaces.JobQueue
- func NewNodeSelector(nodes interfaces.WebRTCNodeRepository, cfg config.Config) interfaces.NodeSelector
- func NewNotificationHandlers(logger interfaces.EventBus, messages interfaces.MessageRepository, ...) map[string]interfaces.JobHandler
- func NewObjectStorage(cfg config.StorageConfig) (interfaces.ObjectStorage, error)
- func NewWebRTCProvider(cfg config.Config) interfaces.WebRTCProvider
- func Permanent(err error) error
- func RegisterWorkerHandlers(registry *JobRegistry, notifications map[string]interfaces.JobHandler, ...)
- func Retryable(err error) error
- type AuditService
- type AuthRateLimiter
- type AuthResult
- type AuthService
- func (s *AuthService) ChangePassword(ctx context.Context, principal interfaces.Principal, currentPassword string, ...) error
- func (s *AuthService) CleanupExpired(ctx context.Context) error
- func (s *AuthService) ClearRefreshCookie(c *gin.Context)
- func (s *AuthService) CurrentUser(ctx context.Context, principal interfaces.Principal) (*AuthUserDTO, error)
- func (s *AuthService) ListSessions(ctx context.Context, principal interfaces.Principal) ([]AuthSessionDTO, error)
- func (s *AuthService) Login(ctx context.Context, req LoginInput, meta RequestMetadata) (*AuthResult, error)
- func (s *AuthService) Logout(ctx context.Context, sessionID string) error
- func (s *AuthService) LogoutAll(ctx context.Context, userID string, exceptCurrent bool, ...) error
- func (s *AuthService) Refresh(ctx context.Context, refreshToken string, meta RequestMetadata) (*AuthResult, error)
- func (s *AuthService) Register(ctx context.Context, req RegisterInput, meta RequestMetadata) (*AuthResult, error)
- func (s *AuthService) RequestPasswordReset(ctx context.Context, email string) error
- func (s *AuthService) RevokeSession(ctx context.Context, principal interfaces.Principal, sessionID string) error
- func (s *AuthService) SetRefreshCookie(c *gin.Context, token string)
- type AuthSessionDTO
- type AuthUserDTO
- type ChannelService
- func (s *ChannelService) Create(ctx context.Context, principal interfaces.Principal, workspaceID string, ...) (*models.Channel, error)
- func (s *ChannelService) Delete(ctx context.Context, principal interfaces.Principal, channelID string) error
- func (s *ChannelService) Get(ctx context.Context, principal interfaces.Principal, channelID string) (*models.Channel, error)
- func (s *ChannelService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]models.Channel, error)
- func (s *ChannelService) Update(ctx context.Context, principal interfaces.Principal, ...) (*models.Channel, error)
- type ConsumerConfig
- type ConversationDTO
- type ConversationParticipantDTO
- type ConversationService
- func (s *ConversationService) Create(ctx context.Context, principal interfaces.Principal, ...) (*models.Conversation, error)
- func (s *ConversationService) CreateWithMembers(ctx context.Context, principal interfaces.Principal, ...) (*ConversationDTO, error)
- func (s *ConversationService) Delete(ctx context.Context, principal interfaces.Principal, conversationID string) error
- func (s *ConversationService) Get(ctx context.Context, principal interfaces.Principal, conversationID string) (*models.Conversation, error)
- func (s *ConversationService) GetWithMembers(ctx context.Context, principal interfaces.Principal, conversationID string) (*ConversationDTO, error)
- func (s *ConversationService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]models.Conversation, error)
- func (s *ConversationService) ListWithMembers(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]ConversationDTO, error)
- func (s *ConversationService) Update(ctx context.Context, principal interfaces.Principal, ...) (*models.Conversation, error)
- func (s *ConversationService) UpdateWithMembers(ctx context.Context, principal interfaces.Principal, ...) (*ConversationDTO, error)
- type DatabaseService
- type DisabledWebRTCProvider
- func (p *DisabledWebRTCProvider) CreateJoinToken(context.Context, interfaces.JoinTokenInput) (*interfaces.JoinToken, error)
- func (p *DisabledWebRTCProvider) CreateRoom(context.Context, interfaces.CreateRoomInput) (*interfaces.ProviderRoom, error)
- func (p *DisabledWebRTCProvider) DeleteRoom(context.Context, string) error
- func (p *DisabledWebRTCProvider) GetRoom(context.Context, string) (*interfaces.ProviderRoom, error)
- func (p *DisabledWebRTCProvider) Healthy(context.Context) error
- func (p *DisabledWebRTCProvider) InternalURL() string
- func (p *DisabledWebRTCProvider) ListParticipants(context.Context, string) ([]interfaces.ProviderParticipant, error)
- func (p *DisabledWebRTCProvider) ListRooms(context.Context) ([]interfaces.ProviderRoom, error)
- func (p *DisabledWebRTCProvider) MuteParticipantTrack(context.Context, interfaces.MuteTrackInput) error
- func (p *DisabledWebRTCProvider) ProviderName() string
- func (p *DisabledWebRTCProvider) PublicURL() string
- func (p *DisabledWebRTCProvider) RemoveParticipant(context.Context, string, string) error
- type GenericWebhookProvider
- type Hub
- type InMemoryEventBus
- type InMemoryJobQueue
- func (q *InMemoryJobQueue) Close() error
- func (q *InMemoryJobQueue) Consume(ctx context.Context, queue string, _ string, _ string, ...) error
- func (q *InMemoryJobQueue) DeadLetter(_ context.Context, queue string, job models.Job, cause error) error
- func (q *InMemoryJobQueue) Enqueue(_ context.Context, queue string, job models.Job) error
- func (q *InMemoryJobQueue) Healthy(context.Context) error
- func (q *InMemoryJobQueue) ListDeadLetters(_ context.Context, queue string, limit int) ([]models.Job, error)
- func (q *InMemoryJobQueue) Retry(ctx context.Context, queue string, job models.Job, delay time.Duration, ...) error
- type IntegrationService
- func (s *IntegrationService) Create(ctx context.Context, principal interfaces.Principal, ...) (*models.Integration, error)
- func (s *IntegrationService) Delete(ctx context.Context, principal interfaces.Principal, id string) error
- func (s *IntegrationService) Get(ctx context.Context, principal interfaces.Principal, id string) (*models.Integration, error)
- func (s *IntegrationService) HandleWebhook(ctx context.Context, provider, integrationID string, payload []byte, ...) error
- func (s *IntegrationService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]models.Integration, error)
- func (s *IntegrationService) ProcessWebhook(ctx context.Context, provider, integrationID string, payload []byte, ...) error
- func (s *IntegrationService) Update(ctx context.Context, principal interfaces.Principal, id, name, status string) (*models.Integration, error)
- type JWTIdentityProvider
- type JobRegistry
- type LiveKitProvider
- func (p *LiveKitProvider) CreateJoinToken(ctx context.Context, input interfaces.JoinTokenInput) (*interfaces.JoinToken, error)
- func (p *LiveKitProvider) CreateRoom(ctx context.Context, input interfaces.CreateRoomInput) (*interfaces.ProviderRoom, error)
- func (p *LiveKitProvider) DeleteRoom(ctx context.Context, roomName string) error
- func (p *LiveKitProvider) GetRoom(ctx context.Context, roomName string) (*interfaces.ProviderRoom, error)
- func (p *LiveKitProvider) Healthy(ctx context.Context) error
- func (p *LiveKitProvider) InternalURL() string
- func (p *LiveKitProvider) ListParticipants(ctx context.Context, roomName string) ([]interfaces.ProviderParticipant, error)
- func (p *LiveKitProvider) ListRooms(ctx context.Context) ([]interfaces.ProviderRoom, error)
- func (p *LiveKitProvider) MuteParticipantTrack(ctx context.Context, input interfaces.MuteTrackInput) error
- func (p *LiveKitProvider) ProviderName() string
- func (p *LiveKitProvider) PublicURL() string
- func (p *LiveKitProvider) RemoveParticipant(ctx context.Context, roomName string, identity string) error
- type LocalStorage
- func (s *LocalStorage) Delete(_ context.Context, key string) error
- func (s *LocalStorage) Get(_ context.Context, key string) (io.ReadCloser, error)
- func (s *LocalStorage) Put(ctx context.Context, object interfaces.Object) error
- func (s *LocalStorage) SignedURL(_ context.Context, key string, _ time.Duration) (string, error)
- type LoginInput
- type MeetingService
- func (s *MeetingService) AddParticipant(ctx context.Context, principal interfaces.Principal, ...) (*models.MeetingParticipant, error)
- func (s *MeetingService) AutoEndAbandoned(ctx context.Context) error
- func (s *MeetingService) Cancel(ctx context.Context, principal interfaces.Principal, meetingID string) (*models.Meeting, error)
- func (s *MeetingService) Create(ctx context.Context, principal interfaces.Principal, workspaceID, title string, ...) (*models.Meeting, error)
- func (s *MeetingService) End(ctx context.Context, principal interfaces.Principal, meetingID string) (*MeetingStartResponse, error)
- func (s *MeetingService) EnqueueDueReminders(ctx context.Context) error
- func (s *MeetingService) ExpireStale(ctx context.Context) error
- func (s *MeetingService) Get(ctx context.Context, principal interfaces.Principal, meetingID string) (*models.Meeting, error)
- func (s *MeetingService) JoinToken(ctx context.Context, principal interfaces.Principal, meetingID string) (*interfaces.JoinToken, error)
- func (s *MeetingService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]models.Meeting, error)
- func (s *MeetingService) ListParticipants(ctx context.Context, principal interfaces.Principal, meetingID string) ([]models.MeetingSessionParticipant, error)
- func (s *MeetingService) Start(ctx context.Context, principal interfaces.Principal, meetingID string) (*MeetingStartResponse, error)
- type MeetingStartResponse
- type MessageService
- func (s *MessageService) AddReaction(ctx context.Context, principal interfaces.Principal, messageID, emoji string) (*models.Reaction, error)
- func (s *MessageService) Create(ctx context.Context, principal interfaces.Principal, ...) (*models.Message, error)
- func (s *MessageService) Delete(ctx context.Context, principal interfaces.Principal, messageID string) error
- func (s *MessageService) Get(ctx context.Context, principal interfaces.Principal, messageID string) (*models.Message, error)
- func (s *MessageService) List(ctx context.Context, principal interfaces.Principal, ...) ([]models.Message, string, bool, error)
- func (s *MessageService) MarkRead(ctx context.Context, principal interfaces.Principal, ...) error
- func (s *MessageService) RemoveReaction(ctx context.Context, principal interfaces.Principal, messageID, emoji string) error
- func (s *MessageService) Update(ctx context.Context, principal interfaces.Principal, messageID, content string) (*models.Message, error)
- type NotificationDTO
- type NotificationPreferencesDTO
- type NotificationService
- func (s *NotificationService) Create(ctx context.Context, notification *models.Notification) error
- func (s *NotificationService) List(ctx context.Context, principal interfaces.Principal, cursor string, limit int) ([]NotificationDTO, string, bool, error)
- func (s *NotificationService) MarkAllRead(ctx context.Context, principal interfaces.Principal) (bool, error)
- func (s *NotificationService) MarkRead(ctx context.Context, principal interfaces.Principal, notificationID string) (bool, error)
- func (s *NotificationService) UnreadCount(ctx context.Context, principal interfaces.Principal) (int64, error)
- type OutboxService
- type PasswordHasher
- type PresenceRecord
- type PresenceService
- func (s *PresenceService) Close() error
- func (s *PresenceService) ExpireStale(ctx context.Context, limit int) error
- func (s *PresenceService) Get(ctx context.Context, workspaceID, userID string) (PresenceRecord, bool)
- func (s *PresenceService) PersistLastSeen(ctx context.Context) error
- func (s *PresenceService) RefreshUserState(ctx context.Context, userID string) error
- func (s *PresenceService) Set(ctx context.Context, workspaceID, userID, state string, deviceCount int) error
- func (s *PresenceService) SetSessionState(ctx context.Context, workspaceID, userID string, connected bool, ...) error
- type ProjectDTO
- type ProjectService
- type ProvisionWorkspaceUserInput
- type QueueProducer
- type RealtimeCommand
- type RedisEventBus
- type RedisStreamJobQueue
- func (q *RedisStreamJobQueue) Close() error
- func (q *RedisStreamJobQueue) Consume(ctx context.Context, queue string, consumerGroup string, consumerName string, ...) error
- func (q *RedisStreamJobQueue) DeadLetter(ctx context.Context, queue string, job models.Job, cause error) error
- func (q *RedisStreamJobQueue) Enqueue(ctx context.Context, queue string, job models.Job) error
- func (q *RedisStreamJobQueue) Healthy(ctx context.Context) error
- func (q *RedisStreamJobQueue) ListDeadLetters(ctx context.Context, queue string, limit int) ([]models.Job, error)
- func (q *RedisStreamJobQueue) Retry(ctx context.Context, queue string, job models.Job, delay time.Duration, ...) error
- type RegisterInput
- type Repositories
- func (r *Repositories) AuditLogs() interfaces.AuditLogRepository
- func (r *Repositories) AuthAuditEvents() interfaces.AuthAuditEventRepository
- func (r *Repositories) AuthRefreshTokens() interfaces.AuthRefreshTokenRepository
- func (r *Repositories) AuthSessions() interfaces.AuthSessionRepository
- func (r *Repositories) Channels() interfaces.ChannelRepository
- func (r *Repositories) ConversationMembers() interfaces.ConversationMemberRepository
- func (r *Repositories) Conversations() interfaces.ConversationRepository
- func (r *Repositories) EmailVerificationTokens() interfaces.EmailVerificationTokenRepository
- func (r *Repositories) Integrations() interfaces.IntegrationRepository
- func (r *Repositories) LocalCredentials() interfaces.LocalCredentialRepository
- func (r *Repositories) MeetingParticipants() interfaces.MeetingParticipantRepository
- func (r *Repositories) MeetingSessionParticipants() interfaces.MeetingSessionParticipantRepository
- func (r *Repositories) MeetingSessions() interfaces.MeetingSessionRepository
- func (r *Repositories) Meetings() interfaces.MeetingRepository
- func (r *Repositories) Messages() interfaces.MessageRepository
- func (r *Repositories) NotificationPreferences() interfaces.NotificationPreferenceRepository
- func (r *Repositories) Notifications() interfaces.NotificationRepository
- func (r *Repositories) OutboxEvents() interfaces.OutboxRepository
- func (r *Repositories) PasswordResetTokens() interfaces.PasswordResetTokenRepository
- func (r *Repositories) Projects() interfaces.ProjectRepository
- func (r *Repositories) Reactions() interfaces.ReactionRepository
- func (r *Repositories) ReadReceipts() interfaces.ReadReceiptRepository
- func (r *Repositories) Tasks() interfaces.TaskRepository
- func (r *Repositories) Teams() interfaces.TeamRepository
- func (r *Repositories) UserSettings() interfaces.UserSettingsRepository
- func (r *Repositories) Users() interfaces.UserRepository
- func (r *Repositories) WebRTCNodes() interfaces.WebRTCNodeRepository
- func (r *Repositories) WebRTCWebhookEvents() interfaces.WebRTCWebhookEventRepository
- func (r *Repositories) WithDB(db *gorm.DB) *Repositories
- func (r *Repositories) WorkspaceMembers() interfaces.WorkspaceMemberRepository
- func (r *Repositories) WorkspaceSSOConfigs() interfaces.WorkspaceSSOConfigRepository
- func (r *Repositories) Workspaces() interfaces.WorkspaceRepository
- type RequestMetadata
- type RetryableError
- type ScheduledJob
- type Scheduler
- type StaticNodeSelector
- type TaskDTO
- type TaskService
- type TeamService
- func (s *TeamService) Create(ctx context.Context, principal interfaces.Principal, ...) (*models.Team, error)
- func (s *TeamService) Delete(ctx context.Context, principal interfaces.Principal, teamID string) error
- func (s *TeamService) Get(ctx context.Context, principal interfaces.Principal, teamID string) (*models.Team, error)
- func (s *TeamService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]models.Team, error)
- func (s *TeamService) Update(ctx context.Context, principal interfaces.Principal, ...) (*models.Team, error)
- type UpdateWorkspaceSSOInput
- type UserPreferencesDTO
- type UserService
- func (s *UserService) EnsureUser(ctx context.Context, principal interfaces.Principal) (*models.User, error)
- func (s *UserService) GetMe(ctx context.Context, principal interfaces.Principal) (*models.User, error)
- func (s *UserService) GetNotificationPreferences(ctx context.Context, principal interfaces.Principal) (*NotificationPreferencesDTO, error)
- func (s *UserService) GetPreferences(ctx context.Context, principal interfaces.Principal) (*UserPreferencesDTO, error)
- func (s *UserService) UpdateMe(ctx context.Context, principal interfaces.Principal, ...) (*models.User, error)
- func (s *UserService) UpdateNotificationPreferences(ctx context.Context, principal interfaces.Principal, ...) (*NotificationPreferencesDTO, error)
- func (s *UserService) UpdatePreferences(ctx context.Context, principal interfaces.Principal, input UserPreferencesDTO) (*UserPreferencesDTO, error)
- type WebRTCMetrics
- func (m *WebRTCMetrics) IncJoinTokenFailures()
- func (m *WebRTCMetrics) IncJoinTokensIssued()
- func (m *WebRTCMetrics) IncProviderErrors()
- func (m *WebRTCMetrics) IncWebhookEvents()
- func (m *WebRTCMetrics) IncWebhookFailures()
- func (m *WebRTCMetrics) ObserveRoomCreateDuration(d time.Duration)
- func (m *WebRTCMetrics) RenderPrometheus() string
- func (m *WebRTCMetrics) SetActiveParticipants(v int64)
- func (m *WebRTCMetrics) SetActiveRooms(v int64)
- func (m *WebRTCMetrics) SetNodes(v int64)
- type WebRTCService
- func (s *WebRTCService) CleanupParticipants(ctx context.Context, sessionID string) error
- func (s *WebRTCService) CleanupStaleParticipants(ctx context.Context) error
- func (s *WebRTCService) CloseRoom(ctx context.Context, sessionID string, roomName string) error
- func (s *WebRTCService) EndMeeting(ctx context.Context, principal interfaces.Principal, meetingID string) (*MeetingStartResponse, error)
- func (s *WebRTCService) ExpireAbandonedSessions(ctx context.Context) error
- func (s *WebRTCService) HandleLiveKitWebhook(ctx context.Context, request *http.Request) error
- func (s *WebRTCService) JoinToken(ctx context.Context, principal interfaces.Principal, meetingID string) (*interfaces.JoinToken, error)
- func (s *WebRTCService) ListParticipants(ctx context.Context, principal interfaces.Principal, meetingID string) ([]models.MeetingSessionParticipant, error)
- func (s *WebRTCService) Ready(ctx context.Context) error
- func (s *WebRTCService) ReconcileRooms(ctx context.Context) error
- func (s *WebRTCService) Run(ctx context.Context) error
- func (s *WebRTCService) StartMeeting(ctx context.Context, principal interfaces.Principal, meetingID string) (*MeetingStartResponse, error)
- type Worker
- type WorkerMetrics
- type WorkspaceMemberDTO
- type WorkspaceSSOConfigDTO
- type WorkspaceService
- func (s *WorkspaceService) AddMember(ctx context.Context, principal interfaces.Principal, ...) (*WorkspaceMemberDTO, error)
- func (s *WorkspaceService) Archive(ctx context.Context, principal interfaces.Principal, workspaceID string) error
- func (s *WorkspaceService) AuthorizeWorkspace(ctx context.Context, principal interfaces.Principal, workspaceID string) (*models.WorkspaceMember, error)
- func (s *WorkspaceService) Create(ctx context.Context, principal interfaces.Principal, ...) (*models.Workspace, error)
- func (s *WorkspaceService) Get(ctx context.Context, principal interfaces.Principal, workspaceID string) (*models.Workspace, error)
- func (s *WorkspaceService) GetSSOConfig(ctx context.Context, principal interfaces.Principal, workspaceID string) (*WorkspaceSSOConfigDTO, error)
- func (s *WorkspaceService) List(ctx context.Context, principal interfaces.Principal) ([]models.Workspace, error)
- func (s *WorkspaceService) ListMembers(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]WorkspaceMemberDTO, error)
- func (s *WorkspaceService) ProvisionWorkspaceUser(ctx context.Context, principal interfaces.Principal, workspaceID string, ...) (*WorkspaceMemberDTO, error)
- func (s *WorkspaceService) RemoveMember(ctx context.Context, principal interfaces.Principal, ...) error
- func (s *WorkspaceService) Update(ctx context.Context, principal interfaces.Principal, ...) (*models.Workspace, error)
- func (s *WorkspaceService) UpdateMember(ctx context.Context, principal interfaces.Principal, ...) (*WorkspaceMemberDTO, error)
- func (s *WorkspaceService) UpdateSSOConfig(ctx context.Context, principal interfaces.Principal, workspaceID string, ...) (*WorkspaceSSOConfigDTO, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRetryableError ¶
func NewEventBus ¶
func NewEventBus(cfg config.Config, redis *redisclient.Client) interfaces.EventBus
func NewIdentityProvider ¶
func NewIdentityProvider(cfg config.AuthConfig, repos *Repositories) interfaces.IdentityProvider
func NewJobQueue ¶
func NewJobQueue(logger *slog.Logger, cfg config.Config, client *redisclient.Client, metrics *WorkerMetrics) interfaces.JobQueue
func NewNodeSelector ¶
func NewNodeSelector(nodes interfaces.WebRTCNodeRepository, cfg config.Config) interfaces.NodeSelector
func NewNotificationHandlers ¶
func NewNotificationHandlers(logger interfaces.EventBus, messages interfaces.MessageRepository, conversations interfaces.ConversationMemberRepository, notifications *NotificationService, workspaceMembers interfaces.WorkspaceMemberRepository) map[string]interfaces.JobHandler
func NewObjectStorage ¶
func NewObjectStorage(cfg config.StorageConfig) (interfaces.ObjectStorage, error)
func NewWebRTCProvider ¶
func NewWebRTCProvider(cfg config.Config) interfaces.WebRTCProvider
func RegisterWorkerHandlers ¶
func RegisterWorkerHandlers(registry *JobRegistry, notifications map[string]interfaces.JobHandler, presence *PresenceService, integrations *IntegrationService, meetings *MeetingService, auth *AuthService)
Types ¶
type AuditService ¶
type AuditService struct {
// contains filtered or unexported fields
}
func NewAuditService ¶
func NewAuditService(audits interfaces.AuditLogRepository, workspaces *WorkspaceService) *AuditService
type AuthRateLimiter ¶
type AuthRateLimiter struct {
// contains filtered or unexported fields
}
func NewAuthRateLimiter ¶
func NewAuthRateLimiter(redis *redisclient.Client) *AuthRateLimiter
type AuthResult ¶
type AuthResult struct {
User AuthUserDTO `json:"user"`
AccessToken string `json:"accessToken"`
ExpiresIn int64 `json:"expiresIn"`
RefreshToken string `json:"refreshToken,omitempty"`
SessionID string `json:"sessionId"`
}
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(cfg config.AuthConfig, db interfaces.Database, repos *Repositories, identity interfaces.IdentityProvider, outbox *OutboxService, limiter *AuthRateLimiter, workspaceSvc *WorkspaceService) *AuthService
func (*AuthService) ChangePassword ¶
func (s *AuthService) ChangePassword( ctx context.Context, principal interfaces.Principal, currentPassword string, newPassword string, meta RequestMetadata, ) error
func (*AuthService) CleanupExpired ¶
func (s *AuthService) CleanupExpired(ctx context.Context) error
func (*AuthService) ClearRefreshCookie ¶
func (s *AuthService) ClearRefreshCookie(c *gin.Context)
func (*AuthService) CurrentUser ¶
func (s *AuthService) CurrentUser(ctx context.Context, principal interfaces.Principal) (*AuthUserDTO, error)
func (*AuthService) ListSessions ¶
func (s *AuthService) ListSessions(ctx context.Context, principal interfaces.Principal) ([]AuthSessionDTO, error)
func (*AuthService) Login ¶
func (s *AuthService) Login(ctx context.Context, req LoginInput, meta RequestMetadata) (*AuthResult, error)
func (*AuthService) Logout ¶
func (s *AuthService) Logout(ctx context.Context, sessionID string) error
func (*AuthService) Refresh ¶
func (s *AuthService) Refresh(ctx context.Context, refreshToken string, meta RequestMetadata) (*AuthResult, error)
func (*AuthService) Register ¶
func (s *AuthService) Register(ctx context.Context, req RegisterInput, meta RequestMetadata) (*AuthResult, error)
func (*AuthService) RequestPasswordReset ¶
func (s *AuthService) RequestPasswordReset(ctx context.Context, email string) error
func (*AuthService) RevokeSession ¶
func (s *AuthService) RevokeSession(ctx context.Context, principal interfaces.Principal, sessionID string) error
func (*AuthService) SetRefreshCookie ¶
func (s *AuthService) SetRefreshCookie(c *gin.Context, token string)
type AuthSessionDTO ¶
type AuthUserDTO ¶
type AuthUserDTO struct {
ID string `json:"id"`
Email string `json:"email"`
DisplayName string `json:"displayName"`
AvatarURL *string `json:"avatarUrl,omitempty"`
Status string `json:"status"`
PresenceStatus string `json:"presenceStatus"`
WorkspaceID *string `json:"workspaceId,omitempty"`
Roles []string `json:"roles"`
Permissions []string `json:"permissions"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type ChannelService ¶
type ChannelService struct {
// contains filtered or unexported fields
}
func NewChannelService ¶
func NewChannelService(db interfaces.Database, repos *Repositories, workspaces *WorkspaceService, conversations interfaces.ConversationRepository) *ChannelService
func (*ChannelService) Delete ¶
func (s *ChannelService) Delete(ctx context.Context, principal interfaces.Principal, channelID string) error
func (*ChannelService) Get ¶
func (s *ChannelService) Get(ctx context.Context, principal interfaces.Principal, channelID string) (*models.Channel, error)
type ConsumerConfig ¶
type ConversationDTO ¶
type ConversationDTO struct {
models.Conversation
MemberIDs []string `json:"memberIds,omitempty"`
Participants []ConversationParticipantDTO `json:"participants,omitempty"`
}
type ConversationService ¶
type ConversationService struct {
// contains filtered or unexported fields
}
func NewConversationService ¶
func NewConversationService(conversations interfaces.ConversationRepository, members interfaces.ConversationMemberRepository, workspaces *WorkspaceService, bus interfaces.EventBus) *ConversationService
func (*ConversationService) Create ¶
func (s *ConversationService) Create(ctx context.Context, principal interfaces.Principal, workspaceID, conversationType, name string, memberIDs []string) (*models.Conversation, error)
func (*ConversationService) CreateWithMembers ¶
func (s *ConversationService) CreateWithMembers(ctx context.Context, principal interfaces.Principal, workspaceID, conversationType, name string, memberIDs []string) (*ConversationDTO, error)
func (*ConversationService) Delete ¶
func (s *ConversationService) Delete(ctx context.Context, principal interfaces.Principal, conversationID string) error
func (*ConversationService) Get ¶
func (s *ConversationService) Get(ctx context.Context, principal interfaces.Principal, conversationID string) (*models.Conversation, error)
func (*ConversationService) GetWithMembers ¶
func (s *ConversationService) GetWithMembers(ctx context.Context, principal interfaces.Principal, conversationID string) (*ConversationDTO, error)
func (*ConversationService) List ¶
func (s *ConversationService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]models.Conversation, error)
func (*ConversationService) ListWithMembers ¶
func (s *ConversationService) ListWithMembers(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]ConversationDTO, error)
func (*ConversationService) Update ¶
func (s *ConversationService) Update(ctx context.Context, principal interfaces.Principal, conversationID, name string) (*models.Conversation, error)
func (*ConversationService) UpdateWithMembers ¶
func (s *ConversationService) UpdateWithMembers(ctx context.Context, principal interfaces.Principal, conversationID, name string) (*ConversationDTO, error)
type DatabaseService ¶
type DatabaseService struct {
// contains filtered or unexported fields
}
func NewDatabaseService ¶
func NewDatabaseService(dsn string) (*DatabaseService, error)
func (*DatabaseService) AutoMigrate ¶
func (s *DatabaseService) AutoMigrate() error
func (*DatabaseService) Close ¶
func (s *DatabaseService) Close() error
func (*DatabaseService) Gorm ¶
func (s *DatabaseService) Gorm() *gorm.DB
func (*DatabaseService) Transaction ¶
type DisabledWebRTCProvider ¶
type DisabledWebRTCProvider struct{}
func (*DisabledWebRTCProvider) CreateJoinToken ¶
func (p *DisabledWebRTCProvider) CreateJoinToken(context.Context, interfaces.JoinTokenInput) (*interfaces.JoinToken, error)
func (*DisabledWebRTCProvider) CreateRoom ¶
func (p *DisabledWebRTCProvider) CreateRoom(context.Context, interfaces.CreateRoomInput) (*interfaces.ProviderRoom, error)
func (*DisabledWebRTCProvider) DeleteRoom ¶
func (p *DisabledWebRTCProvider) DeleteRoom(context.Context, string) error
func (*DisabledWebRTCProvider) GetRoom ¶
func (p *DisabledWebRTCProvider) GetRoom(context.Context, string) (*interfaces.ProviderRoom, error)
func (*DisabledWebRTCProvider) Healthy ¶
func (p *DisabledWebRTCProvider) Healthy(context.Context) error
func (*DisabledWebRTCProvider) InternalURL ¶
func (p *DisabledWebRTCProvider) InternalURL() string
func (*DisabledWebRTCProvider) ListParticipants ¶
func (p *DisabledWebRTCProvider) ListParticipants(context.Context, string) ([]interfaces.ProviderParticipant, error)
func (*DisabledWebRTCProvider) ListRooms ¶
func (p *DisabledWebRTCProvider) ListRooms(context.Context) ([]interfaces.ProviderRoom, error)
func (*DisabledWebRTCProvider) MuteParticipantTrack ¶
func (p *DisabledWebRTCProvider) MuteParticipantTrack(context.Context, interfaces.MuteTrackInput) error
func (*DisabledWebRTCProvider) ProviderName ¶
func (p *DisabledWebRTCProvider) ProviderName() string
func (*DisabledWebRTCProvider) PublicURL ¶
func (p *DisabledWebRTCProvider) PublicURL() string
func (*DisabledWebRTCProvider) RemoveParticipant ¶
type GenericWebhookProvider ¶
type GenericWebhookProvider struct{}
func (*GenericWebhookProvider) HandleWebhook ¶
func (p *GenericWebhookProvider) HandleWebhook(_ context.Context, integration models.Integration, payload []byte, _ http.Header) ([]interfaces.Event, error)
func (*GenericWebhookProvider) Name ¶
func (p *GenericWebhookProvider) Name() string
func (*GenericWebhookProvider) ValidateConfiguration ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
func NewHub ¶
func NewHub(ctx context.Context, logger *slog.Logger, cfg config.RealtimeConfig, origins []string, bus interfaces.EventBus, presence *PresenceService, workspaces *WorkspaceService, conversations *ConversationService) *Hub
type InMemoryEventBus ¶
type InMemoryEventBus struct {
// contains filtered or unexported fields
}
func NewInMemoryEventBus ¶
func NewInMemoryEventBus() *InMemoryEventBus
func (*InMemoryEventBus) Close ¶
func (b *InMemoryEventBus) Close() error
func (*InMemoryEventBus) Publish ¶
func (b *InMemoryEventBus) Publish(ctx context.Context, event interfaces.Event) error
func (*InMemoryEventBus) Subscribe ¶
func (b *InMemoryEventBus) Subscribe(ctx context.Context, topic string, handler interfaces.EventHandler) error
type InMemoryJobQueue ¶
type InMemoryJobQueue struct {
// contains filtered or unexported fields
}
func NewInMemoryJobQueue ¶
func NewInMemoryJobQueue(logger *slog.Logger, metrics *WorkerMetrics) *InMemoryJobQueue
func (*InMemoryJobQueue) Close ¶
func (q *InMemoryJobQueue) Close() error
func (*InMemoryJobQueue) Consume ¶
func (q *InMemoryJobQueue) Consume(ctx context.Context, queue string, _ string, _ string, handler interfaces.JobHandler) error
func (*InMemoryJobQueue) DeadLetter ¶
func (*InMemoryJobQueue) ListDeadLetters ¶
type IntegrationService ¶
type IntegrationService struct {
// contains filtered or unexported fields
}
func NewIntegrationService ¶
func NewIntegrationService(integrations interfaces.IntegrationRepository, workspaces *WorkspaceService, bus interfaces.EventBus, messages interfaces.MessageRepository, producer interfaces.JobProducer) *IntegrationService
func (*IntegrationService) Create ¶
func (s *IntegrationService) Create(ctx context.Context, principal interfaces.Principal, workspaceID, provider, name string, config map[string]any) (*models.Integration, error)
func (*IntegrationService) Delete ¶
func (s *IntegrationService) Delete(ctx context.Context, principal interfaces.Principal, id string) error
func (*IntegrationService) Get ¶
func (s *IntegrationService) Get(ctx context.Context, principal interfaces.Principal, id string) (*models.Integration, error)
func (*IntegrationService) HandleWebhook ¶
func (*IntegrationService) List ¶
func (s *IntegrationService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]models.Integration, error)
func (*IntegrationService) ProcessWebhook ¶
func (*IntegrationService) Update ¶
func (s *IntegrationService) Update(ctx context.Context, principal interfaces.Principal, id, name, status string) (*models.Integration, error)
type JWTIdentityProvider ¶
type JWTIdentityProvider struct {
// contains filtered or unexported fields
}
func (*JWTIdentityProvider) Authenticate ¶
func (p *JWTIdentityProvider) Authenticate(_ context.Context, token string) (*interfaces.Principal, error)
func (*JWTIdentityProvider) IssueToken ¶
func (p *JWTIdentityProvider) IssueToken(_ context.Context, principal interfaces.Principal) (string, error)
type JobRegistry ¶
type JobRegistry struct {
// contains filtered or unexported fields
}
func NewJobRegistry ¶
func NewJobRegistry() *JobRegistry
func (*JobRegistry) Register ¶
func (r *JobRegistry) Register(jobType string, handler interfaces.JobHandler)
type LiveKitProvider ¶
type LiveKitProvider struct {
// contains filtered or unexported fields
}
func (*LiveKitProvider) CreateJoinToken ¶
func (p *LiveKitProvider) CreateJoinToken(ctx context.Context, input interfaces.JoinTokenInput) (*interfaces.JoinToken, error)
func (*LiveKitProvider) CreateRoom ¶
func (p *LiveKitProvider) CreateRoom(ctx context.Context, input interfaces.CreateRoomInput) (*interfaces.ProviderRoom, error)
func (*LiveKitProvider) DeleteRoom ¶
func (p *LiveKitProvider) DeleteRoom(ctx context.Context, roomName string) error
func (*LiveKitProvider) GetRoom ¶
func (p *LiveKitProvider) GetRoom(ctx context.Context, roomName string) (*interfaces.ProviderRoom, error)
func (*LiveKitProvider) InternalURL ¶
func (p *LiveKitProvider) InternalURL() string
func (*LiveKitProvider) ListParticipants ¶
func (p *LiveKitProvider) ListParticipants(ctx context.Context, roomName string) ([]interfaces.ProviderParticipant, error)
func (*LiveKitProvider) ListRooms ¶
func (p *LiveKitProvider) ListRooms(ctx context.Context) ([]interfaces.ProviderRoom, error)
func (*LiveKitProvider) MuteParticipantTrack ¶
func (p *LiveKitProvider) MuteParticipantTrack(ctx context.Context, input interfaces.MuteTrackInput) error
func (*LiveKitProvider) ProviderName ¶
func (p *LiveKitProvider) ProviderName() string
func (*LiveKitProvider) PublicURL ¶
func (p *LiveKitProvider) PublicURL() string
func (*LiveKitProvider) RemoveParticipant ¶
type LocalStorage ¶
type LocalStorage struct {
// contains filtered or unexported fields
}
func (*LocalStorage) Get ¶
func (s *LocalStorage) Get(_ context.Context, key string) (io.ReadCloser, error)
func (*LocalStorage) Put ¶
func (s *LocalStorage) Put(ctx context.Context, object interfaces.Object) error
type LoginInput ¶
type MeetingService ¶
type MeetingService struct {
// contains filtered or unexported fields
}
func NewMeetingService ¶
func NewMeetingService(db interfaces.Database, meetings interfaces.MeetingRepository, participants interfaces.MeetingParticipantRepository, workspaces *WorkspaceService, webrtc *WebRTCService, outbox *OutboxService, producer interfaces.JobProducer) *MeetingService
func (*MeetingService) AddParticipant ¶
func (s *MeetingService) AddParticipant(ctx context.Context, principal interfaces.Principal, meetingID, userID, role string) (*models.MeetingParticipant, error)
func (*MeetingService) AutoEndAbandoned ¶
func (s *MeetingService) AutoEndAbandoned(ctx context.Context) error
func (*MeetingService) Cancel ¶
func (s *MeetingService) Cancel(ctx context.Context, principal interfaces.Principal, meetingID string) (*models.Meeting, error)
func (*MeetingService) Create ¶
func (s *MeetingService) Create(ctx context.Context, principal interfaces.Principal, workspaceID, title string, conversationID *string) (*models.Meeting, error)
func (*MeetingService) End ¶
func (s *MeetingService) End(ctx context.Context, principal interfaces.Principal, meetingID string) (*MeetingStartResponse, error)
func (*MeetingService) EnqueueDueReminders ¶
func (s *MeetingService) EnqueueDueReminders(ctx context.Context) error
func (*MeetingService) ExpireStale ¶
func (s *MeetingService) ExpireStale(ctx context.Context) error
func (*MeetingService) Get ¶
func (s *MeetingService) Get(ctx context.Context, principal interfaces.Principal, meetingID string) (*models.Meeting, error)
func (*MeetingService) JoinToken ¶
func (s *MeetingService) JoinToken(ctx context.Context, principal interfaces.Principal, meetingID string) (*interfaces.JoinToken, error)
func (*MeetingService) List ¶
func (s *MeetingService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]models.Meeting, error)
func (*MeetingService) ListParticipants ¶
func (s *MeetingService) ListParticipants(ctx context.Context, principal interfaces.Principal, meetingID string) ([]models.MeetingSessionParticipant, error)
func (*MeetingService) Start ¶
func (s *MeetingService) Start(ctx context.Context, principal interfaces.Principal, meetingID string) (*MeetingStartResponse, error)
type MeetingStartResponse ¶
type MeetingStartResponse struct {
Meeting *models.Meeting `json:"meeting"`
Session *models.MeetingSession `json:"session"`
}
type MessageService ¶
type MessageService struct {
// contains filtered or unexported fields
}
func NewMessageService ¶
func NewMessageService(db interfaces.Database, repos *Repositories, conversations *ConversationService, workspaces *WorkspaceService, bus interfaces.EventBus, outbox *OutboxService) *MessageService
func (*MessageService) AddReaction ¶
func (s *MessageService) AddReaction(ctx context.Context, principal interfaces.Principal, messageID, emoji string) (*models.Reaction, error)
func (*MessageService) Delete ¶
func (s *MessageService) Delete(ctx context.Context, principal interfaces.Principal, messageID string) error
func (*MessageService) Get ¶
func (s *MessageService) Get(ctx context.Context, principal interfaces.Principal, messageID string) (*models.Message, error)
func (*MessageService) MarkRead ¶
func (s *MessageService) MarkRead(ctx context.Context, principal interfaces.Principal, conversationID, messageID string) error
func (*MessageService) RemoveReaction ¶
func (s *MessageService) RemoveReaction(ctx context.Context, principal interfaces.Principal, messageID, emoji string) error
type NotificationDTO ¶
type NotificationDTO struct {
ID string `json:"id"`
WorkspaceID string `json:"workspaceId"`
UserID string `json:"userId"`
Type string `json:"type"`
Title string `json:"title"`
Body string `json:"body"`
ResourceType string `json:"resourceType,omitempty"`
ResourceID string `json:"resourceId,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
ReadAt *time.Time `json:"readAt,omitempty"`
IdempotencyKey string `json:"idempotencyKey,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type NotificationPreferencesDTO ¶
type NotificationPreferencesDTO struct {
DirectMessages bool `json:"directMessages"`
Mentions bool `json:"mentions"`
ChannelMessages bool `json:"channelMessages"`
MeetingReminders bool `json:"meetingReminders"`
IncomingCalls bool `json:"incomingCalls"`
EmailNotifications bool `json:"emailNotifications"`
Sounds bool `json:"sounds"`
DesktopNotifications bool `json:"desktopNotifications"`
}
type NotificationService ¶
type NotificationService struct {
// contains filtered or unexported fields
}
func NewNotificationService ¶
func NewNotificationService(repo interfaces.NotificationRepository, bus interfaces.EventBus) *NotificationService
func (*NotificationService) Create ¶
func (s *NotificationService) Create(ctx context.Context, notification *models.Notification) error
func (*NotificationService) List ¶
func (s *NotificationService) List(ctx context.Context, principal interfaces.Principal, cursor string, limit int) ([]NotificationDTO, string, bool, error)
func (*NotificationService) MarkAllRead ¶
func (s *NotificationService) MarkAllRead(ctx context.Context, principal interfaces.Principal) (bool, error)
func (*NotificationService) MarkRead ¶
func (s *NotificationService) MarkRead(ctx context.Context, principal interfaces.Principal, notificationID string) (bool, error)
func (*NotificationService) UnreadCount ¶
func (s *NotificationService) UnreadCount(ctx context.Context, principal interfaces.Principal) (int64, error)
type OutboxService ¶
type OutboxService struct {
// contains filtered or unexported fields
}
func NewOutboxService ¶
func NewOutboxService(logger *slog.Logger, cfg config.OutboxConfig, repo interfaces.OutboxRepository, producer interfaces.JobProducer) *OutboxService
func (*OutboxService) Add ¶
func (s *OutboxService) Add(ctx context.Context, repo interfaces.OutboxRepository, eventType string, aggregateType string, aggregateID string, workspaceID string, payload any) error
type PasswordHasher ¶
type PasswordHasher struct {
// contains filtered or unexported fields
}
func NewPasswordHasher ¶
func NewPasswordHasher(cfg config.AuthConfig) *PasswordHasher
func (*PasswordHasher) NeedsRehash ¶
func (h *PasswordHasher) NeedsRehash(encodedHash string) bool
type PresenceRecord ¶
type PresenceService ¶
type PresenceService struct {
// contains filtered or unexported fields
}
func NewPresenceService ¶
func NewPresenceService(logger *slog.Logger, redis *redisclient.Client, bus interfaces.EventBus, users interfaces.UserRepository, ttl time.Duration) *PresenceService
func (*PresenceService) Close ¶
func (s *PresenceService) Close() error
func (*PresenceService) ExpireStale ¶
func (s *PresenceService) ExpireStale(ctx context.Context, limit int) error
func (*PresenceService) Get ¶
func (s *PresenceService) Get(ctx context.Context, workspaceID, userID string) (PresenceRecord, bool)
func (*PresenceService) PersistLastSeen ¶
func (s *PresenceService) PersistLastSeen(ctx context.Context) error
func (*PresenceService) RefreshUserState ¶
func (s *PresenceService) RefreshUserState(ctx context.Context, userID string) error
func (*PresenceService) SetSessionState ¶
type ProjectDTO ¶
type ProjectDTO struct {
ID string `json:"id"`
WorkspaceID string `json:"workspaceId"`
Name string `json:"name"`
Summary string `json:"summary,omitempty"`
Status string `json:"status"`
Progress int `json:"progress"`
Cadence string `json:"cadence,omitempty"`
OwnerUserID *string `json:"ownerUserId,omitempty"`
OwnerName string `json:"ownerName,omitempty"`
CreatedBy string `json:"createdBy"`
}
type ProjectService ¶
type ProjectService struct {
// contains filtered or unexported fields
}
func NewProjectService ¶
func NewProjectService(projects interfaces.ProjectRepository, users interfaces.UserRepository, workspaces *WorkspaceService) *ProjectService
func (*ProjectService) List ¶
func (s *ProjectService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]ProjectDTO, error)
type QueueProducer ¶
type QueueProducer struct {
// contains filtered or unexported fields
}
func NewQueueProducer ¶
func NewQueueProducer(logger *slog.Logger, queue interfaces.JobQueue, maxAttempts int, metrics *WorkerMetrics) *QueueProducer
func (*QueueProducer) EnqueueJob ¶
func (p *QueueProducer) EnqueueJob(ctx context.Context, queueName string, jobType string, payload any, options interfaces.JobOptions) (models.Job, error)
type RealtimeCommand ¶
type RedisEventBus ¶
type RedisEventBus struct {
// contains filtered or unexported fields
}
func NewRedisEventBus ¶
func NewRedisEventBus(redis *redisclient.Client, prefix string) *RedisEventBus
func (*RedisEventBus) Close ¶
func (b *RedisEventBus) Close() error
func (*RedisEventBus) Publish ¶
func (b *RedisEventBus) Publish(ctx context.Context, event interfaces.Event) error
func (*RedisEventBus) Subscribe ¶
func (b *RedisEventBus) Subscribe(ctx context.Context, topic string, handler interfaces.EventHandler) error
type RedisStreamJobQueue ¶
type RedisStreamJobQueue struct {
// contains filtered or unexported fields
}
func (*RedisStreamJobQueue) Close ¶
func (q *RedisStreamJobQueue) Close() error
func (*RedisStreamJobQueue) Consume ¶
func (q *RedisStreamJobQueue) Consume(ctx context.Context, queue string, consumerGroup string, consumerName string, handler interfaces.JobHandler) error
func (*RedisStreamJobQueue) DeadLetter ¶
func (*RedisStreamJobQueue) Healthy ¶
func (q *RedisStreamJobQueue) Healthy(ctx context.Context) error
func (*RedisStreamJobQueue) ListDeadLetters ¶
type RegisterInput ¶
type Repositories ¶
type Repositories struct {
// contains filtered or unexported fields
}
func NewRepositories ¶
func NewRepositories(db *gorm.DB) *Repositories
func (*Repositories) AuditLogs ¶
func (r *Repositories) AuditLogs() interfaces.AuditLogRepository
func (*Repositories) AuthAuditEvents ¶
func (r *Repositories) AuthAuditEvents() interfaces.AuthAuditEventRepository
func (*Repositories) AuthRefreshTokens ¶
func (r *Repositories) AuthRefreshTokens() interfaces.AuthRefreshTokenRepository
func (*Repositories) AuthSessions ¶
func (r *Repositories) AuthSessions() interfaces.AuthSessionRepository
func (*Repositories) Channels ¶
func (r *Repositories) Channels() interfaces.ChannelRepository
func (*Repositories) ConversationMembers ¶
func (r *Repositories) ConversationMembers() interfaces.ConversationMemberRepository
func (*Repositories) Conversations ¶
func (r *Repositories) Conversations() interfaces.ConversationRepository
func (*Repositories) EmailVerificationTokens ¶
func (r *Repositories) EmailVerificationTokens() interfaces.EmailVerificationTokenRepository
func (*Repositories) Integrations ¶
func (r *Repositories) Integrations() interfaces.IntegrationRepository
func (*Repositories) LocalCredentials ¶
func (r *Repositories) LocalCredentials() interfaces.LocalCredentialRepository
func (*Repositories) MeetingParticipants ¶
func (r *Repositories) MeetingParticipants() interfaces.MeetingParticipantRepository
func (*Repositories) MeetingSessionParticipants ¶
func (r *Repositories) MeetingSessionParticipants() interfaces.MeetingSessionParticipantRepository
func (*Repositories) MeetingSessions ¶
func (r *Repositories) MeetingSessions() interfaces.MeetingSessionRepository
func (*Repositories) Meetings ¶
func (r *Repositories) Meetings() interfaces.MeetingRepository
func (*Repositories) Messages ¶
func (r *Repositories) Messages() interfaces.MessageRepository
func (*Repositories) NotificationPreferences ¶
func (r *Repositories) NotificationPreferences() interfaces.NotificationPreferenceRepository
func (*Repositories) Notifications ¶
func (r *Repositories) Notifications() interfaces.NotificationRepository
func (*Repositories) OutboxEvents ¶
func (r *Repositories) OutboxEvents() interfaces.OutboxRepository
func (*Repositories) PasswordResetTokens ¶
func (r *Repositories) PasswordResetTokens() interfaces.PasswordResetTokenRepository
func (*Repositories) Projects ¶
func (r *Repositories) Projects() interfaces.ProjectRepository
func (*Repositories) Reactions ¶
func (r *Repositories) Reactions() interfaces.ReactionRepository
func (*Repositories) ReadReceipts ¶
func (r *Repositories) ReadReceipts() interfaces.ReadReceiptRepository
func (*Repositories) Tasks ¶
func (r *Repositories) Tasks() interfaces.TaskRepository
func (*Repositories) Teams ¶
func (r *Repositories) Teams() interfaces.TeamRepository
func (*Repositories) UserSettings ¶
func (r *Repositories) UserSettings() interfaces.UserSettingsRepository
func (*Repositories) Users ¶
func (r *Repositories) Users() interfaces.UserRepository
func (*Repositories) WebRTCNodes ¶
func (r *Repositories) WebRTCNodes() interfaces.WebRTCNodeRepository
func (*Repositories) WebRTCWebhookEvents ¶
func (r *Repositories) WebRTCWebhookEvents() interfaces.WebRTCWebhookEventRepository
func (*Repositories) WithDB ¶
func (r *Repositories) WithDB(db *gorm.DB) *Repositories
func (*Repositories) WorkspaceMembers ¶
func (r *Repositories) WorkspaceMembers() interfaces.WorkspaceMemberRepository
func (*Repositories) WorkspaceSSOConfigs ¶
func (r *Repositories) WorkspaceSSOConfigs() interfaces.WorkspaceSSOConfigRepository
func (*Repositories) Workspaces ¶
func (r *Repositories) Workspaces() interfaces.WorkspaceRepository
type RequestMetadata ¶
type RetryableError ¶
type ScheduledJob ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(redis *redisclient.Client, producer interfaces.JobProducer) *Scheduler
type StaticNodeSelector ¶
type StaticNodeSelector struct {
// contains filtered or unexported fields
}
func (*StaticNodeSelector) SelectNode ¶
func (s *StaticNodeSelector) SelectNode(ctx context.Context, workspaceID string, region string) (*models.WebRTCNode, error)
type TaskDTO ¶
type TaskDTO struct {
ID string `json:"id"`
WorkspaceID string `json:"workspaceId"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Status string `json:"status"`
Priority string `json:"priority"`
Project string `json:"project,omitempty"`
AssigneeUserID *string `json:"assigneeUserId,omitempty"`
AssigneeName string `json:"assigneeName,omitempty"`
CreatedBy string `json:"createdBy"`
DueAt *time.Time `json:"dueAt,omitempty"`
CompletedAt *time.Time `json:"completedAt,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
func NewTaskService ¶
func NewTaskService(tasks interfaces.TaskRepository, users interfaces.UserRepository, workspaces *WorkspaceService) *TaskService
func (*TaskService) Create ¶
func (s *TaskService) Create( ctx context.Context, principal interfaces.Principal, workspaceID, title, description, status, priority, project string, dueAt *time.Time, ) (*TaskDTO, error)
func (*TaskService) List ¶
func (s *TaskService) List(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]TaskDTO, error)
type TeamService ¶
type TeamService struct {
// contains filtered or unexported fields
}
func NewTeamService ¶
func NewTeamService(teams interfaces.TeamRepository, workspaces *WorkspaceService) *TeamService
func (*TeamService) Create ¶
func (s *TeamService) Create(ctx context.Context, principal interfaces.Principal, workspaceID, name, description string) (*models.Team, error)
func (*TeamService) Delete ¶
func (s *TeamService) Delete(ctx context.Context, principal interfaces.Principal, teamID string) error
func (*TeamService) Get ¶
func (s *TeamService) Get(ctx context.Context, principal interfaces.Principal, teamID string) (*models.Team, error)
type UpdateWorkspaceSSOInput ¶
type UpdateWorkspaceSSOInput struct {
Provider string
Enabled bool
EnforceSSO bool
AllowPasswordAuth bool
AllowAutoProvision bool
AllowIDPInitiated bool
DomainHint string
IssuerURL string
SSOURL string
EntityID string
ClientID string
ClientSecret *string
ClearClientSecret bool
Certificate string
AllowedDomains []string
DefaultRole string
AttributeMapping map[string]string
}
type UserPreferencesDTO ¶
type UserPreferencesDTO struct {
Theme string `json:"theme"`
Language string `json:"language"`
Locale string `json:"locale"`
Timezone string `json:"timezone"`
StatusMessage string `json:"statusMessage,omitempty"`
Density string `json:"density"`
Contrast string `json:"contrast"`
SoundEnabled bool `json:"soundEnabled"`
SecureSession bool `json:"secureSession"`
}
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService( users interfaces.UserRepository, settings interfaces.UserSettingsRepository, notificationPreferences interfaces.NotificationPreferenceRepository, presence *PresenceService, ) *UserService
func (*UserService) EnsureUser ¶
func (s *UserService) EnsureUser(ctx context.Context, principal interfaces.Principal) (*models.User, error)
func (*UserService) GetMe ¶
func (s *UserService) GetMe(ctx context.Context, principal interfaces.Principal) (*models.User, error)
func (*UserService) GetNotificationPreferences ¶
func (s *UserService) GetNotificationPreferences(ctx context.Context, principal interfaces.Principal) (*NotificationPreferencesDTO, error)
func (*UserService) GetPreferences ¶
func (s *UserService) GetPreferences(ctx context.Context, principal interfaces.Principal) (*UserPreferencesDTO, error)
func (*UserService) UpdateMe ¶
func (s *UserService) UpdateMe(ctx context.Context, principal interfaces.Principal, displayName, avatarURL, status string) (*models.User, error)
func (*UserService) UpdateNotificationPreferences ¶
func (s *UserService) UpdateNotificationPreferences( ctx context.Context, principal interfaces.Principal, input NotificationPreferencesDTO, ) (*NotificationPreferencesDTO, error)
func (*UserService) UpdatePreferences ¶
func (s *UserService) UpdatePreferences(ctx context.Context, principal interfaces.Principal, input UserPreferencesDTO) (*UserPreferencesDTO, error)
type WebRTCMetrics ¶
type WebRTCMetrics struct {
// contains filtered or unexported fields
}
func (*WebRTCMetrics) IncJoinTokenFailures ¶
func (m *WebRTCMetrics) IncJoinTokenFailures()
func (*WebRTCMetrics) IncJoinTokensIssued ¶
func (m *WebRTCMetrics) IncJoinTokensIssued()
func (*WebRTCMetrics) IncProviderErrors ¶
func (m *WebRTCMetrics) IncProviderErrors()
func (*WebRTCMetrics) IncWebhookEvents ¶
func (m *WebRTCMetrics) IncWebhookEvents()
func (*WebRTCMetrics) IncWebhookFailures ¶
func (m *WebRTCMetrics) IncWebhookFailures()
func (*WebRTCMetrics) ObserveRoomCreateDuration ¶
func (m *WebRTCMetrics) ObserveRoomCreateDuration(d time.Duration)
func (*WebRTCMetrics) RenderPrometheus ¶
func (m *WebRTCMetrics) RenderPrometheus() string
func (*WebRTCMetrics) SetActiveParticipants ¶
func (m *WebRTCMetrics) SetActiveParticipants(v int64)
func (*WebRTCMetrics) SetActiveRooms ¶
func (m *WebRTCMetrics) SetActiveRooms(v int64)
func (*WebRTCMetrics) SetNodes ¶
func (m *WebRTCMetrics) SetNodes(v int64)
type WebRTCService ¶
type WebRTCService struct {
// contains filtered or unexported fields
}
func NewWebRTCService ¶
func NewWebRTCService(logger *slog.Logger, cfg config.Config, db interfaces.Database, repos *Repositories, workspaces *WorkspaceService, provider interfaces.WebRTCProvider, selector interfaces.NodeSelector, outbox *OutboxService, producer interfaces.JobProducer, bus interfaces.EventBus, metrics *WebRTCMetrics) *WebRTCService
func (*WebRTCService) CleanupParticipants ¶
func (s *WebRTCService) CleanupParticipants(ctx context.Context, sessionID string) error
func (*WebRTCService) CleanupStaleParticipants ¶
func (s *WebRTCService) CleanupStaleParticipants(ctx context.Context) error
func (*WebRTCService) EndMeeting ¶
func (s *WebRTCService) EndMeeting(ctx context.Context, principal interfaces.Principal, meetingID string) (*MeetingStartResponse, error)
func (*WebRTCService) ExpireAbandonedSessions ¶
func (s *WebRTCService) ExpireAbandonedSessions(ctx context.Context) error
func (*WebRTCService) HandleLiveKitWebhook ¶
func (*WebRTCService) JoinToken ¶
func (s *WebRTCService) JoinToken(ctx context.Context, principal interfaces.Principal, meetingID string) (*interfaces.JoinToken, error)
func (*WebRTCService) ListParticipants ¶
func (s *WebRTCService) ListParticipants(ctx context.Context, principal interfaces.Principal, meetingID string) ([]models.MeetingSessionParticipant, error)
func (*WebRTCService) ReconcileRooms ¶
func (s *WebRTCService) ReconcileRooms(ctx context.Context) error
func (*WebRTCService) StartMeeting ¶
func (s *WebRTCService) StartMeeting(ctx context.Context, principal interfaces.Principal, meetingID string) (*MeetingStartResponse, error)
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(logger *slog.Logger, cfg config.Config, redis *redisclient.Client, queue interfaces.JobQueue, producer interfaces.JobProducer, registry *JobRegistry, outbox *OutboxService, scheduler *Scheduler, presence *PresenceService, integrations *IntegrationService, meetings *MeetingService, metrics *WorkerMetrics) *Worker
type WorkerMetrics ¶
type WorkerMetrics struct {
// contains filtered or unexported fields
}
func (*WorkerMetrics) Snapshot ¶
func (m *WorkerMetrics) Snapshot() map[string]int64
type WorkspaceMemberDTO ¶
type WorkspaceMemberDTO struct {
ID string `json:"id"`
WorkspaceID string `json:"workspaceId"`
UserID string `json:"userId"`
Role string `json:"role"`
JoinedAt time.Time `json:"joinedAt"`
LastSeenAt *time.Time `json:"lastSeenAt,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DisplayName string `json:"displayName"`
Email string `json:"email"`
AvatarURL *string `json:"avatarUrl,omitempty"`
Status string `json:"status"`
PresenceStatus string `json:"presenceStatus"`
}
type WorkspaceSSOConfigDTO ¶
type WorkspaceSSOConfigDTO struct {
ID string `json:"id"`
WorkspaceID string `json:"workspaceId"`
Provider string `json:"provider"`
Enabled bool `json:"enabled"`
EnforceSSO bool `json:"enforceSso"`
AllowPasswordAuth bool `json:"allowPasswordAuth"`
AllowAutoProvision bool `json:"allowAutoProvision"`
AllowIDPInitiated bool `json:"allowIdpInitiated"`
DomainHint string `json:"domainHint,omitempty"`
IssuerURL string `json:"issuerUrl,omitempty"`
SSOURL string `json:"ssoUrl,omitempty"`
EntityID string `json:"entityId,omitempty"`
ClientID string `json:"clientId,omitempty"`
ClientSecretConfigured bool `json:"clientSecretConfigured"`
Certificate string `json:"certificate,omitempty"`
AllowedDomains []string `json:"allowedDomains"`
DefaultRole string `json:"defaultRole"`
AttributeMapping map[string]string `json:"attributeMapping"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type WorkspaceService ¶
type WorkspaceService struct {
// contains filtered or unexported fields
}
func NewWorkspaceService ¶
func NewWorkspaceService( db interfaces.Database, auth config.AuthConfig, users interfaces.UserRepository, repos *Repositories, audits interfaces.AuditLogRepository, outbox *OutboxService, presence *PresenceService, ) *WorkspaceService
func (*WorkspaceService) AddMember ¶
func (s *WorkspaceService) AddMember(ctx context.Context, principal interfaces.Principal, workspaceID, userID, email, role string) (*WorkspaceMemberDTO, error)
func (*WorkspaceService) Archive ¶
func (s *WorkspaceService) Archive(ctx context.Context, principal interfaces.Principal, workspaceID string) error
func (*WorkspaceService) AuthorizeWorkspace ¶
func (s *WorkspaceService) AuthorizeWorkspace(ctx context.Context, principal interfaces.Principal, workspaceID string) (*models.WorkspaceMember, error)
func (*WorkspaceService) Create ¶
func (s *WorkspaceService) Create(ctx context.Context, principal interfaces.Principal, name, slug, description string) (*models.Workspace, error)
func (*WorkspaceService) Get ¶
func (s *WorkspaceService) Get(ctx context.Context, principal interfaces.Principal, workspaceID string) (*models.Workspace, error)
func (*WorkspaceService) GetSSOConfig ¶
func (s *WorkspaceService) GetSSOConfig(ctx context.Context, principal interfaces.Principal, workspaceID string) (*WorkspaceSSOConfigDTO, error)
func (*WorkspaceService) List ¶
func (s *WorkspaceService) List(ctx context.Context, principal interfaces.Principal) ([]models.Workspace, error)
func (*WorkspaceService) ListMembers ¶
func (s *WorkspaceService) ListMembers(ctx context.Context, principal interfaces.Principal, workspaceID string) ([]WorkspaceMemberDTO, error)
func (*WorkspaceService) ProvisionWorkspaceUser ¶
func (s *WorkspaceService) ProvisionWorkspaceUser( ctx context.Context, principal interfaces.Principal, workspaceID string, input ProvisionWorkspaceUserInput, meta RequestMetadata, ) (*WorkspaceMemberDTO, error)
func (*WorkspaceService) RemoveMember ¶
func (s *WorkspaceService) RemoveMember(ctx context.Context, principal interfaces.Principal, workspaceID, userID string) error
func (*WorkspaceService) Update ¶
func (s *WorkspaceService) Update(ctx context.Context, principal interfaces.Principal, workspaceID, name, description string) (*models.Workspace, error)
func (*WorkspaceService) UpdateMember ¶
func (s *WorkspaceService) UpdateMember(ctx context.Context, principal interfaces.Principal, workspaceID, userID, role string) (*WorkspaceMemberDTO, error)
func (*WorkspaceService) UpdateSSOConfig ¶
func (s *WorkspaceService) UpdateSSOConfig(ctx context.Context, principal interfaces.Principal, workspaceID string, input UpdateWorkspaceSSOInput, meta RequestMetadata) (*WorkspaceSSOConfigDTO, error)
Source Files
¶
- audit.go
- auth.go
- auth_rate_limiter.go
- auth_service.go
- channel.go
- conversation.go
- database.go
- integration.go
- job_errors.go
- job_metrics.go
- job_queue.go
- job_registry.go
- meeting.go
- message.go
- notification.go
- outbox.go
- password_hasher.go
- presence.go
- project.go
- realtime.go
- repositories.go
- scheduler.go
- storage.go
- task.go
- team.go
- user.go
- webrtc_metrics.go
- webrtc_provider.go
- webrtc_service.go
- worker.go
- workspace.go
Click to show internal directories.
Click to hide internal directories.