summaryrefslogtreecommitdiff
path: root/src/nslcd_proto/struct_backend.go.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/nslcd_proto/struct_backend.go.sh')
-rwxr-xr-xsrc/nslcd_proto/struct_backend.go.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nslcd_proto/struct_backend.go.sh b/src/nslcd_proto/struct_backend.go.sh
new file mode 100755
index 0000000..792ae84
--- /dev/null
+++ b/src/nslcd_proto/struct_backend.go.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+requests=$1
+cat <<EOF | gofmt
+package nslcd_proto
+
+type Backend interface {
+ $(sed -rn 's/([^_]+)(.*)/\1\2(Request_\1\2) \1_Enumerator/p' "$requests" | grep -v PAM)
+ $(sed -rn 's/(PAM)(.*)/\1\2(Request_\1\2) \1\2_Enumerator/p' "$requests")
+}
+EOF