aboutsummaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
Diffstat (limited to 'types')
-rw-r--r--types/port.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/types/port.pp b/types/port.pp
new file mode 100644
index 0000000..dc2b7e1
--- /dev/null
+++ b/types/port.pp
@@ -0,0 +1,13 @@
+# @summary ferm port-spec
+#
+# allowed variants:
+# -----------------
+# + single Integer port
+# + Array of Integers (creates a multiport matcher)
+# + ferm range port-spec (pair of colon-separated integer, assumes 0 if first is omitted)
+
+type Ferm::Port = Variant[
+ Stdlib::Port,
+ Array[Stdlib::Port],
+ Pattern['^\d*:\d+$'],
+]