;; ! THIS FILE CONTAINS AN INITIALIZATION SCHEME FOR CONFIG READER ;; ! PLEASE DO NOT MODIFY THIS FILE (version 1000) (serializator "actions" (define "stdout" 1u '("grep" "pipe-in")) (define "stderr" 2u '("grep" "pipe-in")) ;;; ---- GREP ;; ---- extract-regex (procedure "extract-regex" (arg "l_ext_reg" string) ) (procedure "grep" (arg "l_grep_fd" symbol uint) (arg "l_grep_regex" string) (arg "l_grep_match" string) (proc "l_grep_ext_reg" '("extract-regex") (proc-allow '(optional)) ) ) (struct "LdGrep" "grep" (field "stdio" (f/uint '("l_grep_fd"))) (field "regex_str" (f/string '("l_grep_regex"))) (field "res_str" (f/string '("l_grep_match"))) (field "action_ext" (f/optional) (f/string '("l_grep_ext_reg" "l_ext_reg"))) ) ;;; ---- EXEC ;; Pipes one of the outputs for the next exec (procedure "pipe-in" (arg "a_pipe" symbol uint) ) (procedure "uid" (arg "a_uid" uint) ) (procedure "gid" (arg "a_gid" uint) ) (procedure "env-clear" (arg "a_env_clear" boolean) ) (procedure "env" (arg "a_env_key" string) (arg "a_env_val" string) ) (struct "LdActionExecEnv" "env" (field "env_key" (f/string '("a_env_key"))) (field "env_val" (f/string '("a_env_val"))) ) (procedure "exec" (arg "l_exec_cmd" string) (arg "l_exec_args" vector string) (proc "l_pipe" '("pipe-in") (proc-allow '(optional)) ) (proc "l_uid" '("uid") (proc-allow '(optional)) ) (proc "l_gid" '("gid") (proc-allow '(optional)) ) (proc "l_env_clear" '("env-clear") (proc-allow '(optional)) ) (proc "l_env" '("env") (proc-allow '(optional collection)) ) ) (struct "LdActionExec" "exec" (field "executable" (f/string '("l_exec_cmd"))) (field "args" (f/vector (f/string '("l_exec_args")))) (field "pipe_stdio" (f/optional) (f/uint '("l_pipe" "a_pipe"))) (field "setuid" (f/optional) (f/uint '("l_uid" "a_uid") (val/width dword) ) ) (field "setgid" (f/optional) (f/uint '("l_gid" "a_gid") (val/width dword) ) ) (field "env_clear" (f/optional) (f/boolean '("l_env_clear" "a_env_clear"))) (field "envs" (f/optional) (f/vector (f/struct '("l_env")))) ) ;;; ---- action/tag (procedure "action-tag" (arg "l_act_tag" string) ) ;;; ---- action-block (procedure "action-block" (proc "l_act" '("exec") (proc-allow '(collection)) ) (proc "l_grep" '("grep") (proc-allow '(optional)) ) ) ;;; ---- action/unblock (procedure "action-unblock" (proc "l_act" '("exec") (proc-allow '(collection)) ) (proc "l_grep" '("grep") (proc-allow '(optional)) ) ) ;;; ---- action-check (procedure "action-check" (proc "l_act" '("exec") (proc-allow '(collection)) ) (proc "l_grep" '("grep") (proc-allow '(optional)) ) ) ;;; ---- action-cleanup (procedure "action-cleanup" (proc "l_act" '("exec") (proc-allow '(collection)) ) (proc "l_grep" '("grep") (proc-allow '(optional)) ) ) (struct "LdActionContainer" '("action-block" "action-unblock" "action-check" "action-cleanup") (field "exec_pipeline" (f/vector (f/struct '("l_act")))) (field "grep_pipe" (f/optional) (f/struct '("l_grep"))) ) ;;; ---- action-module (procedure "action-module" (arg "l_act_module" string) ) ;;; ---- VARs (procedure "var" (arg "l_var_key" string) (arg "l_var_val" auto-type) ) ;; pub struct LdActionVars ;; { ;; key: String, ;; val: VarType ;; } (struct "LdActionVars" "var" (field "key" (f/string '("l_var_key"))) (field "val" (f/any '("l_var_val"))) ) ;;; ---- ROOT (rootprocedure (proc "l_root_module" '("action-module") (proc-allow '(optional))) (proc "l_root_tag" '("action-tag") (proc-allow '(optional))) (proc "l_root_block" '("action-block") (proc-allow '(optional))) (proc "l_root_unblock" '("action-unblock") (proc-allow '(optional))) (proc "l_root_check" '("action-check") (proc-allow '(optional))) (proc "l_root_cleanup" '("action-cleanup") (proc-allow '(optional))) (proc "l_root_vars" '("var") (proc-allow '(collection optional))) ) (rootstruct "LdAction" (field "action_tag" (f/optional) (f/string '("l_root_tag" "l_act_tag"))) (field "action_block" (f/optional) (f/struct '("l_root_block"))) (field "action_unblock" (f/optional) (f/struct '("l_root_unblock"))) (field "action_check" (f/optional) (f/struct '("l_root_check"))) (field "action_cleanup" (f/optional) (f/struct '("l_root_cleanup"))) (field "action_module" (f/optional) (f/string '("l_root_module" "l_act_module"))) (field "var_map" (f/optional) (f/vector (f/struct '("l_root_vars")))) ) )