generated from metakgp/README.md
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: harshkhandeparkar <[email protected]>
- Loading branch information
1 parent
5a245ef
commit 0ad2688
Showing
147 changed files
with
6,624 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
window.ALL_CRATES = ["iqps_backend"]; | ||
//{"start":21,"fragment_lengths":[14]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-9960930a.css"><link rel="stylesheet" href="./static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="iqps_backend" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="./static.files/storage-59e33391.js"></script><script defer src="./static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.84.0</span></h2></div><div class="version">(9fc6b4312 2025-01-07)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="iqps_backend" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../iqps_backend/index.html">iqps_<wbr>backend</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="auth/struct.Auth.html">auth::Auth</a></li><li><a href="auth/struct.GithubAccessTokenResponse.html">auth::GithubAccessTokenResponse</a></li><li><a href="auth/struct.GithubMembershipResponse.html">auth::GithubMembershipResponse</a></li><li><a href="auth/struct.GithubUserResponse.html">auth::GithubUserResponse</a></li><li><a href="db/struct.Breh.html">db::Breh</a></li><li><a href="db/struct.Database.html">db::Database</a></li><li><a href="db/models/struct.DBAdminDashboardQP.html">db::models::DBAdminDashboardQP</a></li><li><a href="db/models/struct.DBBaseQP.html">db::models::DBBaseQP</a></li><li><a href="env/struct.EnvVars.html">env::EnvVars</a></li><li><a href="pathutils/struct.PathTriad.html">pathutils::PathTriad</a></li><li><a href="pathutils/struct.Paths.html">pathutils::Paths</a></li><li><a href="qp/struct.AdminDashboardQP.html">qp::AdminDashboardQP</a></li><li><a href="qp/struct.BaseQP.html">qp::BaseQP</a></li><li><a href="routing/struct.AppError.html">routing::AppError</a></li><li><a href="routing/struct.BackendResponse.html">routing::BackendResponse</a></li><li><a href="routing/struct.RouterState.html">routing::RouterState</a></li><li><a href="routing/handlers/struct.DeleteReq.html">routing::handlers::DeleteReq</a></li><li><a href="routing/handlers/struct.EditReq.html">routing::handlers::EditReq</a></li><li><a href="routing/handlers/struct.FileDetails.html">routing::handlers::FileDetails</a></li><li><a href="routing/handlers/struct.OAuthReq.html">routing::handlers::OAuthReq</a></li><li><a href="routing/handlers/struct.OAuthRes.html">routing::handlers::OAuthRes</a></li><li><a href="routing/handlers/struct.ProfileRes.html">routing::handlers::ProfileRes</a></li><li><a href="routing/handlers/struct.UploadStatus.html">routing::handlers::UploadStatus</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="db/queries/enum.ExamFilter.html">db::queries::ExamFilter</a></li><li><a href="pathutils/enum.PaperCategory.html">pathutils::PaperCategory</a></li><li><a href="qp/enum.Exam.html">qp::Exam</a></li><li><a href="qp/enum.Semester.html">qp::Semester</a></li><li><a href="routing/enum.Status.html">routing::Status</a></li></ul><h3 id="traits">Traits</h3><ul class="all-items"><li><a href="qp/trait.WithUrl.html">qp::WithUrl</a></li></ul><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="auth/fn.authenticate_user.html">auth::authenticate_user</a></li><li><a href="auth/fn.generate_token.html">auth::generate_token</a></li><li><a href="auth/fn.verify_token.html">auth::verify_token</a></li><li><a href="db/queries/fn.get_all_unapproved_query.html">db::queries::get_all_unapproved_query</a></li><li><a href="db/queries/fn.get_edit_paper_query.html">db::queries::get_edit_paper_query</a></li><li><a href="db/queries/fn.get_get_paper_by_id_query.html">db::queries::get_get_paper_by_id_query</a></li><li><a href="db/queries/fn.get_qp_search_query.html">db::queries::get_qp_search_query</a></li><li><a href="db/queries/fn.get_similar_papers_query.html">db::queries::get_similar_papers_query</a></li><li><a href="fn.main.html">main</a></li><li><a href="routing/fn.get_router.html">routing::get_router</a></li><li><a href="routing/handlers/fn.delete.html">routing::handlers::delete</a></li><li><a href="routing/handlers/fn.edit.html">routing::handlers::edit</a></li><li><a href="routing/handlers/fn.get_unapproved.html">routing::handlers::get_unapproved</a></li><li><a href="routing/handlers/fn.healthcheck.html">routing::handlers::healthcheck</a></li><li><a href="routing/handlers/fn.oauth.html">routing::handlers::oauth</a></li><li><a href="routing/handlers/fn.profile.html">routing::handlers::profile</a></li><li><a href="routing/handlers/fn.search.html">routing::handlers::search</a></li><li><a href="routing/handlers/fn.similar.html">routing::handlers::similar</a></li><li><a href="routing/handlers/fn.upload.html">routing::handlers::upload</a></li><li><a href="routing/middleware/fn.verify_jwt_middleware.html">routing::middleware::verify_jwt_middleware</a></li></ul><h3 id="types">Type Aliases</h3><ul class="all-items"><li><a href="routing/handlers/type.HandlerReturn.html">routing::handlers::HandlerReturn</a></li></ul><h3 id="constants">Constants</h3><ul class="all-items"><li><a href="db/queries/constant.ADMIN_DASHBOARD_QP_FIELDS.html">db::queries::ADMIN_DASHBOARD_QP_FIELDS</a></li><li><a href="db/queries/constant.INIT_DB.html">db::queries::INIT_DB</a></li><li><a href="db/queries/constant.INSERT_NEW_QP.html">db::queries::INSERT_NEW_QP</a></li><li><a href="db/queries/constant.SEARCH_QP_FIELDS.html">db::queries::SEARCH_QP_FIELDS</a></li><li><a href="db/queries/constant.SOFT_DELETE_BY_ID.html">db::queries::SOFT_DELETE_BY_ID</a></li><li><a href="db/queries/constant.UPDATE_FILELINK.html">db::queries::UPDATE_FILELINK</a></li><li><a href="routing/handlers/constant.FILE_SIZE_LIMIT.html">routing::handlers::FILE_SIZE_LIMIT</a></li></ul></section></div></main></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Takes a Github OAuth code and creates a JWT authentication token for the user"><title>authenticate_user in iqps_backend::auth - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iqps_backend" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iqps_backend/index.html">iqps_<wbr>backend</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iqps_<wbr>backend::<wbr>auth</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iqps_backend</a>::<wbr><a href="index.html">auth</a></span><h1>Function <span class="fn">authenticate_user</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iqps_backend/auth.rs.html#102-193">Source</a> </span></div><pre class="rust item-decl"><code>pub async fn authenticate_user( | ||
code: &<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, | ||
env_vars: &<a class="struct" href="../env/struct.EnvVars.html" title="struct iqps_backend::env::EnvVars">EnvVars</a>, | ||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>, <a class="struct" href="https://docs.rs/eyre/0.6.12/eyre/struct.Report.html" title="struct eyre::Report">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Takes a Github OAuth code and creates a JWT authentication token for the user</p> | ||
<ol> | ||
<li>Uses the OAuth code to get an access token.</li> | ||
<li>Uses the access token to get the user’s username.</li> | ||
<li>Uses the username and and a admin’s access token to verify whether the user is a member of the admins github team.</li> | ||
</ol> | ||
<p>Returns the JWT if the user is authenticated, <code>None</code> otherwise.</p> | ||
</div></details></section></div></main></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Generates a JWT with the username (for claims) and secret key"><title>generate_token in iqps_backend::auth - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iqps_backend" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iqps_backend/index.html">iqps_<wbr>backend</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In iqps_<wbr>backend::<wbr>auth</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iqps_backend</a>::<wbr><a href="index.html">auth</a></span><h1>Function <span class="fn">generate_token</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iqps_backend/auth.rs.html#47-79">Source</a> </span></div><pre class="rust item-decl"><code>async fn generate_token( | ||
username: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>, | ||
env_vars: &<a class="struct" href="../env/struct.EnvVars.html" title="struct iqps_backend::env::EnvVars">EnvVars</a>, | ||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://docs.rs/eyre/0.6.12/eyre/struct.Report.html" title="struct eyre::Report">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generates a JWT with the username (for claims) and secret key</p> | ||
</div></details></section></div></main></body></html> |
Oops, something went wrong.