-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
append a documentation of the crate connection info (#83)
- Loading branch information
1 parent
f582bdd
commit f1f90cc
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
content/docs/50_platform/architecture/connection_info/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: "connection_info" | ||
description: "Crate to manage the file 'connection.json'" | ||
weight: 10 | ||
icon: "hub" | ||
--- | ||
|
||
This crate manage the interaction between the platform and the 'connection.json' file. | ||
|
||
It is composed of: | ||
|
||
- `mod`: Public interfaces of the crate | ||
- `info`: Holds the data structure | ||
- `error`: Special error manager for connection info | ||
- `file`: Manage the interaction with the file system | ||
- `serde`: Manage the JSON content of the file | ||
|
||
![](./schema.png) | ||
|
||
## mod | ||
|
||
This file is the public interface of the crate. | ||
|
||
It defines the main struct object: | ||
|
||
- Info | ||
|
||
And I/O function to import and export the info object from/to the file system: | ||
|
||
- system_file_path | ||
- import_file | ||
- export_file | ||
|
||
import_file function has its own result class, it allows the calling function to manage various situation we can deal with file import. | ||
|
||
- Error | ||
- ErrorType | ||
|
65 changes: 65 additions & 0 deletions
65
content/docs/50_platform/architecture/connection_info/schema.drawio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<mxfile host="65bd71144e"> | ||
<diagram id="Cu9hCcOp58Ck7JIqB6fb" name="Page-1"> | ||
<mxGraphModel dx="778" dy="978" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff" math="0" shadow="0"> | ||
<root> | ||
<mxCell id="0"/> | ||
<mxCell id="1" parent="0"/> | ||
<mxCell id="2" value="mod" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#006EAF;fillColor=#1ba1e2;fontSize=24;fontFamily=Lato;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLato;fontColor=#ffffff;" vertex="1" parent="1"> | ||
<mxGeometry x="300" y="270" width="120" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="3" value="file" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=none;fillColor=#1A1A1A;fontSize=24;fontFamily=Lato;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLato;fontColor=#FFFFFF;" vertex="1" parent="1"> | ||
<mxGeometry x="380" y="400" width="120" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="4" value="error" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#6F0000;fillColor=#a20025;fontSize=24;fontFamily=Lato;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLato;fontColor=#ffffff;" vertex="1" parent="1"> | ||
<mxGeometry x="220" y="400" width="120" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="5" value="info" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#2D7600;fillColor=#60a917;fontSize=24;fontFamily=Lato;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLato;fontColor=#ffffff;" vertex="1" parent="1"> | ||
<mxGeometry x="60" y="400" width="120" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="6" value="serde" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=none;fillColor=#1A1A1A;fontSize=24;fontFamily=Lato;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLato;fontColor=#FFFFFF;" vertex="1" parent="1"> | ||
<mxGeometry x="540" y="400" width="120" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="10" value="" style="endArrow=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#333333;rounded=1;strokeWidth=3;" edge="1" parent="1" source="5" target="2"> | ||
<mxGeometry width="50" height="50" relative="1" as="geometry"> | ||
<mxPoint x="340" y="520" as="sourcePoint"/> | ||
<mxPoint x="390" y="470" as="targetPoint"/> | ||
<Array as="points"> | ||
<mxPoint x="120" y="360"/> | ||
<mxPoint x="360" y="360"/> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="12" value="" style="endArrow=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#333333;rounded=1;strokeWidth=3;" edge="1" parent="1" source="4" target="2"> | ||
<mxGeometry width="50" height="50" relative="1" as="geometry"> | ||
<mxPoint x="270" y="620" as="sourcePoint"/> | ||
<mxPoint x="510" y="550" as="targetPoint"/> | ||
<Array as="points"> | ||
<mxPoint x="280" y="360"/> | ||
<mxPoint x="360" y="360"/> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="13" value="" style="endArrow=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#333333;rounded=1;strokeWidth=3;" edge="1" parent="1" source="3" target="2"> | ||
<mxGeometry width="50" height="50" relative="1" as="geometry"> | ||
<mxPoint x="290" y="410" as="sourcePoint"/> | ||
<mxPoint x="370" y="340" as="targetPoint"/> | ||
<Array as="points"> | ||
<mxPoint x="440" y="360"/> | ||
<mxPoint x="360" y="360"/> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="14" value="" style="endArrow=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#333333;rounded=1;strokeWidth=3;" edge="1" parent="1" source="6" target="2"> | ||
<mxGeometry width="50" height="50" relative="1" as="geometry"> | ||
<mxPoint x="450" y="410" as="sourcePoint"/> | ||
<mxPoint x="380" y="350" as="targetPoint"/> | ||
<Array as="points"> | ||
<mxPoint x="600" y="360"/> | ||
<mxPoint x="360" y="360"/> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.