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 redesign | 1 | //! 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 | ||
| 7 | pub mod identity; | |
| 8 | mod ids; | |
| 9 | mod names; | |
| 10 | mod outcome; | |
| 11 | ||
| 12 | pub use ids::new_id; | |
| 13 | pub use names::{is_valid_namespace, is_valid_repo_name}; | |
| 14 | pub use outcome::{Failure, FailureCode, Outcome}; | |
| 15 | ||
| 16 | use serde::{Deserialize, Serialize}; | |
| 17 | ||
| 18 | #[derive(Clone, Debug, Serialize, Deserialize)] | |
| 19 | pub struct User { | |
| 20 | pub id: String, | |
| 21 | pub username: String, | |
| Email verification, password reset, and Git for AI scale positioning | 22 | /// Whether the account's email address has been confirmed. Unverified |
| 23 | /// accounts can sign in but cannot create or change anything. | |
| 24 | #[serde(default)] | |
| 25 | pub verified: bool, | |
| API and MCP server, Rust identity service, registration, site redesign | 26 | } |
| 27 | ||
| 28 | /// Who is asking. Every read and write in every service takes one. | |
| 29 | pub type Viewer = Option<User>; |