Struct Gitlab

Source
pub struct Gitlab<R> { /* private fields */ }

Implementations§

Source§

impl<R> Gitlab<R>

Source

pub fn new( config: Arc<dyn ConfigProperties>, domain: &str, path: &str, runner: Arc<R>, ) -> Self

Trait Implementations§

Source§

impl<R: HttpRunner<Response = HttpResponse>> Cicd for Gitlab<R>

Source§

fn list(&self, args: PipelineBodyArgs) -> Result<Vec<Pipeline>>

Source§

fn get_pipeline(&self, _id: i64) -> Result<Pipeline>

Source§

fn num_pages(&self) -> Result<Option<u32>>

Source§

fn num_resources(&self) -> Result<Option<NumberDeltaErr>>

Source§

fn lint(&self, body: YamlBytes<'_>) -> Result<LintResponse>

Lints ci/cd pipeline file contents. In gitlab this is the .gitlab-ci.yml file. Checks that the file is valid and has no syntax errors.
Source§

impl<R: HttpRunner<Response = HttpResponse>> CicdJob for Gitlab<R>

Source§

impl<R: HttpRunner<Response = HttpResponse>> CicdRunner for Gitlab<R>

Source§

fn create( &self, args: RunnerPostDataCliArgs, ) -> Result<RunnerRegistrationResponse>

Creates a new runner based in the authentication token workflow as opposed to the registration based workflow which gets deprecated in Gitlab > 16.0. The response includes an auth token that can be included in the runner’s configuration file. API doc https://docs.gitlab.com/ee/api/users.html#create-a-runner-linked-to-a-user

Source§

fn list(&self, args: RunnerListBodyArgs) -> Result<Vec<Runner>>

Source§

fn get(&self, id: i64) -> Result<RunnerMetadata>

Source§

fn num_pages(&self, args: RunnerListBodyArgs) -> Result<Option<u32>>

Source§

fn num_resources( &self, args: RunnerListBodyArgs, ) -> Result<Option<NumberDeltaErr>>

Source§

impl<R: Clone> Clone for Gitlab<R>

Source§

fn clone(&self) -> Gitlab<R>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R: HttpRunner<Response = HttpResponse>> CodeGist for Gitlab<R>

Source§

impl<R: HttpRunner<Response = HttpResponse>> CommentMergeRequest for Gitlab<R>

Source§

impl<R: HttpRunner<Response = HttpResponse>> ContainerRegistry for Gitlab<R>

Source§

impl<R: HttpRunner<Response = HttpResponse>> Deploy for Gitlab<R>

Source§

impl<R: HttpRunner<Response = HttpResponse>> DeployAsset for Gitlab<R>

Source§

impl<R: HttpRunner<Response = HttpResponse>> MergeRequest for Gitlab<R>

Source§

fn open(&self, args: MergeRequestBodyArgs) -> Result<MergeRequestResponse>

Source§

fn list( &self, args: MergeRequestListBodyArgs, ) -> Result<Vec<MergeRequestResponse>>

Source§

fn merge(&self, id: i64) -> Result<MergeRequestResponse>

Source§

fn get(&self, id: i64) -> Result<MergeRequestResponse>

Source§

fn close(&self, id: i64) -> Result<MergeRequestResponse>

Source§

fn num_pages(&self, args: MergeRequestListBodyArgs) -> Result<Option<u32>>

Queries the remote API to get the number of pages available for a given resource based on list arguments.
Source§

fn num_resources( &self, args: MergeRequestListBodyArgs, ) -> Result<Option<NumberDeltaErr>>

Source§

fn approve(&self, id: i64) -> Result<MergeRequestResponse>

Source§

impl<R: HttpRunner<Response = HttpResponse>> ProjectMember for Gitlab<R>

Source§

impl<R: HttpRunner<Response = HttpResponse>> RemoteProject for Gitlab<R>

Source§

fn get_project_data( &self, id: Option<i64>, path: Option<&str>, ) -> Result<CmdInfo>

Get the project data from the remote API. Implementers will need to pass either an id or a path. The path should be in the format OWNER/PROJECT_NAME
Source§

fn get_project_members(&self) -> Result<CmdInfo>

Source§

fn get_url(&self, option: BrowseOptions) -> String

User requests to open a browser using the remote url. It can open the merge/pull requests, pipeline, issues, etc.
Source§

fn list(&self, args: ProjectListBodyArgs) -> Result<Vec<Project>>

Source§

fn num_pages(&self, args: ProjectListBodyArgs) -> Result<Option<u32>>

Source§

fn num_resources( &self, args: ProjectListBodyArgs, ) -> Result<Option<NumberDeltaErr>>

Source§

impl<R: HttpRunner<Response = HttpResponse>> RemoteTag for Gitlab<R>

Source§

impl<R: HttpRunner<Response = HttpResponse>> TrendingProjectURL for Gitlab<R>

Source§

fn list(&self, _language: String) -> Result<Vec<TrendingProject>>

Source§

impl<R: HttpRunner<Response = HttpResponse>> UserInfo for Gitlab<R>

Source§

fn get_auth_user(&self) -> Result<Member>

Get the user’s information from the remote API.
Source§

fn get(&self, args: &UserCliArgs) -> Result<Member>

Auto Trait Implementations§

§

impl<R> Freeze for Gitlab<R>

§

impl<R> RefUnwindSafe for Gitlab<R>
where R: RefUnwindSafe,

§

impl<R> Send for Gitlab<R>
where R: Sync + Send,

§

impl<R> Sync for Gitlab<R>
where R: Sync + Send,

§

impl<R> Unpin for Gitlab<R>

§

impl<R> UnwindSafe for Gitlab<R>
where R: RefUnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V