Documentation
¶
Index ¶
- Variables
- type ActivateInput
- type AdoptInput
- type AdoptionResult
- type BeginInput
- type BeginResult
- type CompleteInput
- type FailInput
- type Options
- type Service
- func (s *Service) Activate(ctx context.Context, input *ActivateInput) (*reportcontext.Record, error)
- func (s *Service) Adopt(ctx context.Context, input *AdoptInput) (*AdoptionResult, error)
- func (s *Service) Begin(ctx context.Context, input *BeginInput) (*BeginResult, error)
- func (s *Service) Complete(ctx context.Context, input *CompleteInput) (*reportrun.Record, error)
- func (s *Service) Fail(ctx context.Context, input *FailInput) (*reportrun.Record, error)
- func (s *Service) GetContext(ctx context.Context, conversationID string) (*reportcontext.Record, error)
- func (s *Service) GetRun(ctx context.Context, reportRunID, conversationID string) (*reportrun.Record, error)
- func (s *Service) ValidateDurableUIEvent(ctx context.Context, conversationID, kind string, ...) error
- func (s *Service) WaitTerminal(ctx context.Context, reportRunID, conversationID string) (*reportrun.Record, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ActivateInput ¶
type AdoptInput ¶
type AdoptionResult ¶
type AdoptionResult struct {
Run *reportrun.Record `json:"run"`
Context *reportcontext.Record `json:"context"`
}
type BeginInput ¶
type BeginInput struct {
ConversationID string `json:"conversationId,omitempty"`
Origin string `json:"origin,omitempty"`
BuilderRef string `json:"builderRef,omitempty"`
PresetID string `json:"presetId,omitempty"`
SourceKind string `json:"sourceKind,omitempty"`
SourceID string `json:"sourceId,omitempty"`
RequestedParams json.RawMessage `json:"requestedParams,omitempty"`
EffectiveParams json.RawMessage `json:"effectiveParams,omitempty"`
UIRunRequestID string `json:"uiRunRequestId"`
}
type BeginResult ¶
type BeginResult struct {
Run *reportrun.Record `json:"run"`
Context *reportcontext.Record `json:"context,omitempty"`
}
type CompleteInput ¶
type CompleteInput struct {
ReportRunID string `json:"reportRunId"`
ConversationID string `json:"conversationId,omitempty"`
ExpectedRevision int64 `json:"expectedRevision"`
ReportSpec json.RawMessage `json:"reportSpec"`
ReportFill json.RawMessage `json:"reportFill"`
ReportPrint json.RawMessage `json:"reportPrint"`
}
type Options ¶
type Options struct {
Store reportstore.RunClient
Now func() time.Time
NewID func() string
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service owns durable browser report-run lifecycle invariants. It is called from the authenticated UI HTTP boundary and is deliberately not a tool service.
func (*Service) Activate ¶
func (s *Service) Activate(ctx context.Context, input *ActivateInput) (*reportcontext.Record, error)
func (*Service) Adopt ¶
func (s *Service) Adopt(ctx context.Context, input *AdoptInput) (*AdoptionResult, error)
func (*Service) Begin ¶
func (s *Service) Begin(ctx context.Context, input *BeginInput) (*BeginResult, error)
func (*Service) GetContext ¶
func (*Service) ValidateDurableUIEvent ¶
func (s *Service) ValidateDurableUIEvent(ctx context.Context, conversationID, kind string, detail map[string]interface{}) error
ValidateDurableUIEvent validates the two T1 browser lifecycle events against the persisted run. Other report event kinds deliberately remain outside the durable T1 contract.
func (*Service) WaitTerminal ¶
func (s *Service) WaitTerminal(ctx context.Context, reportRunID, conversationID string) (*reportrun.Record, error)
WaitTerminal waits for one exact durable report run to reach completed or failed. Identity never falls back to a latest run, time window, active pointer, or UI window: every read remains scoped by the authenticated owner, trusted conversation, and exact reportRunId.
Click to show internal directories.
Click to hide internal directories.