this repo has no description

Other health endpoint

-17
.sqlx/query-1ea62c689410d98faa70a5a6075911a8eeed679b0e3d7bbd103732abc912f45e.json
··· 1 - { 2 - "db_name": "PostgreSQL", 3 - "query": "INSERT INTO records (repo_id, collection, rkey, record_cid) VALUES ($1, $2, $3, $4)\n ON CONFLICT (repo_id, collection, rkey) DO UPDATE SET record_cid = $4, created_at = NOW()", 4 - "describe": { 5 - "columns": [], 6 - "parameters": { 7 - "Left": [ 8 - "Uuid", 9 - "Text", 10 - "Text", 11 - "Text" 12 - ] 13 - }, 14 - "nullable": [] 15 - }, 16 - "hash": "1ea62c689410d98faa70a5a6075911a8eeed679b0e3d7bbd103732abc912f45e" 17 - }
+22
.sqlx/query-3fae97c8a2551c1ef8db06c4cde5480e44c5f771397e01574d0026e5bac6af55.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "\n SELECT r.repo_root_cid\n FROM repos r\n JOIN users u ON u.id = r.user_id\n WHERE u.did = $1\n ", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "repo_root_cid", 9 + "type_info": "Text" 10 + } 11 + ], 12 + "parameters": { 13 + "Left": [ 14 + "Text" 15 + ] 16 + }, 17 + "nullable": [ 18 + false 19 + ] 20 + }, 21 + "hash": "3fae97c8a2551c1ef8db06c4cde5480e44c5f771397e01574d0026e5bac6af55" 22 + }
+70
.sqlx/query-51809819130908ef3600e5843f6098fb510afb4c827a41bc3a32ad78ea10184c.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "\n SELECT seq, did, created_at, event_type, commit_cid, prev_cid, ops, blobs, blocks_cids\n FROM repo_seq\n WHERE seq > $1\n ORDER BY seq ASC\n ", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "seq", 9 + "type_info": "Int8" 10 + }, 11 + { 12 + "ordinal": 1, 13 + "name": "did", 14 + "type_info": "Text" 15 + }, 16 + { 17 + "ordinal": 2, 18 + "name": "created_at", 19 + "type_info": "Timestamptz" 20 + }, 21 + { 22 + "ordinal": 3, 23 + "name": "event_type", 24 + "type_info": "Text" 25 + }, 26 + { 27 + "ordinal": 4, 28 + "name": "commit_cid", 29 + "type_info": "Text" 30 + }, 31 + { 32 + "ordinal": 5, 33 + "name": "prev_cid", 34 + "type_info": "Text" 35 + }, 36 + { 37 + "ordinal": 6, 38 + "name": "ops", 39 + "type_info": "Jsonb" 40 + }, 41 + { 42 + "ordinal": 7, 43 + "name": "blobs", 44 + "type_info": "TextArray" 45 + }, 46 + { 47 + "ordinal": 8, 48 + "name": "blocks_cids", 49 + "type_info": "TextArray" 50 + } 51 + ], 52 + "parameters": { 53 + "Left": [ 54 + "Int8" 55 + ] 56 + }, 57 + "nullable": [ 58 + false, 59 + false, 60 + false, 61 + false, 62 + true, 63 + true, 64 + true, 65 + true, 66 + true 67 + ] 68 + }, 69 + "hash": "51809819130908ef3600e5843f6098fb510afb4c827a41bc3a32ad78ea10184c" 70 + }
+28
.sqlx/query-5ddd4f1ab0b0d3389b343008f5161808df3cd63ef71e3711180b7ddb5feda6cd.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "\n SELECT id, private_key_bytes\n FROM reserved_signing_keys\n WHERE public_key_did_key = $1\n AND used_at IS NULL\n AND expires_at > NOW()\n FOR UPDATE\n ", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "id", 9 + "type_info": "Uuid" 10 + }, 11 + { 12 + "ordinal": 1, 13 + "name": "private_key_bytes", 14 + "type_info": "Bytea" 15 + } 16 + ], 17 + "parameters": { 18 + "Left": [ 19 + "Text" 20 + ] 21 + }, 22 + "nullable": [ 23 + false, 24 + false 25 + ] 26 + }, 27 + "hash": "5ddd4f1ab0b0d3389b343008f5161808df3cd63ef71e3711180b7ddb5feda6cd" 28 + }
+70
.sqlx/query-7b6ca5155c645f2011364594833effe41494d0c855b0c9314ab56ea8b0fb4e6d.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "\n SELECT seq, did, created_at, event_type, commit_cid, prev_cid, ops, blobs, blocks_cids\n FROM repo_seq\n WHERE seq = $1\n ", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "seq", 9 + "type_info": "Int8" 10 + }, 11 + { 12 + "ordinal": 1, 13 + "name": "did", 14 + "type_info": "Text" 15 + }, 16 + { 17 + "ordinal": 2, 18 + "name": "created_at", 19 + "type_info": "Timestamptz" 20 + }, 21 + { 22 + "ordinal": 3, 23 + "name": "event_type", 24 + "type_info": "Text" 25 + }, 26 + { 27 + "ordinal": 4, 28 + "name": "commit_cid", 29 + "type_info": "Text" 30 + }, 31 + { 32 + "ordinal": 5, 33 + "name": "prev_cid", 34 + "type_info": "Text" 35 + }, 36 + { 37 + "ordinal": 6, 38 + "name": "ops", 39 + "type_info": "Jsonb" 40 + }, 41 + { 42 + "ordinal": 7, 43 + "name": "blobs", 44 + "type_info": "TextArray" 45 + }, 46 + { 47 + "ordinal": 8, 48 + "name": "blocks_cids", 49 + "type_info": "TextArray" 50 + } 51 + ], 52 + "parameters": { 53 + "Left": [ 54 + "Int8" 55 + ] 56 + }, 57 + "nullable": [ 58 + false, 59 + false, 60 + false, 61 + false, 62 + true, 63 + true, 64 + true, 65 + true, 66 + true 67 + ] 68 + }, 69 + "hash": "7b6ca5155c645f2011364594833effe41494d0c855b0c9314ab56ea8b0fb4e6d" 70 + }
+28
.sqlx/query-7ce9c5fb943b4217da17c041998263c0af7b77c8feecc654dde7a71fbab4e1ad.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "\n INSERT INTO repo_seq (did, event_type, commit_cid, prev_cid, ops, blobs, blocks_cids)\n VALUES ($1, $2, $3, $4, $5, $6, $7)\n RETURNING seq\n ", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "seq", 9 + "type_info": "Int8" 10 + } 11 + ], 12 + "parameters": { 13 + "Left": [ 14 + "Text", 15 + "Text", 16 + "Text", 17 + "Text", 18 + "Jsonb", 19 + "TextArray", 20 + "TextArray" 21 + ] 22 + }, 23 + "nullable": [ 24 + false 25 + ] 26 + }, 27 + "hash": "7ce9c5fb943b4217da17c041998263c0af7b77c8feecc654dde7a71fbab4e1ad" 28 + }
+58
.sqlx/query-7d8993cdd6f859d38d1e017bbb2bd02278d75baec57b7d2c97ba590b52f8e2d9.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "\n SELECT s.did, k.key_bytes, u.id as user_id, u.email as current_email,\n u.email_confirmation_code, u.email_confirmation_code_expires_at,\n u.email_pending_verification\n FROM sessions s\n JOIN users u ON s.did = u.did\n JOIN user_keys k ON u.id = k.user_id\n WHERE s.access_jwt = $1\n ", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "did", 9 + "type_info": "Text" 10 + }, 11 + { 12 + "ordinal": 1, 13 + "name": "key_bytes", 14 + "type_info": "Bytea" 15 + }, 16 + { 17 + "ordinal": 2, 18 + "name": "user_id", 19 + "type_info": "Uuid" 20 + }, 21 + { 22 + "ordinal": 3, 23 + "name": "current_email", 24 + "type_info": "Text" 25 + }, 26 + { 27 + "ordinal": 4, 28 + "name": "email_confirmation_code", 29 + "type_info": "Text" 30 + }, 31 + { 32 + "ordinal": 5, 33 + "name": "email_confirmation_code_expires_at", 34 + "type_info": "Timestamptz" 35 + }, 36 + { 37 + "ordinal": 6, 38 + "name": "email_pending_verification", 39 + "type_info": "Text" 40 + } 41 + ], 42 + "parameters": { 43 + "Left": [ 44 + "Text" 45 + ] 46 + }, 47 + "nullable": [ 48 + false, 49 + false, 50 + false, 51 + false, 52 + true, 53 + true, 54 + true 55 + ] 56 + }, 57 + "hash": "7d8993cdd6f859d38d1e017bbb2bd02278d75baec57b7d2c97ba590b52f8e2d9" 58 + }
+25
.sqlx/query-c8e4a48f1944ea78e29ed9c87db0535a34adc5f0b573701f40ff00acb4a64c03.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "\n INSERT INTO reserved_signing_keys (did, public_key_did_key, private_key_bytes, expires_at)\n VALUES ($1, $2, $3, $4)\n RETURNING id\n ", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "id", 9 + "type_info": "Uuid" 10 + } 11 + ], 12 + "parameters": { 13 + "Left": [ 14 + "Text", 15 + "Text", 16 + "Bytea", 17 + "Timestamptz" 18 + ] 19 + }, 20 + "nullable": [ 21 + false 22 + ] 23 + }, 24 + "hash": "c8e4a48f1944ea78e29ed9c87db0535a34adc5f0b573701f40ff00acb4a64c03" 25 + }
-22
.sqlx/query-ef80f18f4b063df44bbe9bc4a382aabd2cf240669df450be8eeb814a79cb80c7.json
··· 1 - { 2 - "db_name": "PostgreSQL", 3 - "query": "SELECT record_cid FROM records WHERE repo_id = $1", 4 - "describe": { 5 - "columns": [ 6 - { 7 - "ordinal": 0, 8 - "name": "record_cid", 9 - "type_info": "Text" 10 - } 11 - ], 12 - "parameters": { 13 - "Left": [ 14 - "Uuid" 15 - ] 16 - }, 17 - "nullable": [ 18 - false 19 - ] 20 - }, 21 - "hash": "ef80f18f4b063df44bbe9bc4a382aabd2cf240669df450be8eeb814a79cb80c7" 22 - }
+14
.sqlx/query-f710f54a5b20342e4bc09b94333f3ef8589de90e39419eeeb4de9721d97cdf48.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "UPDATE reserved_signing_keys SET used_at = NOW() WHERE id = $1", 4 + "describe": { 5 + "columns": [], 6 + "parameters": { 7 + "Left": [ 8 + "Uuid" 9 + ] 10 + }, 11 + "nullable": [] 12 + }, 13 + "hash": "f710f54a5b20342e4bc09b94333f3ef8589de90e39419eeeb4de9721d97cdf48" 14 + }
+23
.sqlx/query-f9d64855317e32857bf5aa19abe03ebd16ac9a737dee0d51384dc1be80d66c08.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "SELECT 1 as one FROM users WHERE LOWER(email) = $1 AND id != $2", 4 + "describe": { 5 + "columns": [ 6 + { 7 + "ordinal": 0, 8 + "name": "one", 9 + "type_info": "Int4" 10 + } 11 + ], 12 + "parameters": { 13 + "Left": [ 14 + "Text", 15 + "Uuid" 16 + ] 17 + }, 18 + "nullable": [ 19 + null 20 + ] 21 + }, 22 + "hash": "f9d64855317e32857bf5aa19abe03ebd16ac9a737dee0d51384dc1be80d66c08" 23 + }
+15
.sqlx/query-fb7eb6dcbe91352f2d154c384a93c6c55a91f735832618b464208b70d6a8f580.json
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "\n UPDATE users\n SET email = $1,\n email_pending_verification = NULL,\n email_confirmation_code = NULL,\n email_confirmation_code_expires_at = NULL,\n updated_at = NOW()\n WHERE id = $2\n ", 4 + "describe": { 5 + "columns": [], 6 + "parameters": { 7 + "Left": [ 8 + "Text", 9 + "Uuid" 10 + ] 11 + }, 12 + "nullable": [] 13 + }, 14 + "hash": "fb7eb6dcbe91352f2d154c384a93c6c55a91f735832618b464208b70d6a8f580" 15 + }
+1
TODO.md
··· 5 5 ## Server Infrastructure & Proxying 6 6 - [x] Health Check 7 7 - [x] Implement `GET /health` endpoint (returns "OK"). 8 + - [x] Implement `GET /xrpc/_health` endpoint (returns "OK"). 8 9 - [x] Server Description 9 10 - [x] Implement `com.atproto.server.describeServer` (returns available user domains). 10 11 - [x] XRPC Proxying
+1
src/lib.rs
··· 15 15 pub fn app(state: AppState) -> Router { 16 16 Router::new() 17 17 .route("/health", get(api::server::health)) 18 + .route("/xrpc/_health", get(api::server::health)) 18 19 .route( 19 20 "/xrpc/com.atproto.server.describeServer", 20 21 get(api::server::describe_server),