Skip to content

Commit

Permalink
Deployed b847fc8 to v3.0 with MkDocs 1.6.1 and mike 2.2.0.dev0
Browse files Browse the repository at this point in the history
  • Loading branch information
vektra-bot committed Jan 20, 2025
1 parent e5ab101 commit e8548b9
Show file tree
Hide file tree
Showing 17 changed files with 356 additions and 779 deletions.
55 changes: 20 additions & 35 deletions v3.0/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@








Expand Down Expand Up @@ -418,33 +416,6 @@



<li class="md-nav__item">
<a href="/mockery/latest/templates/" class="md-nav__link">


<span class="md-ellipsis">


Templates



</span>



</a>
</li>










<li class="md-nav__item">
<a href="/mockery/latest/running/" class="md-nav__link">

Expand Down Expand Up @@ -483,6 +454,10 @@










Expand All @@ -501,8 +476,10 @@
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >


<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">


<div class="md-nav__link md-nav__container">
<a href="/mockery/latest/template/" class="md-nav__link ">


<span class="md-ellipsis">

Expand All @@ -515,8 +492,14 @@



<span class="md-nav__icon md-icon"></span>
</label>
</a>


<label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
<span class="md-nav__icon md-icon"></span>
</label>

</div>

<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
Expand All @@ -530,13 +513,15 @@
<ul class="md-nav__list" data-md-scrollfix>









<li class="md-nav__item">
<a href="/mockery/latest/template-testify/" class="md-nav__link">
<a href="/mockery/latest/template/testify/" class="md-nav__link">


<span class="md-ellipsis">
Expand All @@ -563,7 +548,7 @@


<li class="md-nav__item">
<a href="/mockery/latest/template-matryer/" class="md-nav__link">
<a href="/mockery/latest/template/matryer/" class="md-nav__link">


<span class="md-ellipsis">
Expand Down
File renamed without changes
118 changes: 65 additions & 53 deletions v3.0/configuration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<link rel="prev" href="../installation/">


<link rel="next" href="../templates/">
<link rel="next" href="../running/">



Expand Down Expand Up @@ -346,8 +346,6 @@








Expand Down Expand Up @@ -484,6 +482,19 @@
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#example" class="md-nav__link">
<span class="md-ellipsis">

<span class="md-typeset">
Example
</span>

</span>
</a>

</li>

<li class="md-nav__item">
<a href="#parameter-descriptions" class="md-nav__link">
<span class="md-ellipsis">
Expand All @@ -498,17 +509,17 @@
</li>

<li class="md-nav__item">
<a href="#config-templates" class="md-nav__link">
<a href="#templates" class="md-nav__link">
<span class="md-ellipsis">

<span class="md-typeset">
Config Templates
Templates
</span>

</span>
</a>

<nav class="md-nav" aria-label="Config Templates">
<nav class="md-nav" aria-label="Templates">
<ul class="md-nav__list">

<li class="md-nav__item">
Expand Down Expand Up @@ -583,33 +594,6 @@



<li class="md-nav__item">
<a href="../templates/" class="md-nav__link">


<span class="md-ellipsis">


Templates



</span>



</a>
</li>










<li class="md-nav__item">
<a href="../running/" class="md-nav__link">

Expand Down Expand Up @@ -648,6 +632,10 @@










Expand All @@ -666,8 +654,10 @@
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >


<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">


<div class="md-nav__link md-nav__container">
<a href="../template/" class="md-nav__link ">


<span class="md-ellipsis">

Expand All @@ -680,8 +670,14 @@



<span class="md-nav__icon md-icon"></span>
</label>
</a>


<label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
<span class="md-nav__icon md-icon"></span>
</label>

</div>

<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
Expand All @@ -695,13 +691,15 @@
<ul class="md-nav__list" data-md-scrollfix>









<li class="md-nav__item">
<a href="../template-testify/" class="md-nav__link">
<a href="../template/testify/" class="md-nav__link">


<span class="md-ellipsis">
Expand All @@ -728,7 +726,7 @@


<li class="md-nav__item">
<a href="../template-matryer/" class="md-nav__link">
<a href="../template/matryer/" class="md-nav__link">


<span class="md-ellipsis">
Expand Down Expand Up @@ -986,6 +984,19 @@
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#example" class="md-nav__link">
<span class="md-ellipsis">

<span class="md-typeset">
Example
</span>

</span>
</a>

</li>

<li class="md-nav__item">
<a href="#parameter-descriptions" class="md-nav__link">
<span class="md-ellipsis">
Expand All @@ -1000,17 +1011,17 @@
</li>

<li class="md-nav__item">
<a href="#config-templates" class="md-nav__link">
<a href="#templates" class="md-nav__link">
<span class="md-ellipsis">

<span class="md-typeset">
Config Templates
Templates
</span>

</span>
</a>

<nav class="md-nav" aria-label="Config Templates">
<nav class="md-nav" aria-label="Templates">
<ul class="md-nav__list">

<li class="md-nav__item">
Expand Down Expand Up @@ -1104,6 +1115,7 @@


<h1 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">&para;</a></h1>
<h2 id="example">Example<a class="headerlink" href="#example" title="Permanent link">&para;</a></h2>
<p>All configuration is specified in a <code>.mockery.yml</code> file. An example config file may look like this:</p>
<div class="highlight"><span class="filename">YAML</span><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nt">all</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">False</span>
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="nt">template-data</span><span class="p">:</span>
Expand Down Expand Up @@ -1140,7 +1152,7 @@ <h1 id="configuration">Configuration<a class="headerlink" href="#configuration"
<ol>
<li>The parameters are merged hierarchically</li>
<li>There are a number of template variables available to generalize config values.</li>
<li>The style of mock to be generated is specified using the <a href="../templates/"><code>template</code></a> parameter.</li>
<li>The style of mock to be generated is specified using the <a href="templates/index.md"><code>template</code></a> parameter.</li>
</ol>
<p>An output file may contain multiple mocks, but the only rule is that all the mocks in the file must come from the same package. Because of this, mocks for different packages must go in different files.</p>
<h2 id="parameter-descriptions">Parameter Descriptions<a class="headerlink" href="#parameter-descriptions" title="Permanent link">&para;</a></h2>
Expand Down Expand Up @@ -1276,20 +1288,20 @@ <h2 id="parameter-descriptions">Parameter Descriptions<a class="headerlink" href
</tr>
</tbody>
</table>
<h2 id="config-templates">Config Templates<a class="headerlink" href="#config-templates" title="Permanent link">&para;</a></h2>
<p>Parameters marked as being templated have access to a number of template variables and functions.</p>
<h2 id="templates">Templates<a class="headerlink" href="#templates" title="Permanent link">&para;</a></h2>
<p>Parameters marked as being templated have access to a number of template variables and functions through the Go <a href="https://pkg.go.dev/text/template#hdr-Examples"><code>text/template</code></a> system.</p>
<h3 id="variables">Variables<a class="headerlink" href="#variables" title="Permanent link">&para;</a></h3>
<p>The variables provided are specified in the <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#ConfigData"><code>ConfigData</code></a> struct.</p>
<p>The variables provided are specified in the <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/config#Data"><code>config.Data</code></a> struct.</p>
<h3 id="functions">Functions<a class="headerlink" href="#functions" title="Permanent link">&para;</a></h3>
<p>All of the functions defined in <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#pkg-variables"><code>StringManipulationFuncs</code></a> are available to templated parameters.</p>
<p>All of the functions defined in <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/shared#pkg-variables"><code>StringManipulationFuncs</code></a> are available to templated parameters.</p>
<h2 id="merging-precedence">Merging Precedence<a class="headerlink" href="#merging-precedence" title="Permanent link">&para;</a></h2>
<p>The configuration applied to a specific mocked interface is merged according to the following precedence (in decreasing priority):</p>
<p>The configuration applied to a specific mocked interface is merged according to the following precedence (in increasing priority):</p>
<ol>
<li>Interface-specific config in <code>.mockery.yaml</code></li>
<li>Package-specific config in <code>.mockery.yaml</code></li>
<li>Command-line options</li>
<li>Environment variables</li>
<li>Top-level defaults in <code>.mockery.yaml</code></li>
<li>Environment variables</li>
<li>Command-line options</li>
<li>Package-specific config in <code>.mockery.yaml</code></li>
<li>Interface-specific config in <code>.mockery.yaml</code></li>
</ol>
<h2 id="formatting">Formatting<a class="headerlink" href="#formatting" title="Permanent link">&para;</a></h2>
<p>If a parameter is named <code>enable-feature</code> and we want a value of <code>True</code>, then these are the formats for each source:</p>
Expand All @@ -1311,7 +1323,7 @@ <h2 id="formatting">Formatting<a class="headerlink" href="#formatting" title="Pe
</tr>
<tr>
<td>yaml</td>
<td><code>enable-feature: True</code></td>
<td><code class="highlight"><span class="nt">enable-feature</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">True</span></code></td>
</tr>
</tbody>
</table>
Expand Down
Loading

0 comments on commit e8548b9

Please sign in to comment.