pub struct Integration {Show 13 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,
}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.
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>, ) -> Integration
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.
Trait Implementations§
Source§impl Clone for Integration
impl Clone for Integration
Source§fn clone(&self) -> Integration
fn clone(&self) -> Integration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Integration
impl Debug for Integration
Source§impl<'de> Deserialize<'de> for Integration
impl<'de> Deserialize<'de> for Integration
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Integration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Integration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Integration
Source§impl PartialEq for Integration
impl PartialEq for Integration
Source§impl Serialize for Integration
impl Serialize for Integration
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Integration
Auto Trait Implementations§
impl Forget for Integration
impl Freeze for Integration
impl Move for Integration
impl RefUnwindSafe for Integration
impl Send for Integration
impl Sync for Integration
impl Unpin for Integration
impl UnsafeUnpin for Integration
impl UnwindSafe for Integration
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.