app

package
v0.0.0-...-7b5971a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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)

func (*Overlay) Reset

func (o *Overlay) Reset(ctx context.Context, broadcasterID string) 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) GetConfig

func (s *Service) GetConfig(ctx context.Context, streamerID uuid.UUID) (*domain.OverlayConfigWithVersion, error)

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 (s *Service) GetStreamerByOverlayUUID(ctx context.Context, overlayUUID uuid.UUID) (*domain.Streamer, error)

func (*Service) ResetSentiment

func (s *Service) ResetSentiment(ctx context.Context, overlayUUID uuid.UUID) error

func (*Service) RotateOverlayUUID

func (s *Service) RotateOverlayUUID(ctx context.Context, streamerID uuid.UUID) (uuid.UUID, error)

func (*Service) SaveConfig

func (s *Service) SaveConfig(ctx context.Context, req SaveConfigRequest) error

func (*Service) UpsertStreamer

func (s *Service) UpsertStreamer(ctx context.Context, twitchUserID, twitchUsername, accessToken, refreshToken string, tokenExpiry time.Time) (*domain.Streamer, 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL