pr_01m47d24b0e6n91zwymwxg0vpx/crates/contracts/src/lib.rs

33 lines940 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

API and MCP server, Rust identity service, registration, site redesign1//! Types and service interfaces shared by every g1t service.
2//!
3//! Each service has a module here holding the data it exchanges and the
4//! arguments of each of its methods. Services and their callers depend on
5//! this crate, never on each other's code.
6
Rust repos service with shipping; pull requests kept in the model7pub mod events;
API and MCP server, Rust identity service, registration, site redesign8pub mod identity;
9mod ids;
10mod names;
11mod outcome;
Rust repos service with shipping; pull requests kept in the model12pub mod repos;
RFC 3339 timestamps in identity and repos13pub mod time;
Work service in Rust, with RFC 3339 timestamps14pub mod work;
API and MCP server, Rust identity service, registration, site redesign15
16pub use ids::new_id;
17pub use names::{is_valid_namespace, is_valid_repo_name};
18pub use outcome::{Failure, FailureCode, Outcome};
19
20use serde::{Deserialize, Serialize};
21
22#[derive(Clone, Debug, Serialize, Deserialize)]
23pub struct User {
24 pub id: String,
25 pub username: String,
Email verification, password reset, and Git for AI scale positioning26 /// Whether the account's email address has been confirmed. Unverified
27 /// accounts can sign in but cannot create or change anything.
28 #[serde(default)]
29 pub verified: bool,
API and MCP server, Rust identity service, registration, site redesign30}
31
32/// Who is asking. Every read and write in every service takes one.
33pub type Viewer = Option<User>;