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

Function GitSSHKey

coderd/database/dbgen/dbgen.go:989–999  ·  view source on GitHub ↗
(t testing.TB, db database.Store, orig database.GitSSHKey)

Source from the content-addressed store, hash-verified

987}
988
989func GitSSHKey(t testing.TB, db database.Store, orig database.GitSSHKey) database.GitSSHKey {
990 key, err := db.InsertGitSSHKey(genCtx, database.InsertGitSSHKeyParams{
991 UserID: takeFirst(orig.UserID, uuid.New()),
992 CreatedAt: takeFirst(orig.CreatedAt, dbtime.Now()),
993 UpdatedAt: takeFirst(orig.UpdatedAt, dbtime.Now()),
994 PrivateKey: takeFirst(orig.PrivateKey, ""),
995 PublicKey: takeFirst(orig.PublicKey, ""),
996 })
997 require.NoError(t, err, "insert ssh key")
998 return key
999}
1000
1001func Organization(t testing.TB, db database.Store, orig database.Organization) database.Organization {
1002 org, err := db.InsertOrganization(genCtx, database.InsertOrganizationParams{

Callers 2

TestGeneratorFunction · 0.92
TestAcquireJobFunction · 0.92

Calls 4

NowFunction · 0.92
takeFirstFunction · 0.70
InsertGitSSHKeyMethod · 0.65
NewMethod · 0.65

Tested by 2

TestGeneratorFunction · 0.74
TestAcquireJobFunction · 0.74