[PR #1086] [MERGED] server: move domain::types to separate domain crate #1110

Closed
opened 2026-02-27 09:10:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/lldap/lldap/pull/1086
Author: @broeng
Created: 1/24/2025
Status: Merged
Merged: 2/3/2025
Merged by: @nitnelave

Base: mainHead: domain-module


📝 Commits (6)

  • ae10019 server: move domain::types to separate domain crate
  • 43fcd87 server: move request types to domain crate
  • 9d7ee1d server: move some schema related structs to domain crate
  • 7eef7aa server: reorganize and collapse import groups
  • fe4ebb3 server: remove some unnecessary dependencies
  • bbe8aa2 domain: add authors field to Cargo.toml

📊 Changes

47 files changed (+365 additions, -243 deletions)

View changed files

📝 Cargo.lock (+21 -2)
📝 Cargo.toml (+6 -5)
crates/domain/Cargo.toml (+59 -0)
crates/domain/src/lib.rs (+3 -0)
crates/domain/src/requests.rs (+53 -0)
crates/domain/src/schema.rs (+39 -0)
📝 crates/domain/src/types.rs (+4 -5)
📝 server/Cargo.toml (+12 -11)
📝 server/src/domain/deserialize.rs (+1 -1)
📝 server/src/domain/handler.rs (+11 -90)
📝 server/src/domain/ldap/group.rs (+3 -1)
📝 server/src/domain/ldap/user.rs (+4 -4)
📝 server/src/domain/ldap/utils.rs (+4 -3)
📝 server/src/domain/mod.rs (+0 -1)
📝 server/src/domain/model/group_attribute_schema.rs (+2 -2)
📝 server/src/domain/model/group_attributes.rs (+1 -1)
📝 server/src/domain/model/group_object_classes.rs (+1 -1)
📝 server/src/domain/model/groups.rs (+3 -3)
📝 server/src/domain/model/jwt_refresh_storage.rs (+1 -1)
📝 server/src/domain/model/jwt_storage.rs (+1 -1)

...and 27 more files

📄 Description

Preparation for using basic type definitions in other upcoming modules, in particular for plugins. By moving these fundamental domain types to a separate module, it is possible to reuse them in other modules, that the primary server module will need to depend on.

Specific use case in mind is the plugin functionality, where it would be very convenient to be able to share the same domain types with the backend API offered to plugins, so they get the same types for Users, Groups, Attributes, etc., as everything else, thus avoiding a need for duplicate types and constant conversion from and to.

Took the liberty to create a modules folder for these. I think the root of the project is starting to get a bit cluttered, and with plugins, for instance, it can easily get a bit complicated to find where actual bundled plugins are located, the plugin implementation, etc.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/lldap/lldap/pull/1086 **Author:** [@broeng](https://github.com/broeng) **Created:** 1/24/2025 **Status:** ✅ Merged **Merged:** 2/3/2025 **Merged by:** [@nitnelave](https://github.com/nitnelave) **Base:** `main` ← **Head:** `domain-module` --- ### 📝 Commits (6) - [`ae10019`](https://github.com/lldap/lldap/commit/ae1001929ce86d699a5e34d0b883e416f4d495f3) server: move domain::types to separate domain crate - [`43fcd87`](https://github.com/lldap/lldap/commit/43fcd87893cefeef44cd324c4fed0b07a9b5b667) server: move request types to domain crate - [`9d7ee1d`](https://github.com/lldap/lldap/commit/9d7ee1da5a49d818ffe3395a8a216b7d0c5b632c) server: move some schema related structs to domain crate - [`7eef7aa`](https://github.com/lldap/lldap/commit/7eef7aac2094891cbfd90132d19ed2b1296cdd2d) server: reorganize and collapse import groups - [`fe4ebb3`](https://github.com/lldap/lldap/commit/fe4ebb3660971e704da011d228ca485329c6ac8e) server: remove some unnecessary dependencies - [`bbe8aa2`](https://github.com/lldap/lldap/commit/bbe8aa2b854397f101e637a4238abe4a4c338867) domain: add authors field to Cargo.toml ### 📊 Changes **47 files changed** (+365 additions, -243 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+21 -2) 📝 `Cargo.toml` (+6 -5) ➕ `crates/domain/Cargo.toml` (+59 -0) ➕ `crates/domain/src/lib.rs` (+3 -0) ➕ `crates/domain/src/requests.rs` (+53 -0) ➕ `crates/domain/src/schema.rs` (+39 -0) 📝 `crates/domain/src/types.rs` (+4 -5) 📝 `server/Cargo.toml` (+12 -11) 📝 `server/src/domain/deserialize.rs` (+1 -1) 📝 `server/src/domain/handler.rs` (+11 -90) 📝 `server/src/domain/ldap/group.rs` (+3 -1) 📝 `server/src/domain/ldap/user.rs` (+4 -4) 📝 `server/src/domain/ldap/utils.rs` (+4 -3) 📝 `server/src/domain/mod.rs` (+0 -1) 📝 `server/src/domain/model/group_attribute_schema.rs` (+2 -2) 📝 `server/src/domain/model/group_attributes.rs` (+1 -1) 📝 `server/src/domain/model/group_object_classes.rs` (+1 -1) 📝 `server/src/domain/model/groups.rs` (+3 -3) 📝 `server/src/domain/model/jwt_refresh_storage.rs` (+1 -1) 📝 `server/src/domain/model/jwt_storage.rs` (+1 -1) _...and 27 more files_ </details> ### 📄 Description Preparation for using basic type definitions in other upcoming modules, in particular for plugins. By moving these fundamental domain types to a separate module, it is possible to reuse them in other modules, that the primary server module will need to depend on. Specific use case in mind is the plugin functionality, where it would be very convenient to be able to share the same domain types with the backend API offered to plugins, so they get the same types for Users, Groups, Attributes, etc., as everything else, thus avoiding a need for duplicate types and constant conversion from and to. Took the liberty to create a modules folder for these. I think the root of the project is starting to get a bit cluttered, and with plugins, for instance, it can easily get a bit complicated to find where actual bundled plugins are located, the plugin implementation, etc. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 09:10:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#1110
No description provided.