Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IngestHosts ¶
IngestHosts folds the given hosts into the shared host table non-destructively — the same additive, idempotent merge Upsert performs (host.MergeHost / host.SameHost) — and returns the persisted rows, each carrying its DB-assigned ID. It is the entry point other domains use to unify the hosts they observed with the global host records: a scan Run, for instance, folds its hosts through here and then links the returned shared rows via its own join table, rather than inserting a private copy of every host per run. The passed *gorm.DB may be a transaction, so the caller's own writes and this fold commit or roll back together.
func WithPreloads ¶
func WithPreloads(from *hosts.HostFilters) (clauses map[string]bool)
WithPreloads returns a map DB clauses, to dynamically load child struct fields.
Types ¶
This section is empty.