Documentation
¶
Index ¶
- type Overlay
- type SaveConfigRequest
- type Service
- func (s *Service) GetConfig(ctx context.Context, streamerID uuid.UUID) (*domain.OverlayConfigWithVersion, error)
- func (s *Service) GetStreamerByID(ctx context.Context, streamerID uuid.UUID) (*domain.Streamer, error)
- func (s *Service) GetStreamerByOverlayUUID(ctx context.Context, overlayUUID uuid.UUID) (*domain.Streamer, error)
- func (s *Service) ResetSentiment(ctx context.Context, overlayUUID uuid.UUID) error
- func (s *Service) RotateOverlayUUID(ctx context.Context, streamerID uuid.UUID) (uuid.UUID, error)
- func (s *Service) SaveConfig(ctx context.Context, req SaveConfigRequest) error
- func (s *Service) UpsertStreamer(ctx context.Context, ...) (*domain.Streamer, error)
- type SnapshotTicker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Overlay ¶
type Overlay struct {
// contains filtered or unexported fields
}
func NewOverlay ¶
func NewOverlay(configSource domain.ConfigSource, sentiment domain.SentimentStore, debounce domain.ParticipantDebouncer) *Overlay
func (*Overlay) ProcessMessage ¶
func (o *Overlay) ProcessMessage(ctx context.Context, broadcasterUserID, chatterUserID, messageText string) (*domain.WindowSnapshot, domain.VoteResult, domain.VoteTarget, error)
type SaveConfigRequest ¶
type SaveConfigRequest struct {
StreamerID uuid.UUID
BroadcasterID string
ForTrigger string
ForLabel string
AgainstTrigger string
AgainstLabel string
MemorySeconds int
DisplayMode string
}
SaveConfigRequest bundles all parameters for a config save operation.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(users domain.StreamerRepository, configs domain.ConfigRepository, overlay domain.Overlay, twitch domain.EventSubService, publisher domain.EventPublisher) *Service
func (*Service) GetStreamerByID ¶
func (s *Service) GetStreamerByID(ctx context.Context, streamerID uuid.UUID) (*domain.Streamer, error)
GetStreamerByID retrieves a streamer by internal ID.
func (*Service) GetStreamerByOverlayUUID ¶
func (*Service) ResetSentiment ¶
func (*Service) RotateOverlayUUID ¶
func (*Service) SaveConfig ¶
func (s *Service) SaveConfig(ctx context.Context, req SaveConfigRequest) error
type SnapshotTicker ¶
type SnapshotTicker struct {
// contains filtered or unexported fields
}
SnapshotTicker periodically recomputes and publishes sentiment snapshots for broadcasters with recent vote activity. This ensures old votes visually expire from the sliding window even when no new votes are arriving.
func NewSnapshotTicker ¶
func NewSnapshotTicker(store domain.SentimentStore, configs domain.ConfigSource, publisher domain.EventPublisher) *SnapshotTicker
func (*SnapshotTicker) Run ¶
func (t *SnapshotTicker) Run(ctx context.Context)
Run starts the periodic refresh loop. It blocks until ctx is cancelled.
func (*SnapshotTicker) Track ¶
func (t *SnapshotTicker) Track(broadcasterID string)
Track registers a broadcaster for periodic snapshot refresh.
Click to show internal directories.
Click to hide internal directories.