flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/crates/contracts/src/projects.rs

26 lines878 bytesCodeBlame
1//! The projects service, as the Rust services call it: a project is what a
2//! workspace builds and runs, with one source. Mirrors
3//! `packages/contracts/src/projects.ts`, as far as Rust callers need it.
4
5use serde::{Deserialize, Serialize};
6
7/// `by_repo`: the projects built from a repository, its primary one first;
8/// a repository from before projects is given its own. Returns
9/// `Vec<ProjectRef>`.
10#[derive(Debug, Serialize, Deserialize)]
11#[serde(rename_all = "camelCase")]
12pub struct ByRepoArgs {
13 pub repo_id: String,
14}
15
16/// A project, as much of it as other services need.
17#[derive(Clone, Debug, Serialize, Deserialize)]
18#[serde(rename_all = "camelCase")]
19pub struct ProjectRef {
20 pub id: String,
21 pub workspace: String,
22 pub slug: String,
23 /// The project its repository's workflows read secrets from.
24 #[serde(default)]
25 pub primary: bool,
26}