Skip to main content

winterbaume_codecommit/
types.rs

1use std::collections::HashMap;
2
3use chrono::{DateTime, Utc};
4
5#[derive(Debug, Clone)]
6pub struct Repository {
7    pub repository_id: String,
8    pub repository_name: String,
9    pub arn: String,
10    pub description: String,
11    pub clone_url_http: String,
12    pub clone_url_ssh: String,
13    pub creation_date: DateTime<Utc>,
14    pub last_modified_date: DateTime<Utc>,
15    pub account_id: String,
16    pub default_branch: Option<String>,
17    pub tags: HashMap<String, String>,
18}
19
20#[derive(Debug, Clone)]
21pub struct Branch {
22    pub branch_name: String,
23    pub commit_id: String,
24}
25
26#[derive(Debug, Clone)]
27pub struct CommitRecord {
28    pub commit_id: String,
29    pub tree_id: String,
30    pub parent_ids: Vec<String>,
31    pub message: String,
32    pub author_name: String,
33    pub author_email: String,
34    pub date: DateTime<Utc>,
35}
36
37/// A file entry stored in the repository under a given commit.
38#[derive(Debug, Clone)]
39pub struct FileEntry {
40    pub file_path: String,
41    pub blob_id: String,
42    pub file_mode: String,
43}
44
45#[derive(Debug, Clone)]
46pub struct PullRequestRecord {
47    pub pull_request_id: String,
48    pub title: String,
49    pub description: String,
50    pub status: String, // "OPEN" | "CLOSED"
51    pub repository_name: String,
52    pub source_reference: String,
53    pub destination_reference: String,
54    pub source_commit: String,
55    pub destination_commit: String,
56    pub creation_date: DateTime<Utc>,
57    pub last_activity_date: DateTime<Utc>,
58    pub author_arn: String,
59}