]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move pairs to its own directory
authorAlan T. DeKok <aland@freeradius.org>
Thu, 15 May 2025 10:15:46 +0000 (06:15 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 15 May 2025 10:15:46 +0000 (06:15 -0400)
doc/antora/modules/reference/nav.adoc
doc/antora/modules/reference/pages/xlat/all.adoc
doc/antora/modules/reference/pages/xlat/dict.adoc
doc/antora/modules/reference/pages/xlat/misc/index.adoc
doc/antora/modules/reference/pages/xlat/pairs/index.adoc [new file with mode: 0644]
doc/antora/modules/reference/pages/xlat/pairs/print.adoc [moved from doc/antora/modules/reference/pages/xlat/misc/pairs.adoc with 83% similarity]

index f524e794cacc3d7a63ea06980ebbf0b2b2e26162..41c8dd5556785f7e2decc72ce9df50434dd9fea0 100644 (file)
 **** xref:xlat/misc/config.adoc[Server Configuration]
 **** xref:xlat/misc/length.adoc[length]
 **** xref:xlat/misc/misc.adoc[Miscellaneous]
-**** xref:xlat/misc/pairs.adoc[pairs.print]
 **** xref:xlat/misc/rand.adoc[rand]
 
+*** xref:xlat/pairs/index.adoc[Pairs]
+**** xref:xlat/pairs/debug.adoc[Write to debug output]
+**** xref:xlat/pairs/immutable.adoc[Mark as immutable]
+**** xref:xlat/pairs/print.adoc[Print to string]
+
 *** xref:xlat/str/index.adoc[String Handling]
 **** xref:xlat/str/concat.adoc[Concatenation]
 **** xref:xlat/str/split.adoc[Split Strings]
index f8f9d4b14a2a831a40a2a7d87fa4e5fc72fcf4d8..f0c5d155e0ac7b9c37e5dc7d1fd7a35db59adf3d 100644 (file)
 | xref:xlat/misc/config.adoc[Server Configuration]  | Examine configuration items
 | xref:xlat/misc/length.adoc[length]               | Get the length of data
 | xref:xlat/misc/misc.adoc[Miscellaneous]          | Functions to execute regular expression search on string, using pattern.
-| xref:xlat/misc/pairs.adoc[pairs.print]           | print attributes with name and value.
 | xref:xlat/misc/rand.adoc[rand]                   | random integers
 |===
 
+== Pair Manipulation
+
+.Pair Manipulation
+[options="headers, autowidth]
+|===
+| *Function*                                   | *Description*
+| xref:xlat/pairs/debug.adoc[debug]            | Print attributes to the debug output
+| xref:xlat/pairs/immutable.adoc[immutable]     | Mark attributes as immutable (cannot be changed)
+| xref:xlat/pairs/print.adoc[print]            | Print attribute name and value to string
+|===
+
 == String Manipulation
 
 .String manipulation
index dad1ef652d4b172b3a9157ba3fd36a1fe35b1625..6d01d6e42a436103387889a26b97567b62db6d5c 100644 (file)
@@ -114,45 +114,6 @@ reply.Reply-Message := "Maximum should be %str.rpad(%{control.Tmp-String-0}, 11,
 Maximum should be 12300000000
 ```
 
-== %pairs(<list>.[*])
-
-Serialize attributes as comma-delimited string.
-
-.Return: _string_
-
-.Example
-
-[source,unlang]
-----
-control.Tmp-String-0 := { "This is a string", "This is another one" }
-reply.Reply-Message := "Serialize output: %pairs(control.[*])"
-----
-
-.Output
-
-```
-Serialize output: Tmp-String-0 = "\"This is a string\", Tmp-String-0 = \"This is another one\""
-```
-
-== %str.rand( ...)
-
-Get random string built from character classes.
-
-.Return: _string_
-
-.Example
-
-[source,unlang]
-----
-reply.Reply-Message := "The random string output is %str.rand(aaaaaaaa}"
-----
-
-.Output
-
-```
-The random string output is 4Uq0gPyG
-```
-
 == %str.lower( ... )
 
 Dynamically expands the string and returns the lowercase version of
index c0cc5b849ed8fdb89b7eac6a1f46f1fd1dd3a66c..3502fc3fc97cdf1d3ca63d9adbcc6305960806a5 100644 (file)
@@ -11,7 +11,6 @@ which operate on inputs, and produce an output.
 | xref:xlat/misc/config.adoc[Server Configuration]  | Examine configuration items
 | xref:xlat/misc/length.adoc[length]               | Get the length of data
 | xref:xlat/misc/misc.adoc[Miscellaneous]          | Functions to execute regular expression search on string, using pattern.
-| xref:xlat/misc/pairs.adoc[pairs.print]           | print attributes with name and value.
 | xref:xlat/misc/rand.adoc[rand]                   | random integers
 |===
 
diff --git a/doc/antora/modules/reference/pages/xlat/pairs/index.adoc b/doc/antora/modules/reference/pages/xlat/pairs/index.adoc
new file mode 100644 (file)
index 0000000..959c4ae
--- /dev/null
@@ -0,0 +1,15 @@
+= Pair Functions
+
+These functions manipulate attribute-value pairs.
+
+.Pair Manipulation
+[options="headers, autowidth]
+|===
+| *Function*                                   | *Description*
+| xref:xlat/pairs/debug.adoc[debug]            | Print attributes to the debug output
+| xref:xlat/pairs/immutable.adoc[immutable]     | Mark attributes as immutable (cannot be changed)
+| xref:xlat/pairs/print.adoc[print]            | Print attribute name and value to string
+|===
+
+// Copyright (C) 2025 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
+// This documentation was developed by Network RADIUS SAS.
similarity index 83%
rename from doc/antora/modules/reference/pages/xlat/misc/pairs.adoc
rename to doc/antora/modules/reference/pages/xlat/pairs/print.adoc
index 296c0c2ab141bc8886b982da03691f565e88e4c1..8339f2d85ed9592dca2a7915cd6119e64ec84d04 100644 (file)
@@ -7,14 +7,14 @@ Print attributes with name and value.
 Note that there is no "parse string into pairs" function.  Instead,
 you can simply assign the string to a structural attribute (`group`,
 `tlv`, etc.) and the string will be parsed as assigning a value to a
-given attribute.
+given attribute.  e.g. `reply += "User-Name := 'hello'"`.
 
 .Example
 
 [source,unlang]
 ----
 control.Tmp-String-0 := { "This is a string", "This is another one" }
-reply.Reply-Message := "Serialize output: %pairs.print('control.[*]')"
+reply.Reply-Message := "Serialize output: %pairs.print(control.[*])"
 ----
 
 .Output