assets_guardian.plugins.gitlab.repositoryο
Classes
|
Repository to access raw data from the GitLab API. |
- class assets_guardian.plugins.gitlab.repository.GitlabRepository(client: HttpClient)[source]ο
Bases:
objectRepository to access raw data from the GitLab API.
Uses HttpClient to perform requests to the API v4.
Initializes the repository with an HTTP client.
- Parameters:
client β HttpClient instance configured for the GitLab API.
- get_accesses_for_user(user_id: int | str) list[dict[str, Any]][source]ο
Retrieves memberships of a user to projects and groups.
- Parameters:
user_id β GitLab user identifier.
- Returns:
List of memberships with a βpidβ field added to match the collectorβs expectations.
- get_raw_groups() list[dict[str, Any]][source]ο
Retrieves all accessible GitLab groups.
- Returns:
List of raw dictionaries representing groups.
- get_raw_projects() list[dict[str, Any]][source]ο
Retrieves all accessible GitLab projects.
- Returns:
List of raw dictionaries representing projects.