cartulary 0.3.0-alpha.1

The knowledge layer of your project — decisions, issues, docs, all in one place.
Documentation
use std::collections::BTreeMap;

/// Configuration for a named external source.
///
/// Parsed from `[sources.<name>]` in `cartulary.toml`:
/// ```toml
/// [sources.mygitlab]
/// type = "gitlab"
/// url = "https://gitlab.com"
/// project = "group/project"
/// token_env = "GITLAB_TOKEN"
///
/// [sources.mygitlab.status_map]
/// opened = "in-progress"
/// closed = "done"
/// ```
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SourceConfig {
    /// User-chosen name for this source (e.g. `"mygitlab"`).
    pub name: String,
    /// Source type — currently only `"gitlab"` is supported.
    pub source_type: String,
    /// Base URL of the external system (e.g. `"https://gitlab.com"`).
    pub url: String,
    /// Project identifier in the external system (e.g. `"group/project"`).
    pub project: String,
    /// Name of the environment variable holding the auth token.
    pub token_env: String,
    /// Optional mapping from external state names to cartulary status names.
    ///
    /// For GitLab, keys are `"opened"` and `"closed"`. When empty, the
    /// adapter uses its built-in default mapping.
    pub status_map: BTreeMap<String, String>,
}