pub struct GitConnectorConfig {
pub url: String,
pub branch: String,
pub root: String,
pub include_globs: Vec<String>,
pub exclude_globs: Vec<String>,
pub shallow: bool,
pub cache_dir: Option<PathBuf>,
}Expand description
Git connector configuration.
Clones (or pulls) a Git repository and scans files within a configurable
subdirectory. Extracts per-file metadata from git log.
See crate::connector_git for the full implementation.
§Example
[connectors.git.platform]
url = "https://github.com/acme/platform.git"
branch = "main"
root = "docs/"
include_globs = ["**/*.md"]
shallow = trueFields§
§url: StringGit repository URL (https://, git@, or local path).
branch: StringBranch to clone/pull. Default: "main".
root: StringSubdirectory within the repo to scan. Default: "." (entire repo).
include_globs: Vec<String>Glob patterns for files to include. Default: ["**/*.md", "**/*.txt"].
exclude_globs: Vec<String>Glob patterns for files to exclude. Default: [].
shallow: boolUse shallow clone (--depth 1) to save disk space. Default: true.
cache_dir: Option<PathBuf>Directory to cache cloned repos. Default: <db-dir>/.git-cache/<url-hash>/.
Trait Implementations§
Source§impl Clone for GitConnectorConfig
impl Clone for GitConnectorConfig
Source§fn clone(&self) -> GitConnectorConfig
fn clone(&self) -> GitConnectorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GitConnectorConfig
impl Debug for GitConnectorConfig
Source§impl<'de> Deserialize<'de> for GitConnectorConfig
impl<'de> Deserialize<'de> for GitConnectorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GitConnectorConfig
impl RefUnwindSafe for GitConnectorConfig
impl Send for GitConnectorConfig
impl Sync for GitConnectorConfig
impl Unpin for GitConnectorConfig
impl UnwindSafe for GitConnectorConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more