MCPcopy Create free account
hub / github.com/Facets-cloud/flow / ScanOwner

Function ScanOwner

internal/flowdb/owners.go:47–58  ·  view source on GitHub ↗
(row interface{ Scan(dest ...any) error })

Source from the content-addressed store, hash-verified

45const OwnerCols = "slug, name, work_dir, project_slug, status, every, next_wake_at, last_tick_at, last_tick_status, tick_pid, tick_started, harness, created_at, updated_at, archived_at"
46
47func ScanOwner(row interface{ Scan(dest ...any) error }) (*Owner, error) {
48 var o Owner
49 err := row.Scan(
50 &o.Slug, &o.Name, &o.WorkDir, &o.ProjectSlug, &o.Status, &o.Every,
51 &o.NextWakeAt, &o.LastTickAt, &o.LastTickStatus, &o.TickPID, &o.TickStarted, &o.Harness,
52 &o.CreatedAt, &o.UpdatedAt, &o.ArchivedAt,
53 )
54 if err != nil {
55 return nil, err
56 }
57 return &o, nil
58}
59
60// CreateOwner inserts a new owner. Status defaults to 'active' and
61// timestamps are stamped if unset. NextWakeAt is left as-is (NULL until

Callers 3

GetOwnerFunction · 0.85
DueOwnersFunction · 0.85
ListOwnersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected