Struct Gitlab

Source
pub struct Gitlab { /* private fields */ }
Expand description

Tiny GitLab SDK

Only implements the features we actually use

Implementations§

Source§

impl Gitlab

Source

pub fn new(url: &Url, token: &str) -> Self

Source

pub fn list_variables(&self, target: &Target) -> FetchResult<Vec<Variable>>

List all CI/CD variables for a group or project

Source

pub fn create_variable( &self, target: &Target, variable: &Variable, ) -> FetchResult<Variable>

Create a new variable.

If a variable with the same key already exists, the new variable must have a different environment_scope. Otherwise, GitLab returns a message similar to: VARIABLE_NAME has already been taken.

Source

pub fn update_variable( &self, target: &Target, variable: &Variable, ) -> FetchResult<Variable>

Update a variable.

Source

pub fn delete_variable( &self, target: &Target, variable: &Variable, ) -> FetchResult<()>

Delete a variable

Trait Implementations§

Source§

impl From<&CommonArgs> for Gitlab

Source§

fn from(args: &CommonArgs) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Gitlab

§

impl !RefUnwindSafe for Gitlab

§

impl Send for Gitlab

§

impl Sync for Gitlab

§

impl Unpin for Gitlab

§

impl !UnwindSafe for Gitlab

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,