mirror of
https://github.com/lldap/lldap.git
synced 2026-07-25 17:58:44 +00:00
domain: rename AttributeValue to Attribute
Preparation for storing the actual types for each value, which will repurpose the AttributeValue name.
This commit is contained in:
committed by
nitnelave
parent
4c6cfeee9e
commit
8285e21ebb
@@ -1,8 +1,6 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::types::{
|
||||
AttributeName, AttributeType, AttributeValue, Email, GroupId, GroupName, UserId,
|
||||
};
|
||||
use crate::types::{Attribute, AttributeName, AttributeType, Email, GroupId, GroupName, UserId};
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone, Default)]
|
||||
pub struct CreateUserRequest {
|
||||
@@ -10,7 +8,7 @@ pub struct CreateUserRequest {
|
||||
pub user_id: UserId,
|
||||
pub email: Email,
|
||||
pub display_name: Option<String>,
|
||||
pub attributes: Vec<AttributeValue>,
|
||||
pub attributes: Vec<Attribute>,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone, Default)]
|
||||
@@ -20,13 +18,13 @@ pub struct UpdateUserRequest {
|
||||
pub email: Option<Email>,
|
||||
pub display_name: Option<String>,
|
||||
pub delete_attributes: Vec<AttributeName>,
|
||||
pub insert_attributes: Vec<AttributeValue>,
|
||||
pub insert_attributes: Vec<Attribute>,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone, Default)]
|
||||
pub struct CreateGroupRequest {
|
||||
pub display_name: GroupName,
|
||||
pub attributes: Vec<AttributeValue>,
|
||||
pub attributes: Vec<Attribute>,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
|
||||
@@ -34,7 +32,7 @@ pub struct UpdateGroupRequest {
|
||||
pub group_id: GroupId,
|
||||
pub display_name: Option<GroupName>,
|
||||
pub delete_attributes: Vec<AttributeName>,
|
||||
pub insert_attributes: Vec<AttributeValue>,
|
||||
pub insert_attributes: Vec<Attribute>,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
|
||||
|
||||
@@ -408,7 +408,7 @@ impl IntoActiveValue<Serialized> for JpegPhoto {
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize, Hash)]
|
||||
pub struct AttributeValue {
|
||||
pub struct Attribute {
|
||||
pub name: AttributeName,
|
||||
pub value: Serialized,
|
||||
}
|
||||
@@ -420,7 +420,7 @@ pub struct User {
|
||||
pub display_name: Option<String>,
|
||||
pub creation_date: NaiveDateTime,
|
||||
pub uuid: Uuid,
|
||||
pub attributes: Vec<AttributeValue>,
|
||||
pub attributes: Vec<Attribute>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "test")]
|
||||
@@ -528,7 +528,7 @@ pub struct Group {
|
||||
pub creation_date: NaiveDateTime,
|
||||
pub uuid: Uuid,
|
||||
pub users: Vec<UserId>,
|
||||
pub attributes: Vec<AttributeValue>,
|
||||
pub attributes: Vec<Attribute>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
@@ -537,7 +537,7 @@ pub struct GroupDetails {
|
||||
pub display_name: GroupName,
|
||||
pub creation_date: NaiveDateTime,
|
||||
pub uuid: Uuid,
|
||||
pub attributes: Vec<AttributeValue>,
|
||||
pub attributes: Vec<Attribute>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
||||
Reference in New Issue
Block a user