MCPcopy Index your code
hub / github.com/coder/coder / WorkspaceAgentLogSource

Function WorkspaceAgentLogSource

coderd/database/dbgen/dbgen.go:822–832  ·  view source on GitHub ↗
(t testing.TB, db database.Store, orig database.WorkspaceAgentLogSource)

Source from the content-addressed store, hash-verified

820}
821
822func WorkspaceAgentLogSource(t testing.TB, db database.Store, orig database.WorkspaceAgentLogSource) database.WorkspaceAgentLogSource {
823 sources, err := db.InsertWorkspaceAgentLogSources(genCtx, database.InsertWorkspaceAgentLogSourcesParams{
824 WorkspaceAgentID: takeFirst(orig.WorkspaceAgentID, uuid.New()),
825 ID: []uuid.UUID{takeFirst(orig.ID, uuid.New())},
826 CreatedAt: takeFirst(orig.CreatedAt, dbtime.Now()),
827 DisplayName: []string{takeFirst(orig.DisplayName, testutil.GetRandomName(t))},
828 Icon: []string{takeFirst(orig.Icon, testutil.GetRandomName(t))},
829 })
830 require.NoError(t, err, "insert workspace agent log source")
831 return sources[0]
832}
833
834func WorkspaceAgentLog(t testing.TB, db database.Store, orig database.WorkspaceAgentLog) database.WorkspaceAgentLog {
835 log, err := db.InsertWorkspaceAgentLogs(genCtx, database.InsertWorkspaceAgentLogsParams{

Callers 2

Calls 5

NowFunction · 0.92
GetRandomNameFunction · 0.92
takeFirstFunction · 0.70
NewMethod · 0.65

Tested by 2