Trait centraldogma::ContentService[][src]

pub trait ContentService {
    #[must_use]
    fn list_files<'life0, 'life1, 'async_trait>(
        &'life0 self,
        revision: Revision,
        path_pattern: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ListEntry>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_file<'life0, 'life1, 'async_trait>(
        &'life0 self,
        revision: Revision,
        query: &'life1 Query
    ) -> Pin<Box<dyn Future<Output = Result<Entry, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_files<'life0, 'life1, 'async_trait>(
        &'life0 self,
        revision: Revision,
        path_pattern: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Entry>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_history<'life0, 'life1, 'async_trait>(
        &'life0 self,
        from_rev: Revision,
        to_rev: Revision,
        path: &'life1 str,
        max_commits: Option<u32>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Commit>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_diff<'life0, 'life1, 'async_trait>(
        &'life0 self,
        from_rev: Revision,
        to_rev: Revision,
        query: &'life1 Query
    ) -> Pin<Box<dyn Future<Output = Result<Change, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_diffs<'life0, 'life1, 'async_trait>(
        &'life0 self,
        from_rev: Revision,
        to_rev: Revision,
        path_pattern: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Change>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn push<'life0, 'async_trait>(
        &'life0 self,
        base_revision: Revision,
        cm: CommitMessage,
        changes: Vec<Change>
    ) -> Pin<Box<dyn Future<Output = Result<PushResult, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Content-related APIs

Required methods

Retrieves the list of the files at the specified Revision matched by the path pattern.

A path pattern is a variant of glob:

  • "/**" - find all files recursively
  • "*.json" - find all JSON files recursively
  • "/foo/*.json" - find all JSON files under the directory /foo
  • "/*/foo.txt" - find all files named foo.txt at the second depth level
  • "*.json,/bar/*.txt" - use comma to specify more than one pattern. A file will be matched if any pattern matches.

Queries a file at the specified Revision and path with the specified Query.

Retrieves the files at the specified Revision matched by the path pattern.

A path pattern is a variant of glob:

  • "/**" - find all files recursively
  • "*.json" - find all JSON files recursively
  • "/foo/*.json" - find all JSON files under the directory /foo
  • "/*/foo.txt" - find all files named foo.txt at the second depth level
  • "*.json,/bar/*.txt" - use comma to specify more than one pattern. A file will be matched if any pattern matches.

Retrieves the history of the repository of the files matched by the given path pattern between two Revisions. Note that this method does not retrieve the diffs but only metadata about the changes. Use get_diff or get_diffs to retrieve the diffs

Returns the diff of a file between two Revisions.

Retrieves the diffs of the files matched by the given path pattern between two Revisions.

A path pattern is a variant of glob:

  • "/**" - find all files recursively
  • "*.json" - find all JSON files recursively
  • "/foo/*.json" - find all JSON files under the directory /foo
  • "/*/foo.txt" - find all files named foo.txt at the second depth level
  • "*.json,/bar/*.txt" - use comma to specify more than one pattern. A file will be matched if any pattern matches.

Pushes the specified Changes to the repository.

Implementors