core

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: GPL-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

Core composes the upload, prepared-release, duplicate-check, media, description, and history capabilities over one dependency snapshot. It owns the repository only when construction opened that repository internally. Operation contexts are per call and are not retained by Core.

func NewWithContext

func NewWithContext(ctx context.Context, deps api.CoreDependencies) (*Core, error)

NewWithContext constructs a Core and applies ctx to initialization work such as opening and migrating an internally created repository. The context is not retained after construction.

func NewWithContextAndCoordinator added in v0.3.5

func NewWithContextAndCoordinator(
	ctx context.Context,
	deps api.CoreDependencies,
	coordinator *releaseworkflow.Coordinator,
) (*Core, error)

NewWithContextAndCoordinator constructs a config-scoped Core that shares the supplied process-lifetime workflow coordinator. A nil coordinator creates a standalone coordinator for callers that do not replace runtime config.

func (*Core) CancelReleaseWorkflowOperation added in v0.3.0

func (c *Core) CancelReleaseWorkflowOperation(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	operationID api.WorkflowOperationID,
) (api.WorkflowOperationStatus, error)

CancelReleaseWorkflowOperation requests cancellation of one active operation.

func (*Core) Close

func (c *Core) Close() error

Close stops Core-owned background work and closes the repository only when this Core opened and owns it.

func (*Core) ContinueReleaseWorkflow added in v0.3.0

func (c *Core) ContinueReleaseWorkflow(
	ctx context.Context,
	ownerID string,
	request api.ContinueReleaseWorkflowRequest,
) (releaseworkflow.CommandResult, error)

ContinueReleaseWorkflow reconciles typed desired state through the central planner.

func (*Core) CurrentReleaseWorkflow added in v0.3.0

func (c *Core) CurrentReleaseWorkflow(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
) (releaseworkflow.CommandResult, error)

CurrentReleaseWorkflow returns the current aggregate and immutable stage projections.

func (*Core) DVDMenuCapability added in v0.2.4

func (c *Core) DVDMenuCapability(ctx context.Context) (api.DVDMenuEngineInfo, error)

DVDMenuCapability reports the pure-Go engine version and the external FFmpeg dvdvideo menu capability without returning executable paths.

func (*Core) DeleteAllHistoryReleases

func (c *Core) DeleteAllHistoryReleases(ctx context.Context) (int, error)

DeleteAllHistoryReleases deletes stored releases sequentially. On cancellation or failure, the returned count includes releases deleted before the error.

func (*Core) DeleteHistoryRelease

func (c *Core) DeleteHistoryRelease(ctx context.Context, sourcePath string) error

DeleteHistoryRelease purges a stored source and related stored child paths, removing only artifacts validated beneath the configured tmp, cache, or nfo roots.

func (*Core) DiscoverPlaylists

func (c *Core) DiscoverPlaylists(ctx context.Context, sourcePath string) ([]api.PlaylistInfo, error)

DiscoverPlaylists scans the local source for Blu-ray playlists and returns them by descending score. Durations are seconds and item sizes are bytes.

func (*Core) ExecuteReleaseWorkflow added in v0.3.0

func (c *Core) ExecuteReleaseWorkflow(
	ctx context.Context,
	ownerID string,
	command releaseworkflow.Command,
) (releaseworkflow.CommandResult, error)

ExecuteReleaseWorkflow applies one owner-scoped typed workflow command.

func (*Core) GetActiveInput added in v0.3.5

func (c *Core) GetActiveInput(ctx context.Context, owner string) (api.ActiveInputSnapshot, error)

GetActiveInput projects only the caller's current input and workflow.

func (*Core) GetHistoryOverview

func (c *Core) GetHistoryOverview(ctx context.Context, sourcePath string) (api.HistoryOverview, error)

GetHistoryOverview assembles persisted metadata, overrides, media, tracker state, and upload history for one source path.

func (*Core) GetInputHistory added in v0.3.2

func (c *Core) GetInputHistory(ctx context.Context, source string) (api.InputHistory, error)

GetInputHistory returns retained correction and track evidence without triggering provider requests or media inspection.

func (*Core) ListHistory

func (c *Core) ListHistory(ctx context.Context) ([]api.HistoryEntry, error)

ListHistory returns stored releases with their latest display status.

func (*Core) LiveTestEnabled added in v0.3.2

func (c *Core) LiveTestEnabled() bool

LiveTestEnabled reports process policy without exposing mutable configuration.

func (*Core) OpenActiveInput added in v0.3.5

func (c *Core) OpenActiveInput(ctx context.Context, owner string, request api.OpenActiveInputRequest) (api.ActiveInputSnapshot, error)

OpenActiveInput verifies the source and advances its exact workflow toward input readiness.

func (*Core) OpenReleaseWorkflowAudioAnalysisArtifact added in v0.3.5

func (c *Core) OpenReleaseWorkflowAudioAnalysisArtifact(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	analysis api.AudioAnalysisRef,
	artifactID api.PublicResourceID,
) (releaseworkflow.MediaArtifactContent, error)

OpenReleaseWorkflowAudioAnalysisArtifact returns one owner-scoped analysis image without exposing its retained filesystem path.

func (*Core) OpenReleaseWorkflowHDRAnalysisArtifact added in v0.4.1

func (c *Core) OpenReleaseWorkflowHDRAnalysisArtifact(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	analysis api.HDRAnalysisRef,
	artifactID api.PublicResourceID,
) (releaseworkflow.MediaArtifactContent, error)

OpenReleaseWorkflowHDRAnalysisArtifact opens an artifact from the owner's current analysis revision and prepared generation. The caller must close the returned Body.

func (*Core) OpenReleaseWorkflowMediaArtifact added in v0.3.0

func (c *Core) OpenReleaseWorkflowMediaArtifact(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	media api.MediaArtifactSetRef,
	artifactID api.PublicResourceID,
) (releaseworkflow.MediaArtifactContent, error)

OpenReleaseWorkflowMediaArtifact returns one owner-scoped opaque workflow media resource without exposing its retained filesystem path.

func (*Core) OpenReleaseWorkflowPreview added in v0.3.0

func (c *Core) OpenReleaseWorkflowPreview(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	previewID api.PublicResourceID,
) (releaseworkflow.MediaArtifactContent, error)

OpenReleaseWorkflowPreview returns one owner-scoped opaque transient preview.

func (*Core) PreviewReleaseWorkflowFrame added in v0.3.0

func (c *Core) PreviewReleaseWorkflowFrame(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	expectedRevision api.WorkflowRevision,
	discID string,
	timestampSeconds float64,
) (api.FramePreview, error)

PreviewReleaseWorkflowFrame creates one owner-scoped non-authoritative frame preview.

func (*Core) ReconcileActiveInput added in v0.3.5

func (c *Core) ReconcileActiveInput(
	ctx context.Context,
	owner string,
	request api.ReconcileActiveInputRequest,
) (api.ActiveInputSnapshot, error)

ReconcileActiveInput resolves one exact uncertain-outcome action in the active input or a claimed legacy recovery slot.

func (*Core) RecoverLegacyActiveInput added in v0.3.5

func (c *Core) RecoverLegacyActiveInput(
	ctx context.Context,
	owner string,
	request api.RecoverLegacyActiveInputRequest,
) (api.ActiveInputSnapshot, error)

RecoverLegacyActiveInput claims one selected migrated workflow for manual external-effect reconciliation. It never starts source verification or upload work.

func (*Core) ReleaseActiveInput added in v0.3.5

func (c *Core) ReleaseActiveInput(ctx context.Context, owner string, request api.ReleaseActiveInputRequest) (api.ActiveInputSnapshot, error)

ReleaseActiveInput closes the caller-owned input at the expected slot revision and reads the resulting snapshot. Busy work or changed authority leaves the close rejected; retained history and reusable artifacts are not deleted.

func (*Core) ReleaseWorkflowAudioAnalysisArtifactPath added in v0.3.5

func (c *Core) ReleaseWorkflowAudioAnalysisArtifactPath(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	analysis api.AudioAnalysisRef,
	artifactID api.PublicResourceID,
) (string, error)

ReleaseWorkflowAudioAnalysisArtifactPath returns the local path for the CLI after owner and exact-revision validation. It is never exposed by HTTP.

func (*Core) ReleaseWorkflowHDRAnalysisArtifactPath added in v0.4.1

func (c *Core) ReleaseWorkflowHDRAnalysisArtifactPath(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	analysis api.HDRAnalysisRef,
	artifactID api.PublicResourceID,
) (string, error)

ReleaseWorkflowHDRAnalysisArtifactPath resolves a verified private host path for the current analysis. The retained resource owns its lifetime; do not expose the path publicly.

func (*Core) ReleaseWorkflowMediaPlan added in v0.3.0

func (c *Core) ReleaseWorkflowMediaPlan(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
) (api.MediaPlan, error)

ReleaseWorkflowMediaPlan returns the safe media plan for the workflow's current exact release and tracker projections.

func (*Core) ReleaseWorkflowOperation added in v0.3.0

func (c *Core) ReleaseWorkflowOperation(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	operationID api.WorkflowOperationID,
) (api.WorkflowOperationStatus, error)

ReleaseWorkflowOperation returns one pollable workflow operation.

func (*Core) ReleaseWorkflowOperationEvents added in v0.3.0

func (c *Core) ReleaseWorkflowOperationEvents(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	operationID api.WorkflowOperationID,
	after uint64,
	limit int,
) ([]api.WorkflowEvent, error)

ReleaseWorkflowOperationEvents returns retained operation events after one workflow-global cursor.

func (*Core) RenderDescription

func (c *Core) RenderDescription(ctx context.Context, raw string, previews map[string]string) (string, error)

RenderDescription renders raw BBCode after rejecting a pre-canceled context.

func (*Core) SetOperationLifetime added in v0.3.5

func (c *Core) SetOperationLifetime(lifetime releaseworkflow.OperationLifetime)

SetOperationLifetime binds one host-owned immutable runtime bundle before Core is published. The bundle remains borrowed through worker cleanup.

func (*Core) ShutdownWorkflowCoordinator added in v0.3.5

func (c *Core) ShutdownWorkflowCoordinator(ctx context.Context) error

ShutdownWorkflowCoordinator stops local workflow work and relinquishes the active-input lease during process shutdown.

func (*Core) StageReleaseWorkflowMediaResource added in v0.3.0

func (c *Core) StageReleaseWorkflowMediaResource(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	expectedRevision api.WorkflowRevision,
	content releaseworkflow.StagedMediaContent,
) (api.WorkflowResourceRef, error)

StageReleaseWorkflowMediaResource retains private image bytes for a later exact workflow attachment command.

func (*Core) StartLiveTestReleaseWorkflowUpload added in v0.3.2

func (c *Core) StartLiveTestReleaseWorkflowUpload(
	ctx context.Context,
	ownerID string,
	request api.CreateReleaseWorkflowUploadRequest,
) (releaseworkflow.CommandResult, error)

StartLiveTestReleaseWorkflowUpload drives ordinary rule evaluation to dry-run. This in-process CLI entrypoint is intentionally absent from the public API.

func (*Core) StartReleaseWorkflow added in v0.3.0

func (c *Core) StartReleaseWorkflow(
	ctx context.Context,
	ownerID string,
	command releaseworkflow.Command,
) (api.WorkflowOperationStatus, error)

StartReleaseWorkflow durably accepts one long-running workflow command.

func (*Core) StartReleaseWorkflowUpload added in v0.3.0

func (c *Core) StartReleaseWorkflowUpload(
	ctx context.Context,
	ownerID string,
	request api.CreateReleaseWorkflowUploadRequest,
) (releaseworkflow.CommandResult, error)

StartReleaseWorkflowUpload starts or idempotently replays one owner-scoped durable composite upload.

func (*Core) SubmitReleaseWorkflowUploadFeedback added in v0.3.0

func (c *Core) SubmitReleaseWorkflowUploadFeedback(
	ctx context.Context,
	ownerID string,
	workflowID api.WorkflowID,
	feedback api.ReleaseWorkflowUploadFeedback,
) (releaseworkflow.CommandResult, error)

SubmitReleaseWorkflowUploadFeedback applies one exact required-action response and starts the resumed composite operation.

func (*Core) WorkflowCoordinator added in v0.3.5

func (c *Core) WorkflowCoordinator() *releaseworkflow.Coordinator

WorkflowCoordinator returns the process-lifetime coordinator used by Core.

Jump to

Keyboard shortcuts

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