Documentation
¶
Overview ¶
Package preview provides preview session management.
Index ¶
- type DMXOutput
- type Service
- func (s *Service) CancelSession(ctx context.Context, sessionID string) (bool, error)
- func (s *Service) CommitSession(ctx context.Context, sessionID string) (bool, error)
- func (s *Service) GetDMXOutput(sessionID string) []DMXOutput
- func (s *Service) GetProjectSession(projectID string) *Session
- func (s *Service) GetSession(sessionID string) *Session
- func (s *Service) InitializeWithScene(ctx context.Context, sessionID string, sceneID string) (bool, error)
- func (s *Service) SetSessionUpdateCallback(callback func(session *Session, dmxOutput []DMXOutput))
- func (s *Service) StartSession(ctx context.Context, projectID string, userID *string) (*Session, error)
- func (s *Service) UpdateChannelValue(ctx context.Context, sessionID string, fixtureID string, channelIndex int, ...) (bool, error)
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles preview session operations.
func NewService ¶
func NewService( fixtureRepo *repositories.FixtureRepository, sceneRepo *repositories.SceneRepository, dmxService *dmx.Service, ) *Service
NewService creates a new preview service.
func (*Service) CancelSession ¶
CancelSession cancels a preview session and removes its overrides.
func (*Service) CommitSession ¶
CommitSession commits a preview session (keeps changes, cleans up session).
func (*Service) GetDMXOutput ¶
GetDMXOutput returns the current DMX output for a session.
func (*Service) GetProjectSession ¶
GetProjectSession returns the active session for a project.
func (*Service) GetSession ¶
GetSession returns a session by ID.
func (*Service) InitializeWithScene ¶
func (s *Service) InitializeWithScene(ctx context.Context, sessionID string, sceneID string) (bool, error)
InitializeWithScene initializes a preview session with values from a scene.
func (*Service) SetSessionUpdateCallback ¶
SetSessionUpdateCallback sets the callback for session updates (for subscriptions).
Click to show internal directories.
Click to hide internal directories.