pub struct Gitlab { /* private fields */ }
Expand description
Tiny GitLab SDK
Only implements the features we actually use
Implementations§
Source§impl Gitlab
impl Gitlab
pub fn new(url: &Url, token: &str) -> Self
Sourcepub fn list_variables(&self, target: &Target) -> FetchResult<Vec<Variable>>
pub fn list_variables(&self, target: &Target) -> FetchResult<Vec<Variable>>
List all CI/CD variables for a group or project
Sourcepub fn create_variable(
&self,
target: &Target,
variable: &Variable,
) -> FetchResult<Variable>
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
.
Sourcepub fn update_variable(
&self,
target: &Target,
variable: &Variable,
) -> FetchResult<Variable>
pub fn update_variable( &self, target: &Target, variable: &Variable, ) -> FetchResult<Variable>
Update a variable.
Sourcepub fn delete_variable(
&self,
target: &Target,
variable: &Variable,
) -> FetchResult<()>
pub fn delete_variable( &self, target: &Target, variable: &Variable, ) -> FetchResult<()>
Delete a variable
Trait Implementations§
Source§impl From<&CommonArgs> for Gitlab
impl From<&CommonArgs> for Gitlab
Source§fn from(args: &CommonArgs) -> Self
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> 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