From 460a463d15e76fe9e3e7ceac1c2afc6c0069a5d2 Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 10 Jul 2025 13:48:51 -0600 Subject: refactor: move gitlab types to a separate module --- src/authorization/entities.rs | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) (limited to 'src/authorization/entities.rs') diff --git a/src/authorization/entities.rs b/src/authorization/entities.rs index e47cf00f..b4f5a762 100644 --- a/src/authorization/entities.rs +++ b/src/authorization/entities.rs @@ -1,3 +1,4 @@ +use crate::gitlab::{Group, Member, Project}; use serde::Serialize; use std::collections::HashSet; @@ -23,43 +24,6 @@ pub struct CedarParent { pub id: String, } -// API structures -#[derive(Debug, serde::Deserialize)] -pub struct Project { - pub id: u64, - pub name: String, - pub path: String, - pub namespace: Namespace, -} - -#[derive(Debug, serde::Deserialize)] -pub struct Namespace { - pub id: u64, - pub name: String, - pub path: String, - pub kind: String, - pub full_path: String, - pub parent_id: Option, -} - -#[derive(Debug, serde::Deserialize)] -pub struct Member { - pub id: u64, - pub username: String, - pub name: String, - pub state: String, - pub access_level: u8, -} - -#[derive(Debug, serde::Deserialize)] -pub struct Group { - pub id: u64, - pub name: String, - pub path: String, - pub full_path: String, - pub parent_id: Option, -} - pub struct EntitiesRepository { pub token: String, pub host: String, -- cgit v1.2.3