custom types 81
This commit is contained in:
parent
00d17badf8
commit
2608958574
1 changed files with 17 additions and 2 deletions
|
|
@ -235,12 +235,27 @@ With this use of a type, it is possible to define our HTTPS and SOCKS Proxy in a
|
||||||
default: v5
|
default: v5
|
||||||
...
|
...
|
||||||
|
|
||||||
|
In the `socks_proxy` family definition, we can see that we have added a new variable,
|
||||||
|
the `version` variable:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
version:
|
||||||
|
description: SOCKS host version used by proxy
|
||||||
|
choices:
|
||||||
|
- v4
|
||||||
|
- v5
|
||||||
|
default: v5
|
||||||
|
|
||||||
|
You can see that the type definition here is flexible : it is perfectly possible
|
||||||
|
to add to what has been defined in the type.
|
||||||
|
The type definition is therefore not only a template but much more an extensible schema.
|
||||||
|
|
||||||
.. keypoints:: Key points
|
.. keypoints:: Key points
|
||||||
|
|
||||||
- type declaration
|
- the very practical aspects of type declaration
|
||||||
- type usage
|
- type usage
|
||||||
- more conscious family definition
|
- more conscious family definition
|
||||||
- the very practical aspects of type declaration
|
- using a type for an extended family definition
|
||||||
|
|
||||||
We have seen how the definition of type, used effectively, allows for a new expressiveness.
|
We have seen how the definition of type, used effectively, allows for a new expressiveness.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue