pub struct CodeCommitState {
pub repositories: HashMap<String, Repository>,
pub branches: HashMap<String, HashMap<String, Branch>>,
pub commits: HashMap<String, HashMap<String, CommitRecord>>,
pub files: HashMap<String, HashMap<String, HashMap<String, FileEntry>>>,
pub pull_requests: HashMap<String, PullRequestRecord>,
pub pull_request_counter: u64,
}Fields§
§repositories: HashMap<String, Repository>§branches: HashMap<String, HashMap<String, Branch>>branches keyed by repo_name -> branch_name -> Branch
commits: HashMap<String, HashMap<String, CommitRecord>>commits keyed by repo_name -> commit_id -> CommitRecord
files: HashMap<String, HashMap<String, HashMap<String, FileEntry>>>files keyed by repo_name -> commit_id -> file_path -> FileEntry
pull_requests: HashMap<String, PullRequestRecord>pull requests keyed by pull_request_id
pull_request_counter: u64next pull request number per repo
Implementations§
Source§impl CodeCommitState
impl CodeCommitState
pub fn create_repository( &mut self, name: &str, description: &str, account_id: &str, region: &str, ) -> Result<&Repository, CodeCommitError>
pub fn get_repository(&self, name: &str) -> Result<&Repository, CodeCommitError>
pub fn delete_repository(&mut self, name: &str) -> String
pub fn list_repositories(&self) -> Vec<&Repository>
pub fn update_repository_description( &mut self, name: &str, description: Option<&str>, ) -> Result<(), CodeCommitError>
pub fn update_repository_name( &mut self, old_name: &str, new_name: &str, region: &str, account_id: &str, ) -> Result<(), CodeCommitError>
pub fn create_branch( &mut self, repo_name: &str, branch_name: &str, commit_id: &str, ) -> Result<(), CodeCommitError>
pub fn get_branch( &self, repo_name: &str, branch_name: &str, ) -> Result<&Branch, CodeCommitError>
pub fn list_branches( &self, repo_name: &str, ) -> Result<Vec<String>, CodeCommitError>
pub fn delete_branch( &mut self, repo_name: &str, branch_name: &str, ) -> Result<Branch, CodeCommitError>
pub fn update_default_branch( &mut self, repo_name: &str, branch_name: &str, ) -> Result<(), CodeCommitError>
pub fn create_commit( &mut self, repo_name: &str, branch_name: &str, parent_commit_id: Option<&str>, author_name: Option<&str>, author_email: Option<&str>, commit_message: Option<&str>, put_files: Vec<(String, String)>, delete_files: Vec<String>, ) -> Result<CommitRecord, CodeCommitError>
pub fn get_commit( &self, repo_name: &str, commit_id: &str, ) -> Result<&CommitRecord, CodeCommitError>
pub fn get_file( &self, repo_name: &str, commit_specifier: Option<&str>, file_path: &str, ) -> Result<(&CommitRecord, &FileEntry), CodeCommitError>
pub fn get_folder( &self, repo_name: &str, commit_specifier: Option<&str>, folder_path: &str, ) -> Result<(String, Vec<FileEntry>, Vec<String>), CodeCommitError>
pub fn put_file( &mut self, repo_name: &str, branch_name: &str, parent_commit_id: &str, file_path: &str, file_mode: Option<&str>, author_name: Option<&str>, author_email: Option<&str>, commit_message: Option<&str>, ) -> Result<CommitRecord, CodeCommitError>
pub fn delete_file( &mut self, repo_name: &str, branch_name: &str, parent_commit_id: &str, file_path: &str, author_name: Option<&str>, author_email: Option<&str>, commit_message: Option<&str>, ) -> Result<CommitRecord, CodeCommitError>
pub fn get_differences( &self, repo_name: &str, after_commit_specifier: &str, before_commit_specifier: Option<&str>, ) -> Result<Vec<(Option<FileEntry>, Option<FileEntry>, String)>, CodeCommitError>
pub fn create_pull_request( &mut self, title: &str, description: &str, repo_name: &str, source_reference: &str, destination_reference: &str, ) -> Result<PullRequestRecord, CodeCommitError>
pub fn get_pull_request( &self, pr_id: &str, ) -> Result<&PullRequestRecord, CodeCommitError>
pub fn list_pull_requests( &self, repo_name: &str, status: Option<&str>, ) -> Vec<String>
pub fn update_pull_request_status( &mut self, pr_id: &str, status: &str, ) -> Result<PullRequestRecord, CodeCommitError>
pub fn tag_resource( &mut self, repo_name: &str, tags: HashMap<String, String>, ) -> Result<(), CodeCommitError>
pub fn untag_resource( &mut self, repo_name: &str, tag_keys: &[String], ) -> Result<(), CodeCommitError>
Trait Implementations§
Source§impl Debug for CodeCommitState
impl Debug for CodeCommitState
Source§impl Default for CodeCommitState
impl Default for CodeCommitState
Source§fn default() -> CodeCommitState
fn default() -> CodeCommitState
Returns the “default value” for a type. Read more
Source§impl From<&CodeCommitState> for CodeCommitStateView
impl From<&CodeCommitState> for CodeCommitStateView
Source§fn from(state: &CodeCommitState) -> Self
fn from(state: &CodeCommitState) -> Self
Converts to this type from the input type.
Source§impl From<CodeCommitStateView> for CodeCommitState
impl From<CodeCommitStateView> for CodeCommitState
Source§fn from(view: CodeCommitStateView) -> Self
fn from(view: CodeCommitStateView) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CodeCommitState
impl RefUnwindSafe for CodeCommitState
impl Send for CodeCommitState
impl Sync for CodeCommitState
impl Unpin for CodeCommitState
impl UnsafeUnpin for CodeCommitState
impl UnwindSafe for CodeCommitState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.