Documentation
¶
Index ¶
- func CleanupAssets(maxAge time.Duration, deleteFiles bool) (int, error)
- func Delete(name string) error
- func RecoverJobs() error
- func Save(wf *Workflow) error
- func SaveAsset(asset Asset) error
- func Validate(wf *Workflow) error
- type Asset
- type AuditEvent
- type Edge
- type Job
- type JobOptions
- type LintIssue
- type Metadata
- type Metrics
- type ModelInfo
- type Node
- type NodeRunStatus
- type OptimizationSuggestion
- type Position
- type QueueStats
- type RunResult
- type SharedWorkflow
- type Summary
- type Template
- type Workflow
- type WorkflowExplanation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecoverJobs ¶
func RecoverJobs() error
Types ¶
type Asset ¶
type Asset struct {
ID string `json:"id"`
Workflow string `json:"workflow"`
JobID string `json:"job_id"`
Path string `json:"path"`
ImageURL string `json:"image_url,omitempty"`
Model string `json:"model,omitempty"`
Mode string `json:"mode,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Provider string `json:"provider,omitempty"`
Prompt string `json:"prompt,omitempty"`
Seed int `json:"seed,omitempty"`
SourceNode string `json:"source_node,omitempty"`
SizeBytes int64 `json:"size_bytes,omitempty"`
Archived bool `json:"archived,omitempty"`
CreatedAt string `json:"created_at"`
Metadata *Workflow `json:"metadata,omitempty"`
}
func ListAssets ¶
type AuditEvent ¶
type AuditEvent map[string]interface{}
func ReadAuditEvents ¶
func ReadAuditEvents(limit int) ([]AuditEvent, error)
type Job ¶
type Job struct {
ID string `json:"id"`
Workflow string `json:"workflow"`
Status string `json:"status"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Nodes []NodeRunStatus `json:"nodes"`
Logs []string `json:"logs"`
Result *RunResult `json:"result,omitempty"`
Error string `json:"error,omitempty"`
Attempts int `json:"attempts,omitempty"`
Priority int `json:"priority,omitempty"`
}
func StartJobWithOptions ¶
func StartJobWithOptions(wf *Workflow, opts JobOptions) (*Job, error)
type JobOptions ¶
type JobOptions struct {
Priority int `json:"priority,omitempty"`
}
type LintIssue ¶
type LintIssue struct {
Level string `json:"level"`
NodeID string `json:"node_id,omitempty"`
EdgeID string `json:"edge_id,omitempty"`
Message string `json:"message"`
}
func LintWorkflow ¶
type Metrics ¶
type Metrics struct {
Jobs QueueStats `json:"jobs"`
Assets int `json:"assets"`
Archived int `json:"archived_assets"`
TotalBytes int64 `json:"total_asset_bytes"`
AuditEvents int `json:"audit_events"`
}
func UsageMetrics ¶
func UsageMetrics() Metrics
type ModelInfo ¶
type ModelInfo struct {
Provider string `json:"provider"`
Model string `json:"model"`
Quality string `json:"quality"`
OutputDir string `json:"output_dir"`
BaseURL string `json:"base_url,omitempty"`
APIKeyConfigured bool `json:"api_key_configured"`
ImageCapable bool `json:"image_capable"`
Status string `json:"status"`
Message string `json:"message"`
}
func AvailableModels ¶
func AvailableModels() []ModelInfo
func ModelStatus ¶
func ModelStatus() ModelInfo
type NodeRunStatus ¶
type OptimizationSuggestion ¶
func OptimizeWorkflow ¶
func OptimizeWorkflow(wf *Workflow) []OptimizationSuggestion
type QueueStats ¶
type QueueStats struct {
Total int `json:"total"`
Queued int `json:"queued"`
Running int `json:"running"`
Success int `json:"success"`
Failed int `json:"failed"`
Canceled int `json:"canceled"`
MaxActive int `json:"max_active"`
}
func JobQueueStats ¶
func JobQueueStats() QueueStats
type RunResult ¶
type RunResult struct {
Status string `json:"status"`
Path string `json:"path,omitempty"`
Paths []string `json:"paths,omitempty"`
ImageURL string `json:"image_url,omitempty"`
ImageURLs []string `json:"image_urls,omitempty"`
Model string `json:"model,omitempty"`
Logs []string `json:"logs"`
Mode string `json:"mode,omitempty"`
Cached bool `json:"cached,omitempty"`
}
type SharedWorkflow ¶
type SharedWorkflow struct {
}
type Summary ¶
type Template ¶
type Template struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Tags []string `json:"tags"`
Workflow Workflow `json:"workflow"`
}
func BuiltinTemplates ¶
func BuiltinTemplates() []Template
func TemplateByID ¶
type Workflow ¶
type Workflow struct {
Version string `json:"version"`
Name string `json:"name"`
Nodes []Node `json:"nodes"`
Edges []Edge `json:"edges"`
Metadata Metadata `json:"metadata"`
}
func ApplyParameters ¶
func FixWorkflow ¶
func NewWorkflowFromPrompt ¶
type WorkflowExplanation ¶
type WorkflowExplanation struct {
Summary string `json:"summary"`
Steps []string `json:"steps"`
Nodes []string `json:"nodes"`
Warnings []string `json:"warnings,omitempty"`
}
func ExplainWorkflow ¶
func ExplainWorkflow(wf *Workflow) WorkflowExplanation
Click to show internal directories.
Click to hide internal directories.