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

Function ClaimPrebuild

coderd/database/dbgen/dbgen.go:1928–1951  ·  view source on GitHub ↗
(
	t testing.TB,
	db database.Store,
	now time.Time,
	newUserID uuid.UUID,
	newName string,
	presetID uuid.UUID,
	autostartSchedule sql.NullString,
	nextStartAt sql.NullTime,
	ttl sql.NullInt64,
)

Source from the content-addressed store, hash-verified

1926}
1927
1928func ClaimPrebuild(
1929 t testing.TB,
1930 db database.Store,
1931 now time.Time,
1932 newUserID uuid.UUID,
1933 newName string,
1934 presetID uuid.UUID,
1935 autostartSchedule sql.NullString,
1936 nextStartAt sql.NullTime,
1937 ttl sql.NullInt64,
1938) database.ClaimPrebuiltWorkspaceRow {
1939 claimedWorkspace, err := db.ClaimPrebuiltWorkspace(genCtx, database.ClaimPrebuiltWorkspaceParams{
1940 NewUserID: newUserID,
1941 NewName: newName,
1942 Now: now,
1943 PresetID: presetID,
1944 AutostartSchedule: autostartSchedule,
1945 NextStartAt: nextStartAt,
1946 WorkspaceTtl: ttl,
1947 })
1948 require.NoError(t, err, "claim prebuilt workspace")
1949
1950 return claimedWorkspace
1951}
1952
1953func AIBridgeInterception(t testing.TB, db database.Store, seed database.InsertAIBridgeInterceptionParams, endedAt *time.Time) database.AIBridgeInterception {
1954 interception, err := db.InsertAIBridgeInterception(genCtx, database.InsertAIBridgeInterceptionParams{

Callers 2

TestExecutorPrebuildsFunction · 0.92

Calls 1

Tested by 2

TestExecutorPrebuildsFunction · 0.74