Skip to content

Commit

Permalink
deploy: 1c1ee53
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Sep 27, 2023
1 parent 314dc51 commit fcdc888
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .build
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2
dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2
dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2
dist/remixicon-NKANDIL5.woff2
dist/search_data-75D9B57C.js
dist/search_data-C2FC5648.js
dist/sidebar_items-E53B19A0.js
expression_language.html
gatherers.html
Expand Down
6 changes: 3 additions & 3 deletions Wanda.DataCase.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ <h1 class="signature" translate="no">errors_on(changeset)</h1>

<section class="docstring">

<p>A helper that transforms changeset errors into a map of messages.</p><pre><code class="makeup elixir" translate="no"><span class="n">assert</span><span class="w"> </span><span class="p" data-group-id="3738258032-1">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="n">changeset</span><span class="p" data-group-id="3738258032-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Accounts</span><span class="o">.</span><span class="n">create_user</span><span class="p" data-group-id="3738258032-2">(</span><span class="p" data-group-id="3738258032-3">%{</span><span class="ss">password</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;short&quot;</span><span class="p" data-group-id="3738258032-3">}</span><span class="p" data-group-id="3738258032-2">)</span><span class="w">
</span><span class="n">assert</span><span class="w"> </span><span class="s">&quot;password is too short&quot;</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">errors_on</span><span class="p" data-group-id="3738258032-4">(</span><span class="n">changeset</span><span class="p" data-group-id="3738258032-4">)</span><span class="o">.</span><span class="n">password</span><span class="w">
</span><span class="n">assert</span><span class="w"> </span><span class="p" data-group-id="3738258032-5">%{</span><span class="ss">password</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3738258032-6">[</span><span class="s">&quot;password is too short&quot;</span><span class="p" data-group-id="3738258032-6">]</span><span class="p" data-group-id="3738258032-5">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">errors_on</span><span class="p" data-group-id="3738258032-7">(</span><span class="n">changeset</span><span class="p" data-group-id="3738258032-7">)</span></code></pre>
<p>A helper that transforms changeset errors into a map of messages.</p><pre><code class="makeup elixir" translate="no"><span class="n">assert</span><span class="w"> </span><span class="p" data-group-id="2585435490-1">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="n">changeset</span><span class="p" data-group-id="2585435490-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Accounts</span><span class="o">.</span><span class="n">create_user</span><span class="p" data-group-id="2585435490-2">(</span><span class="p" data-group-id="2585435490-3">%{</span><span class="ss">password</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;short&quot;</span><span class="p" data-group-id="2585435490-3">}</span><span class="p" data-group-id="2585435490-2">)</span><span class="w">
</span><span class="n">assert</span><span class="w"> </span><span class="s">&quot;password is too short&quot;</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">errors_on</span><span class="p" data-group-id="2585435490-4">(</span><span class="n">changeset</span><span class="p" data-group-id="2585435490-4">)</span><span class="o">.</span><span class="n">password</span><span class="w">
</span><span class="n">assert</span><span class="w"> </span><span class="p" data-group-id="2585435490-5">%{</span><span class="ss">password</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2585435490-6">[</span><span class="s">&quot;password is too short&quot;</span><span class="p" data-group-id="2585435490-6">]</span><span class="p" data-group-id="2585435490-5">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">errors_on</span><span class="p" data-group-id="2585435490-7">(</span><span class="n">changeset</span><span class="p" data-group-id="2585435490-7">)</span></code></pre>
</section>
</section>
<section class="detail" id="setup_sandbox/1">
Expand Down
Binary file modified Wanda.epub
Binary file not shown.

Large diffs are not rendered by default.

40 changes: 37 additions & 3 deletions gatherers.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ <h2 id="introduction" class="section-heading">
Introduction
</a>
</h2>
<p>Gatherers can be thought of as functions:</p><ul><li>they have a name</li><li>they accept argument(s)</li><li>they return a value, the gathered <a href="specification.html#facts">Fact</a></li></ul><p>Facts Gathering process in a nutshell</p><pre><code class="makeup elixir" translate="no"><span class="n">fact</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gatherer</span><span class="p" data-group-id="9723648218-1">(</span><span class="n">argument</span><span class="p" data-group-id="9723648218-1">)</span></code></pre><h2 id="available-gatherers" class="section-heading">
<p>Gatherers can be thought of as functions:</p><ul><li>they have a name</li><li>they accept argument(s)</li><li>they return a value, the gathered <a href="specification.html#facts">Fact</a></li></ul><p>Facts Gathering process in a nutshell</p><pre><code class="makeup elixir" translate="no"><span class="n">fact</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gatherer</span><span class="p" data-group-id="0351713784-1">(</span><span class="n">argument</span><span class="p" data-group-id="0351713784-1">)</span></code></pre><h2 id="available-gatherers" class="section-heading">
<a href="#available-gatherers">
<i class="ri-link-m" aria-hidden="true"></i>
Available Gatherers
</a>
</h2>
<p>Here's a collection of built-in gatherers, with information about how to use them.</p><table><thead><tr><th style="text-align: left;">Name</th><th style="text-align: left;">Implementation</th></tr></thead><tbody><tr><td style="text-align: left;"><a href="#cibadmin"><code class="inline">cibadmin</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/cibadmin.go">trento-project/agent/../gatherers/cibadmin.go</a></td></tr><tr><td style="text-align: left;"><a href="#corosyncconf"><code class="inline">corosync.conf</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/corosyncconf.go">trento-project/agent/../gatherers/corosyncconf.go</a></td></tr><tr><td style="text-align: left;"><a href="#corosync-cmapctl"><code class="inline">corosync-cmapctl</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/corosynccmapctl.go">trento-project/agent/../gatherers/corosynccmapctl.go</a></td></tr><tr><td style="text-align: left;"><a href="#hosts-etchosts"><code class="inline">hosts</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/hostsfile.go">trento-project/agent/../gatherers/hostsfile.go</a></td></tr><tr><td style="text-align: left;"><a href="#package_version"><code class="inline">package_version</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/packageversion.go">trento-project/agent/../gatherers/packageversion.go</a></td></tr><tr><td style="text-align: left;"><a href="#saphostctrl"><code class="inline">saphostctrl</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/saphostctrl.go">trento-project/agent/../gatherers/saphostctrl.go</a></td></tr><tr><td style="text-align: left;"><a href="#sbd_config"><code class="inline">sbd_config</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/sbd.go">trento-project/agent/../gatherers/sbd.go</a></td></tr><tr><td style="text-align: left;"><a href="#sbd_dump"><code class="inline">sbd_dump</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/sbddump.go">trento-project/agent/../gatherers/sbddump.go</a></td></tr><tr><td style="text-align: left;"><a href="#systemd"><code class="inline">systemd</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/systemd.go">trento-project/agent/../gatherers/systemd.go</a></td></tr><tr><td style="text-align: left;"><a href="#verify_password"><code class="inline">verify_password</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/verifypassword.go">trento-project/agent/../gatherers/verifypassword.go</a></td></tr></tbody></table><h3 id="cibadmin" class="section-heading">
<p>Here's a collection of built-in gatherers, with information about how to use them.</p><table><thead><tr><th style="text-align: left;">Name</th><th style="text-align: left;">Implementation</th></tr></thead><tbody><tr><td style="text-align: left;"><a href="#cibadmin"><code class="inline">cibadmin</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/cibadmin.go">trento-project/agent/../gatherers/cibadmin.go</a></td></tr><tr><td style="text-align: left;"><a href="#corosyncconf"><code class="inline">corosync.conf</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/corosyncconf.go">trento-project/agent/../gatherers/corosyncconf.go</a></td></tr><tr><td style="text-align: left;"><a href="#corosync-cmapctl"><code class="inline">corosync-cmapctl</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/corosynccmapctl.go">trento-project/agent/../gatherers/corosynccmapctl.go</a></td></tr><tr><td style="text-align: left;"><a href="#hosts-etchosts"><code class="inline">hosts</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/hostsfile.go">trento-project/agent/../gatherers/hostsfile.go</a></td></tr><tr><td style="text-align: left;"><a href="#package_version"><code class="inline">package_version</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/packageversion.go">trento-project/agent/../gatherers/packageversion.go</a></td></tr><tr><td style="text-align: left;"><a href="#passwd"><code class="inline">passwd</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/passwd.go">trento-project/agent/../gatherers/passwd.go</a></td></tr><tr><td style="text-align: left;"><a href="#saphostctrl"><code class="inline">saphostctrl</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/saphostctrl.go">trento-project/agent/../gatherers/saphostctrl.go</a></td></tr><tr><td style="text-align: left;"><a href="#sbd_config"><code class="inline">sbd_config</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/sbd.go">trento-project/agent/../gatherers/sbd.go</a></td></tr><tr><td style="text-align: left;"><a href="#sbd_dump"><code class="inline">sbd_dump</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/sbddump.go">trento-project/agent/../gatherers/sbddump.go</a></td></tr><tr><td style="text-align: left;"><a href="#systemd"><code class="inline">systemd</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/systemd.go">trento-project/agent/../gatherers/systemd.go</a></td></tr><tr><td style="text-align: left;"><a href="#verify_password"><code class="inline">verify_password</code></a></td><td style="text-align: left;"><a href="https://github.com/trento-project/agent/blob/main/internal/factsengine/gatherers/verifypassword.go">trento-project/agent/../gatherers/verifypassword.go</a></td></tr></tbody></table><h3 id="cibadmin" class="section-heading">
<a href="#cibadmin">
<i class="ri-link-m" aria-hidden="true"></i>
cibadmin
Expand Down Expand Up @@ -368,7 +368,41 @@ <h2 id="introduction" class="section-heading">
]

// compare_package_corosync
0</code></pre><h3 id="saphostctrl" class="section-heading">
0</code></pre><h3 id="passwd" class="section-heading">
<a href="#passwd">
<i class="ri-link-m" aria-hidden="true"></i>
passwd
</a>
</h3>
<p><strong>Argument required</strong>: no.</p><p>This gatherer allows access to the /etc/passwd file, returning all entries available at the file.</p><p>Example specification:</p><pre><code class="yaml">facts:
- name: passwd
gatherer: passwd</code></pre><p>Example output (in Rhai):</p><pre><code class="ts">[
#{
&quot;description&quot;: &quot;bin&quot;,
&quot;gid&quot;: 1,
&quot;home&quot;: &quot;/bin&quot;,
&quot;shell&quot;: &quot;/sbin/nologin&quot;,
&quot;uid&quot;: 1,
&quot;user&quot;: &quot;bin&quot;
},
#{
&quot;description&quot;: &quot;Chrony Daemon&quot;,
&quot;gid&quot;: 475,
&quot;home&quot;: &quot;/var/lib/chrony&quot;,
&quot;shell&quot;: &quot;/bin/false&quot;,
&quot;uid&quot;: 474,
&quot;user&quot;: &quot;chrony&quot;
},
#{
&quot;description&quot;: &quot;Daemon&quot;,
&quot;gid&quot;: 2,
&quot;home&quot;: &quot;/sbin&quot;,
&quot;shell&quot;: &quot;/sbin/nologin&quot;,
&quot;uid&quot;: 2,
&quot;user&quot;: &quot;daemon&quot;
},
...
];</code></pre><h3 id="saphostctrl" class="section-heading">
<a href="#saphostctrl">
<i class="ri-link-m" aria-hidden="true"></i>
saphostctrl
Expand Down
2 changes: 1 addition & 1 deletion hack_on_wanda.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h2 id="requirements" class="section-heading">
Ensure Compatibility with asdf
</a>
</h3>
<p><a href="https://asdf-vm.com/guide/introduction.html">asdf</a> allows using specific versions of programming language tools that are known to be compatible with the project, rather than relying on the version that's installed globally on the host system.</p><p>In order to use asdf, follow the official <a href="https://asdf-vm.com/guide/getting-started.html">asdf getting started guide</a>.</p><p>Install all required asdf plugins from <a href="/.tool-versions">.tool-versions</a> inside the web repository.</p><pre><code class="makeup elixir" translate="no"><span class="n">cut</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="sc">&#39; &#39;</span><span class="w"> </span><span class="o">-</span><span class="n">f1</span><span class="w"> </span><span class="o">.</span><span class="n">tool</span><span class="o">-</span><span class="n">versions</span><span class="o">|</span><span class="n">xargs</span><span class="w"> </span><span class="o">-</span><span class="n">i</span><span class="w"> </span><span class="n">asdf</span><span class="w"> </span><span class="n">plugin</span><span class="w"> </span><span class="n">add</span><span class="w"> </span><span class="p" data-group-id="1139166402-1">{</span><span class="p" data-group-id="1139166402-1">}</span></code></pre><p>Set up the asdf environment</p><pre><code class="makeup elixir" translate="no"><span class="n">asdf</span><span class="w"> </span><span class="n">install</span></code></pre><h2 id="development-environment" class="section-heading">
<p><a href="https://asdf-vm.com/guide/introduction.html">asdf</a> allows using specific versions of programming language tools that are known to be compatible with the project, rather than relying on the version that's installed globally on the host system.</p><p>In order to use asdf, follow the official <a href="https://asdf-vm.com/guide/getting-started.html">asdf getting started guide</a>.</p><p>Install all required asdf plugins from <a href="/.tool-versions">.tool-versions</a> inside the web repository.</p><pre><code class="makeup elixir" translate="no"><span class="n">cut</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="sc">&#39; &#39;</span><span class="w"> </span><span class="o">-</span><span class="n">f1</span><span class="w"> </span><span class="o">.</span><span class="n">tool</span><span class="o">-</span><span class="n">versions</span><span class="o">|</span><span class="n">xargs</span><span class="w"> </span><span class="o">-</span><span class="n">i</span><span class="w"> </span><span class="n">asdf</span><span class="w"> </span><span class="n">plugin</span><span class="w"> </span><span class="n">add</span><span class="w"> </span><span class="p" data-group-id="9810213340-1">{</span><span class="p" data-group-id="9810213340-1">}</span></code></pre><p>Set up the asdf environment</p><pre><code class="makeup elixir" translate="no"><span class="n">asdf</span><span class="w"> </span><span class="n">install</span></code></pre><h2 id="development-environment" class="section-heading">
<a href="#development-environment">
<i class="ri-link-m" aria-hidden="true"></i>
Development environment
Expand Down
Loading

0 comments on commit fcdc888

Please sign in to comment.