MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / dbDockerNetworkToModel

Function dbDockerNetworkToModel

server-source-code/internal/store/convert.go:361–381  ·  view source on GitHub ↗
(d db.DockerNetwork)

Source from the content-addressed store, hash-verified

359}
360
361func dbDockerNetworkToModel(d db.DockerNetwork) models.DockerNetwork {
362 return models.DockerNetwork{
363 ID: d.ID,
364 HostID: d.HostID,
365 NetworkID: d.NetworkID,
366 Name: d.Name,
367 Driver: d.Driver,
368 Scope: d.Scope,
369 IPv6Enabled: d.Ipv6Enabled,
370 Internal: d.Internal,
371 Attachable: d.Attachable,
372 Ingress: d.Ingress,
373 ConfigOnly: d.ConfigOnly,
374 Labels: models.JSON(d.Labels),
375 IPAM: models.JSON(d.Ipam),
376 ContainerCount: int(d.ContainerCount),
377 CreatedAt: pgTimePtr(d.CreatedAt),
378 UpdatedAt: pgTime(d.UpdatedAt),
379 LastChecked: pgTime(d.LastChecked),
380 }
381}
382
383func dbRepositoryToModel(r db.Repository) models.Repository {
384 prio := (*int)(nil)

Callers 3

convertNetworksFunction · 0.85
ListNetworksMethod · 0.85
GetNetworkMethod · 0.85

Calls 2

pgTimePtrFunction · 0.85
pgTimeFunction · 0.70

Tested by

no test coverage detected