<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Providers on Orchard</title><link>https://orchard.pthm.dev/docs/providers/</link><description>Recent content in Providers on Orchard</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://orchard.pthm.dev/docs/providers/index.xml" rel="self" type="application/rss+xml"/><item><title>External providers</title><link>https://orchard.pthm.dev/docs/providers/external/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://orchard.pthm.dev/docs/providers/external/</guid><description>&lt;h1 id="external-providers"&gt;External providers&lt;a class="anchor" href="#external-providers"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;External providers are binaries that live outside the &lt;code&gt;orchard&lt;/code&gt; tree and speak
Orchard&amp;rsquo;s &lt;a href="../../extending/provider-protocol/"&gt;provider protocol&lt;/a&gt; over stdio.
Scenarios use them exactly like built-in providers — the only difference is the
source string.&lt;/p&gt;
&lt;p&gt;If you want to &lt;strong&gt;build&lt;/strong&gt; a custom provider, see
&lt;a href="../../extending/"&gt;Extending Orchard&lt;/a&gt;. This page covers how to &lt;strong&gt;use&lt;/strong&gt; an
existing external provider from a scenario.&lt;/p&gt;
&lt;h2 id="declaring-an-external-provider"&gt;Declaring an external provider&lt;a class="anchor" href="#declaring-an-external-provider"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f7f7f7;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hcl" data-lang="hcl"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#cf222e"&gt;required_providers&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; stripe &lt;span style="color:#0550ae"&gt;=&lt;/span&gt; { source &lt;span style="color:#0550ae"&gt;=&lt;/span&gt; &lt;span style="color:#0a3069"&gt;&amp;#34;exec:./bin/orchard-stripe&amp;#34;&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The source format is &lt;code&gt;exec:&amp;lt;path&amp;gt;&lt;/code&gt;, where &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; is an executable file:&lt;/p&gt;</description></item><item><title>exec</title><link>https://orchard.pthm.dev/docs/providers/exec/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://orchard.pthm.dev/docs/providers/exec/</guid><description>&lt;h1 id="exec"&gt;exec&lt;a class="anchor" href="#exec"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;code&gt;builtin/exec&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Shell command execution.&lt;/p&gt;
&lt;h2 id="provider-configuration"&gt;Provider configuration&lt;a class="anchor" href="#provider-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Name&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Required&lt;/th&gt;
 &lt;th&gt;Default&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;dir&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Default working directory for commands. Relative paths are resolved against the process cwd.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;env&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Default environment variables merged into every action&amp;rsquo;s env.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="actions"&gt;Actions&lt;a class="anchor" href="#actions"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="exec_run"&gt;&lt;code&gt;exec_run&lt;/code&gt;&lt;a class="anchor" href="#exec_run"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Run a program and capture stdout/stderr/exit_code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Non-zero exit is an error by default&lt;/strong&gt; — the action fails and downstream
actions don&amp;rsquo;t run.&lt;/p&gt;
&lt;p&gt;Run a program with explicit arguments.&lt;/p&gt;</description></item><item><title>http</title><link>https://orchard.pthm.dev/docs/providers/http/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://orchard.pthm.dev/docs/providers/http/</guid><description>&lt;h1 id="http"&gt;http&lt;a class="anchor" href="#http"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;code&gt;builtin/http&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;HTTP request provider.&lt;/p&gt;
&lt;h2 id="provider-configuration"&gt;Provider configuration&lt;a class="anchor" href="#provider-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Name&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Required&lt;/th&gt;
 &lt;th&gt;Default&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;base_url&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Prepended to relative URLs in requests. When unset, URLs must be absolute.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;default_headers&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;map(string)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Headers added to every request; per-request headers take precedence.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;timeout_seconds&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;30&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Per-request timeout in seconds applied to the full request/response round-trip.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="actions"&gt;Actions&lt;a class="anchor" href="#actions"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="http_request"&gt;&lt;code&gt;http_request&lt;/code&gt;&lt;a class="anchor" href="#http_request"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Issue an HTTP request and capture the response.&lt;/p&gt;
&lt;p&gt;Simple GET against a relative path resolved via &lt;code&gt;base_url&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>postgres</title><link>https://orchard.pthm.dev/docs/providers/postgres/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://orchard.pthm.dev/docs/providers/postgres/</guid><description>&lt;h1 id="postgres"&gt;postgres&lt;a class="anchor" href="#postgres"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;code&gt;builtin/postgres&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;PostgreSQL data operations.&lt;/p&gt;
&lt;h2 id="provider-configuration"&gt;Provider configuration&lt;a class="anchor" href="#provider-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Name&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Required&lt;/th&gt;
 &lt;th&gt;Default&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;dsn&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;PostgreSQL connection string (e.g. &lt;code&gt;postgres://user:pass@host:5432/db&lt;/code&gt;).&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="actions"&gt;Actions&lt;a class="anchor" href="#actions"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="postgres_copy"&gt;&lt;code&gt;postgres_copy&lt;/code&gt;&lt;a class="anchor" href="#postgres_copy"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Bulk-load rows into a table via PostgreSQL &lt;code&gt;COPY FROM STDIN&lt;/code&gt;. Dramatically
faster than row-by-row &lt;code&gt;INSERT&lt;/code&gt; for fixture data — a 10,000-row CSV loads
in a single network round-trip.&lt;/p&gt;
&lt;p&gt;Provide data inline via &lt;code&gt;data&lt;/code&gt; or reference a file via &lt;code&gt;file&lt;/code&gt;. The two are
mutually exclusive. &lt;code&gt;file&lt;/code&gt; paths are resolved relative to the scenario file
by the engine, so &lt;code&gt;file = &amp;quot;./fixtures/merchants.csv&amp;quot;&lt;/code&gt; works from any cwd.&lt;/p&gt;</description></item></channel></rss>