rougail/docs/gettingstarted.rst

81 lines
2.2 KiB
ReStructuredText
Raw Normal View History

2023-12-17 20:25:53 +01:00
The variables
-----------------
2025-02-20 11:35:55 +01:00
Here is a :term:`structure file` example with only a variable **variable** named `proxy_mode`
2025-11-05 06:54:03 +01:00
A variable can be defined without other informations.
2024-10-15 09:20:01 +02:00
2025-11-05 06:54:03 +01:00
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_010/firefox/00-proxy.yml
2024-10-15 15:50:01 +02:00
:language: yaml
2025-11-05 06:54:03 +01:00
:caption: A Rougail structure file with a variable named `proxy_mode`, with a description.
:name: RougailStructureFirstVariable
2024-10-15 15:50:01 +02:00
2024-10-28 15:29:11 +01:00
..
2025-11-05 06:54:03 +01:00
%YAML 1.2
2024-10-28 15:29:11 +01:00
---
2025-11-05 06:54:03 +01:00
version: 1.1
2024-10-28 15:29:11 +01:00
proxy_mode:
2025-11-05 06:54:03 +01:00
...
But it's better to describe this variable:
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_011/firefox/00-proxy.yml
:language: yaml
:caption: A Rougail structure file with a variable named `proxy_mode`, with a description.
2025-11-05 09:38:36 +01:00
:name: RougailStructureFirstVariableWithDescription
2025-11-05 06:54:03 +01:00
..
%YAML 1.2
---
version: 1.1
proxy_mode: # Configure Proxy Access to the Internet
...
2024-10-15 15:50:01 +02:00
2024-10-28 15:29:11 +01:00
The same with a default value:
2024-10-15 15:50:01 +02:00
2024-10-28 15:29:11 +01:00
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_012/firefox/00-proxy.yml
2024-10-15 15:50:01 +02:00
:language: yaml
2025-11-05 06:54:03 +01:00
:caption: A Rougail structure file with a variable named `proxy_mode`, with a default value.
:name: RougailStructureFirstVariableDefault
2024-10-15 15:50:01 +02:00
2024-10-28 15:29:11 +01:00
..
2025-11-05 06:54:03 +01:00
%YAML 1.2
2024-10-28 15:29:11 +01:00
---
2025-11-05 06:54:03 +01:00
version: 1.1
proxy_mode: No proxy # Configure Proxy Access to the Internet
...
2024-10-28 15:29:11 +01:00
2023-12-17 20:25:53 +01:00
variable
2025-02-03 20:20:15 +01:00
A :term:`variable` is a declaration unit that represents a business domain metaphor,
2024-01-23 10:57:01 +01:00
the most common example is that a variable that represents a configuration option
2023-12-17 20:25:53 +01:00
in a application, but a variable represents something more that a configuration option.
It provides a business domain specific representation unit.
Families of variables
--------------------------
2025-02-03 20:20:15 +01:00
family
2024-01-23 10:57:01 +01:00
2025-02-20 11:35:55 +01:00
A :term:`family` is simply a container of variables and/ore some subfamilies.
2025-02-20 11:35:55 +01:00
Here how a YAML structure file with a family looks like:
2025-02-20 11:35:55 +01:00
.. code-block:: yaml
:caption: A :file:`hello.yml` structure sample file
2025-02-20 11:35:55 +01:00
---
version: '1.1'
world:
description: Hello world family container
name:
description: Somebody to say hello
default: rougail
Here, we have a family named `world`.
This family contains a variable named `name`