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

Function WorkspaceBuild

coderd/database/dbfake/dbfake.go:126–131  ·  view source on GitHub ↗

WorkspaceBuild generates a workspace build for the provided workspace. Pass a database.Workspace{} with a nil ID to also generate a new workspace. Omitting the template ID on a workspace will also generate a new template with a template version.

(t testing.TB, db database.Store, ws database.WorkspaceTable)

Source from the content-addressed store, hash-verified

124// Omitting the template ID on a workspace will also generate a new template
125// with a template version.
126func WorkspaceBuild(t testing.TB, db database.Store, ws database.WorkspaceTable) WorkspaceBuildBuilder {
127 return WorkspaceBuildBuilder{
128 t: t, db: db, ws: ws,
129 logger: slogtest.Make(t, &slogtest.Options{}).Named("dbfake").Leveled(slog.LevelDebug),
130 }
131}
132
133func (b WorkspaceBuildBuilder) Pubsub(ps pubsub.Pubsub) WorkspaceBuildBuilder {
134 // nolint: revive // returns modified struct

Calls 1

NamedMethod · 0.80