]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Document %uuid.v4() and %uuid.v7() developer/ndptech
authorNick Porter <nick@portercomputing.co.uk>
Thu, 6 Nov 2025 11:42:47 +0000 (11:42 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 6 Nov 2025 11:42:47 +0000 (11:42 +0000)
doc/antora/modules/reference/pages/xlat/misc/index.adoc
doc/antora/modules/reference/pages/xlat/misc/uuid.adoc [new file with mode: 0644]

index 3502fc3fc97cdf1d3ca63d9adbcc6305960806a5..cf934faef155e2ece034feacf71876aefdc681ba 100644 (file)
@@ -12,6 +12,7 @@ which operate on inputs, and produce an output.
 | 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/rand.adoc[rand]                   | random integers
+| xref:xlat/misc/uuid.adoc[UUID]                    | Generation of UUIDs
 |===
 
 // Copyright (C) 2025 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
diff --git a/doc/antora/modules/reference/pages/xlat/misc/uuid.adoc b/doc/antora/modules/reference/pages/xlat/misc/uuid.adoc
new file mode 100644 (file)
index 0000000..4fe9589
--- /dev/null
@@ -0,0 +1,28 @@
+= UUID generation
+
+Two functions are availble to generate UUIDs.
+
+`uuid.v4` generates a version 4 UUID and `uuid.v7` generates a
+version 7 UUID.
+
+.Return: _string_
+
+.Example
+====
+[source,unlang]
+----
+reply += {
+       Reply-Message = "A version 4 UUID is %uuid.v4()"
+       Reply-Message = "A version 7 UUID is %uuid.v7()"
+}
+----
+
+.Output
+....
+A version 4 UUID is cba48bda-641c-42ae-8173-d97aa04f888a
+A version 7 UUID is 019a58d8-8524-7342-aa07-c0fa2bba6a4e
+....
+====
+
+// Copyright (C) 2025 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
+// This documentation was developed by Network RADIUS SAS.