From 8ea9b6443fab2b878ae264974d409e507f91cb72 Mon Sep 17 00:00:00 2001
From: Thibault Dockx <thibault.dockx@fusiondirectory.org>
Date: Tue, 18 Feb 2025 16:03:27 +0000
Subject: [PATCH] :sparkles: orchestrator plugin

Dev Manual - orchetrator plugin
---
 .../development/index.rst                     |  8 +++
 .../development/orchDevPlugin.rst             | 71 +++++++++++++++++++
 source/fusiondirectory-orchestrator/index.rst |  1 +
 3 files changed, 80 insertions(+)
 create mode 100644 source/fusiondirectory-orchestrator/development/index.rst
 create mode 100644 source/fusiondirectory-orchestrator/development/orchDevPlugin.rst

diff --git a/source/fusiondirectory-orchestrator/development/index.rst b/source/fusiondirectory-orchestrator/development/index.rst
new file mode 100644
index 0000000..ef1fcf4
--- /dev/null
+++ b/source/fusiondirectory-orchestrator/development/index.rst
@@ -0,0 +1,8 @@
+========================
+Development Orchestrator
+========================
+
+.. toctree::
+   :maxdepth: 2
+
+   orchDevPlugin.rst
diff --git a/source/fusiondirectory-orchestrator/development/orchDevPlugin.rst b/source/fusiondirectory-orchestrator/development/orchDevPlugin.rst
new file mode 100644
index 0000000..72f793a
--- /dev/null
+++ b/source/fusiondirectory-orchestrator/development/orchDevPlugin.rst
@@ -0,0 +1,71 @@
+===================
+Orchestrator plugin
+===================
+
+This guide will help you get started with development within our GitLab environment.
+It covers account creation, issue creation, project forking, and submitting a Merge Request (MR).
+
+----------------------------
+1. Orchestrator contribution
+----------------------------
+
+Please follow how to create an account, fork a project, create an MR and creating issues from FusionDirectory development section.
+Exact same methodology will apply for your orchestrator plugin if you want it to be contributed within the main project.
+
+With that said, let's see how to create a plugin, a new orchestrator endpoints.
+
+
+------------------
+2. Class structure
+------------------
+
+**Your class must implements the interface "EndPointInterface"**
+
+In order to interact with many defined methods, including LDAP interaction, we received a "gateway" object.
+
+class anOrchestratorPluginClass implements EndpointInterface
+{
+
+  private TaskGateway $gateway;
+
+  public function __construct (TaskGateway $gateway)
+  {
+    $this->gateway = $gateway;
+  }
+
+  /**
+   * @return array
+   * Part of the interface of orchestrator plugin to treat GET method
+   */
+  public function processEndPointGet (): array
+  {
+  }
+
+  /**
+   * @param array|null $data
+   * @return array
+   */
+  public function processEndPointPost (array $data = NULL): array
+  {
+    return [];
+  }
+
+  /**
+   * @param array|NULL $data
+   * @return array
+   */
+  public function processEndPointDelete (array $data = NULL): array
+  {
+    return [];
+  }
+
+  /**
+   * @param array|NULL $data
+   * @return array
+   * @throws Exception
+   */
+  public function processEndPointPatch (array $data = NULL): array
+  {
+  }
+
+}
\ No newline at end of file
diff --git a/source/fusiondirectory-orchestrator/index.rst b/source/fusiondirectory-orchestrator/index.rst
index 4596c59..110fd9e 100644
--- a/source/fusiondirectory-orchestrator/index.rst
+++ b/source/fusiondirectory-orchestrator/index.rst
@@ -6,3 +6,4 @@ FusionDirectory Orchestrator
 
    whatis/orchestrator.rst
    requirements/mandatory.rst
+   development/index.rst
-- 
GitLab