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

Function BoundaryLog

coderd/database/dbgen/dbgen.go:469–483  ·  view source on GitHub ↗
(t testing.TB, db database.Store, seed database.BoundaryLog)

Source from the content-addressed store, hash-verified

467}
468
469func BoundaryLog(t testing.TB, db database.Store, seed database.BoundaryLog) database.BoundaryLog {
470 log, err := db.InsertBoundaryLog(genCtx, database.InsertBoundaryLogParams{
471 ID: takeFirst(seed.ID, uuid.New()),
472 SessionID: seed.SessionID,
473 SequenceNumber: takeFirst(seed.SequenceNumber, 0),
474 CapturedAt: takeFirst(seed.CapturedAt, dbtime.Now()),
475 CreatedAt: takeFirst(seed.CreatedAt, dbtime.Now()),
476 Proto: takeFirst(seed.Proto, "http"),
477 Method: takeFirst(seed.Method, "GET"),
478 Detail: takeFirst(seed.Detail, "https://example.com"),
479 MatchedRule: seed.MatchedRule,
480 })
481 require.NoError(t, err, "insert boundary log")
482 return log
483}
484
485func Template(t testing.TB, db database.Store, seed database.Template) database.Template {
486 id := takeFirst(seed.ID, uuid.New())

Callers

nothing calls this directly

Calls 4

NowFunction · 0.92
takeFirstFunction · 0.70
InsertBoundaryLogMethod · 0.65
NewMethod · 0.65

Tested by

no test coverage detected