feat: Add user scoped git ssh keys (#834)

This commit is contained in:
Garrett Delfosse
2022-04-06 00:18:26 +00:00
committed by GitHub
parent 1e9e5f7c76
commit 9da17be61e
19 changed files with 924 additions and 2 deletions
+35
View File
@@ -0,0 +1,35 @@
-- name: InsertGitSSHKey :one
INSERT INTO
gitsshkeys (
user_id,
created_at,
updated_at,
private_key,
public_key
)
VALUES
($1, $2, $3, $4, $5) RETURNING *;
-- name: GetGitSSHKey :one
SELECT
*
FROM
gitsshkeys
WHERE
user_id = $1;
-- name: UpdateGitSSHKey :exec
UPDATE
gitsshkeys
SET
updated_at = $2,
private_key = $3,
public_key = $4
WHERE
user_id = $1;
-- name: DeleteGitSSHKey :exec
DELETE FROM
gitsshkeys
WHERE
user_id = $1;