forked from longtao.wu/droboticflow
195 lines
11 KiB
Go
195 lines
11 KiB
Go
package domain
|
|
|
|
type ScanNotificationSettings struct {
|
|
OnSuccess bool `json:"onSuccess" bson:"onSuccess"`
|
|
OnFailure bool `json:"onFailure" bson:"onFailure"`
|
|
Channel string `json:"channel,omitempty" bson:"channel,omitempty"`
|
|
Target string `json:"target,omitempty" bson:"target,omitempty"`
|
|
}
|
|
|
|
type ScanConfig struct {
|
|
DataSource string `json:"dataSource,omitempty" bson:"dataSource,omitempty"`
|
|
SourcePath string `json:"sourcePath,omitempty" bson:"sourcePath,omitempty"`
|
|
ConnectionID string `json:"connectionId,omitempty" bson:"connectionId,omitempty"`
|
|
Bucket string `json:"bucket,omitempty" bson:"bucket,omitempty"`
|
|
Prefix string `json:"prefix,omitempty" bson:"prefix,omitempty"`
|
|
Endpoint string `json:"endpoint,omitempty" bson:"endpoint,omitempty"`
|
|
AccessKeyID string `json:"accessKeyId,omitempty" bson:"accessKeyId,omitempty"`
|
|
SecretAccessKey string `json:"secretAccessKey,omitempty" bson:"secretAccessKey,omitempty"`
|
|
AccessKeyPreview string `json:"accessKeyPreview,omitempty" bson:"-"`
|
|
SecretAccessKeyPreview string `json:"secretAccessKeyPreview,omitempty" bson:"-"`
|
|
HasAccessKeyID bool `json:"hasAccessKeyId,omitempty" bson:"-"`
|
|
HasSecretAccessKey bool `json:"hasSecretAccessKey,omitempty" bson:"-"`
|
|
ScanMode string `json:"scanMode,omitempty" bson:"scanMode,omitempty"`
|
|
IncrementalUnit string `json:"incrementalUnit,omitempty" bson:"incrementalUnit,omitempty"`
|
|
DirectoryDepth int `json:"directoryDepth,omitempty" bson:"directoryDepth,omitempty"`
|
|
Pattern string `json:"pattern,omitempty" bson:"pattern,omitempty"`
|
|
Enabled bool `json:"enabled" bson:"enabled"`
|
|
Notifications ScanNotificationSettings `json:"notifications,omitempty" bson:"notifications,omitempty"`
|
|
}
|
|
|
|
type SourceStateRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
|
|
WorkflowID string `json:"workflowId" bson:"workflowId"`
|
|
NodeID string `json:"nodeId" bson:"nodeId"`
|
|
SourceFingerprint string `json:"sourceFingerprint" bson:"sourceFingerprint"`
|
|
DataSource string `json:"dataSource,omitempty" bson:"dataSource,omitempty"`
|
|
SourcePath string `json:"sourcePath,omitempty" bson:"sourcePath,omitempty"`
|
|
Bucket string `json:"bucket,omitempty" bson:"bucket,omitempty"`
|
|
Prefix string `json:"prefix,omitempty" bson:"prefix,omitempty"`
|
|
Pattern string `json:"pattern,omitempty" bson:"pattern,omitempty"`
|
|
ScanMode string `json:"scanMode,omitempty" bson:"scanMode,omitempty"`
|
|
IncrementalUnit string `json:"incrementalUnit,omitempty" bson:"incrementalUnit,omitempty"`
|
|
DirectoryDepth int `json:"directoryDepth,omitempty" bson:"directoryDepth,omitempty"`
|
|
SeenFingerprints []string `json:"seenFingerprints,omitempty" bson:"seenFingerprints,omitempty"`
|
|
LastRunID string `json:"lastRunId,omitempty" bson:"lastRunId,omitempty"`
|
|
LastListedCount int `json:"lastListedCount" bson:"lastListedCount"`
|
|
LastNewCount int `json:"lastNewCount" bson:"lastNewCount"`
|
|
LastScanStartedAt string `json:"lastScanStartedAt,omitempty" bson:"lastScanStartedAt,omitempty"`
|
|
LastScanCompletedAt string `json:"lastScanCompletedAt,omitempty" bson:"lastScanCompletedAt,omitempty"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
}
|
|
|
|
type AssetStorageLocation struct {
|
|
Provider string `json:"provider,omitempty"`
|
|
Endpoint string `json:"endpoint,omitempty"`
|
|
Bucket string `json:"bucket,omitempty"`
|
|
Prefix string `json:"prefix,omitempty"`
|
|
Path string `json:"path,omitempty"`
|
|
}
|
|
|
|
type SourceCollectionRecord struct {
|
|
RunID string `json:"runId"`
|
|
WorkflowID string `json:"workflowId"`
|
|
WorkflowName string `json:"workflowName"`
|
|
ProjectID string `json:"projectId"`
|
|
ProjectName string `json:"projectName"`
|
|
CollectionID string `json:"collectionId"`
|
|
CollectionName string `json:"collectionName,omitempty"`
|
|
Path string `json:"path"`
|
|
RelativePath string `json:"relativePath"`
|
|
Meta map[string]any `json:"meta"`
|
|
HasIntrinsics bool `json:"hasIntrinsics"`
|
|
HasVideoMeta bool `json:"hasVideoMeta"`
|
|
RequiredFiles []string `json:"requiredFiles"`
|
|
MissingFiles []string `json:"missingRequiredFiles"`
|
|
VideoCount int `json:"videoCount"`
|
|
FileCount int `json:"fileCount"`
|
|
TotalBytes int64 `json:"totalBytes"`
|
|
Valid bool `json:"valid"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Storage AssetStorageLocation `json:"storage"`
|
|
}
|
|
|
|
type SourceCollectionEntry struct {
|
|
Path string `json:"path"`
|
|
Name string `json:"name"`
|
|
Kind string `json:"kind"`
|
|
CollectionName string `json:"collectionName,omitempty"`
|
|
SizeBytes int64 `json:"sizeBytes,omitempty"`
|
|
Codec string `json:"codec,omitempty"`
|
|
Resolution string `json:"resolution,omitempty"`
|
|
FrameRate float64 `json:"frameRate,omitempty"`
|
|
Duration float64 `json:"duration,omitempty"`
|
|
Metadata map[string]any `json:"metadata,omitempty"`
|
|
Artifact *ExecutionArtifact `json:"artifact,omitempty"`
|
|
DerivedFromIndex bool `json:"derivedFromIndex,omitempty"`
|
|
}
|
|
|
|
type SourceCollectionDetail struct {
|
|
Collection SourceCollectionRecord `json:"collection"`
|
|
Prefix string `json:"prefix,omitempty"`
|
|
Entries []SourceCollectionEntry `json:"entries"`
|
|
}
|
|
|
|
type PackageRecord struct {
|
|
RunID string `json:"runId"`
|
|
WorkflowID string `json:"workflowId"`
|
|
WorkflowName string `json:"workflowName"`
|
|
ProjectID string `json:"projectId"`
|
|
ProjectName string `json:"projectName"`
|
|
PackageName string `json:"packageName"`
|
|
ClipID string `json:"clipId"`
|
|
SourceVideo string `json:"sourceVideo"`
|
|
ClipDuration float64 `json:"clipDuration"`
|
|
FileCount int `json:"fileCount"`
|
|
PipelineTags []string `json:"pipelineTags"`
|
|
StoragePath string `json:"storagePath"`
|
|
Quality map[string]any `json:"quality,omitempty"`
|
|
Annotation map[string]any `json:"annotation,omitempty"`
|
|
CreatedAt string `json:"createdAt"`
|
|
PreviewArtifact *ExecutionArtifact `json:"previewArtifact,omitempty"`
|
|
Storage AssetStorageLocation `json:"storage"`
|
|
}
|
|
|
|
type PackageDetail struct {
|
|
Package PackageRecord `json:"package"`
|
|
Files []ExecutionArtifact `json:"files"`
|
|
}
|
|
|
|
type SamplingTaskStatus string
|
|
|
|
const (
|
|
SamplingTaskStatusPending SamplingTaskStatus = "pending"
|
|
SamplingTaskStatusCompleted SamplingTaskStatus = "completed"
|
|
)
|
|
|
|
type SamplingItemStatus string
|
|
|
|
const (
|
|
SamplingItemStatusPending SamplingItemStatus = "pending"
|
|
SamplingItemStatusCompleted SamplingItemStatus = "completed"
|
|
)
|
|
|
|
type SamplingRuleSummary struct {
|
|
ID string `json:"id" bson:"id"`
|
|
Field string `json:"field" bson:"field"`
|
|
Operator string `json:"operator" bson:"operator"`
|
|
Value any `json:"value,omitempty" bson:"value,omitempty"`
|
|
SamplePercent float64 `json:"samplePercent" bson:"samplePercent"`
|
|
MatchedCount int `json:"matchedCount" bson:"matchedCount"`
|
|
SampledCount int `json:"sampledCount" bson:"sampledCount"`
|
|
}
|
|
|
|
type SamplingReview struct {
|
|
VideoQuality string `json:"videoQuality" bson:"videoQuality"`
|
|
AnnotationAccuracy string `json:"annotationAccuracy" bson:"annotationAccuracy"`
|
|
AnnotationCompleteness string `json:"annotationCompleteness" bson:"annotationCompleteness"`
|
|
OverallGrade string `json:"overallGrade" bson:"overallGrade"`
|
|
Notes string `json:"notes,omitempty" bson:"notes,omitempty"`
|
|
ReviewedAt string `json:"reviewedAt" bson:"reviewedAt"`
|
|
}
|
|
|
|
type SamplingItemRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
TaskID string `json:"taskId" bson:"taskId"`
|
|
PackageName string `json:"packageName" bson:"packageName"`
|
|
ClipID string `json:"clipId" bson:"clipId"`
|
|
SourceVideo string `json:"sourceVideo" bson:"sourceVideo"`
|
|
SampleRuleID string `json:"sampleRuleId" bson:"sampleRuleId"`
|
|
StoragePath string `json:"storagePath,omitempty" bson:"storagePath,omitempty"`
|
|
Quality map[string]any `json:"quality,omitempty" bson:"quality,omitempty"`
|
|
Annotation map[string]any `json:"annotation,omitempty" bson:"annotation,omitempty"`
|
|
PreviewArtifact *ExecutionArtifact `json:"previewArtifact,omitempty" bson:"previewArtifact,omitempty"`
|
|
Status SamplingItemStatus `json:"status" bson:"status"`
|
|
Review *SamplingReview `json:"review,omitempty" bson:"review,omitempty"`
|
|
}
|
|
|
|
type SamplingTaskRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
|
|
RunID string `json:"runId" bson:"runId"`
|
|
WorkflowID string `json:"workflowId" bson:"workflowId"`
|
|
WorkflowName string `json:"workflowName" bson:"workflowName"`
|
|
ProjectID string `json:"projectId" bson:"projectId"`
|
|
ProjectName string `json:"projectName" bson:"projectName"`
|
|
Name string `json:"name" bson:"name"`
|
|
Description string `json:"description" bson:"description"`
|
|
Status SamplingTaskStatus `json:"status" bson:"status"`
|
|
Rules []SamplingRuleSummary `json:"rules" bson:"rules"`
|
|
Items []SamplingItemRecord `json:"items" bson:"items"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
}
|