pub struct Integration {Show 14 fields
pub id: String,
pub kind: IntegrationKind,
pub url: String,
pub token_ref: String,
pub name: String,
pub auth: AuthMethod,
pub account: String,
pub user: Option<ConnectedUser>,
pub ssh: Option<IntegrationSsh>,
pub enabled: bool,
pub local: Option<LocalMarkdownSettings>,
pub radar: Option<IntegrationRadar>,
pub markup: RedmineMarkup,
pub git_https: bool,
}Expand description
One configured profile. token_ref is a key into gitpoulpi-secrets,
never a token.
Fields§
§id: String§kind: IntegrationKind§url: String§token_ref: String§name: StringDisplay name; empty means “use the id”.
auth: AuthMethod§account: StringThe non-secret identity next to the token: the Atlassian email
(jira_cloud, bitbucket) or the Trello API key. Empty otherwise.
The token stays the only secret.
user: Option<ConnectedUser>§ssh: Option<IntegrationSsh>§enabled: bool§local: Option<LocalMarkdownSettings>The settings of a local_markdown profile; absent means the defaults.
radar: Option<IntegrationRadar>[integrations.radar]: the account-wide lists the Radar and
hosting radar fetch for this profile. Absent means all off.
markup: RedmineMarkupThe text format a Redmine server is configured with: what its comments are read as and what is written back. Other kinds ignore it.
git_https: bool“Use this account for git over HTTPS on its host”: every repository
whose https remote is on this profile’s host authenticates its git
transfers with this profile’s token, unless the repository has its own
repo-auth HTTPS setting. Off by default; see git_https_check.
Implementations§
Source§impl Integration
impl Integration
Sourcepub fn radar_options(&self) -> IntegrationRadar
pub fn radar_options(&self) -> IntegrationRadar
The profile’s [integrations.radar], or all-off defaults.
Sourcepub fn token_ref_for(id: &str) -> String
pub fn token_ref_for(id: &str) -> String
The canonical token_ref for an id.
pub fn new( id: impl Into<String>, kind: IntegrationKind, url: impl Into<String>, ) -> Self
Sourcepub fn new_id<'a>(
kind: IntegrationKind,
existing: impl IntoIterator<Item = &'a Integration>,
) -> String
pub fn new_id<'a>( kind: IntegrationKind, existing: impl IntoIterator<Item = &'a Integration>, ) -> String
A fresh id (gitlab, gitlab-2, …) not used by existing.
pub fn display_name(&self) -> &str
Sourcepub fn api_base(&self) -> String
pub fn api_base(&self) -> String
The API root, derived from url (never configured separately).
github.com uses https://api.github.com; GitHub Enterprise Server
uses <url>/api/v3; GitLab always <url>/api/v4. Other families
have no client yet and return the bare base URL.
Sourcepub fn api_base_v2(&self) -> Option<String>
pub fn api_base_v2(&self) -> Option<String>
Jira Cloud creates issues through /rest/api/2 (plain-text
description) while reading through /3; None for other kinds.
Sourcepub fn azure_org(&self) -> Option<String>
pub fn azure_org(&self) -> Option<String>
The Azure DevOps Services organization of a dev.azure.com/{org} or
{org}.visualstudio.com URL. None for other kinds, Server, or a
URL without an organization.
Sourcepub fn token_link_url(&self, web_base: &str) -> Option<String>
pub fn token_link_url(&self, web_base: &str) -> Option<String>
The page that mints this profile’s token, given the instance’s web
root (https://github.com, …). None when the kind has no flow or
Trello’s key is not typed yet.
Source§impl Integration
impl Integration
The https authority git remotes of this profile’s host carry, None
when the profile is not on an https:// address.