Skip to content

Commit 368af5b

Browse files
committed
Add some basic docs
1 parent 48578bc commit 368af5b

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

database/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,11 @@ pub struct LabelId(pub u8, pub u32);
434434
#[derive(Serialize, Deserialize, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
435435
pub struct ArtifactIdNumber(pub u32);
436436

437+
/// Cached results of various queries.
437438
#[derive(Debug, Clone, PartialEq, Eq, Default)]
438439
pub struct Index {
439440
commits: Indexed<Commit>,
440441
artifacts: Indexed<Box<str>>,
441-
442442
errors: Indexed<Crate>,
443443
pstats: Indexed<(Crate, Profile, Cache, ProcessStatistic)>,
444444
queries: Indexed<(Crate, Profile, Cache, QueryLabel)>,

site/src/load.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,32 @@ impl TryCommit {
6464
}
6565
}
6666

67+
/// Keys for accessing various services
68+
///
69+
/// At the moment only used for accessing GitHub
6770
#[derive(Debug, Default, Deserialize)]
6871
pub struct Keys {
72+
/// GitHub API token from the `GITHUB_API_TOKEN` env variable
6973
pub github: Option<String>,
74+
/// GitHub webhook secret from the `GITHUB_WEBHOOK_SECRET` env variable
7075
pub secret: Option<String>,
7176
}
7277

78+
/// Site configuration
7379
#[derive(Debug, Deserialize)]
7480
pub struct Config {
7581
pub keys: Keys,
7682
}
7783

84+
/// Site context object that contains global data
7885
pub struct InputData {
86+
/// Site configuration
7987
pub config: Config,
80-
88+
/// Cached site landing page
8189
pub landing_page: ArcSwap<Option<Arc<crate::api::graph::Response>>>,
82-
90+
/// Index of various common queries
8391
pub index: ArcSwap<crate::db::Index>,
92+
/// Database connection pool
8493
pub pool: Pool,
8594
}
8695

0 commit comments

Comments
 (0)