mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Deployed 1db805b451 to master with MkDocs 1.2.3 and mike 1.1.2
This commit is contained in:
1 parent
7d6986b8fd
commit
57d6197643
8 files changed
+83
-14
No files matched your search
@@ -904,7 +904,7 @@
|
||||
<h3 id="ipcprefix">[IpcPrefix]<a class="headerlink" href="#ipcprefix" title="Permanent link">#</a></h3>
|
||||
<p>• <code>Readonly</code> <strong>[IpcPrefix]</strong>: <code>string</code></p>
|
||||
<h4 id="inherited-from">Inherited from<a class="headerlink" href="#inherited-from" title="Permanent link">#</a></h4>
|
||||
<p>IpcRegistrar.__@IpcPrefix@44748</p>
|
||||
<p>IpcRegistrar.__@IpcPrefix@44753</p>
|
||||
<hr />
|
||||
<h3 id="extension">extension<a class="headerlink" href="#extension" title="Permanent link">#</a></h3>
|
||||
<p>• <code>Protected</code> <strong>extension</strong>: <code>LensExtension</code></p>
|
||||
|
||||
@@ -820,6 +820,13 @@
|
||||
protocolHandlers
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#traymenus" class="md-nav__link">
|
||||
trayMenus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -972,6 +979,7 @@
|
||||
<li><a href="./#manifest">manifest</a></li>
|
||||
<li><a href="./#manifestpath">manifestPath</a></li>
|
||||
<li><a href="./#protocolhandlers">protocolHandlers</a></li>
|
||||
<li><a href="./#traymenus">trayMenus</a></li>
|
||||
</ul>
|
||||
<h3 id="accessors">Accessors<a class="headerlink" href="#accessors" title="Permanent link">#</a></h3>
|
||||
<ul>
|
||||
@@ -1015,7 +1023,7 @@
|
||||
<h3 id="disposers">[Disposers]<a class="headerlink" href="#disposers" title="Permanent link">#</a></h3>
|
||||
<p>• <strong>[Disposers]</strong>: <code>ExtendableDisposer</code></p>
|
||||
<h4 id="inherited-from_1">Inherited from<a class="headerlink" href="#inherited-from_1" title="Permanent link">#</a></h4>
|
||||
<p>LensExtension.__@Disposers@30364</p>
|
||||
<p>LensExtension.__@Disposers@30369</p>
|
||||
<hr />
|
||||
<h3 id="appmenus">appMenus<a class="headerlink" href="#appmenus" title="Permanent link">#</a></h3>
|
||||
<p>• <strong>appMenus</strong>: <code>MenuRegistration</code>[] = <code>[]</code></p>
|
||||
@@ -1044,6 +1052,9 @@
|
||||
<p>• <strong>protocolHandlers</strong>: <a href="../../interfaces/Common.Types.ProtocolHandlerRegistration/"><code>ProtocolHandlerRegistration</code></a>[] = <code>[]</code></p>
|
||||
<h4 id="inherited-from_6">Inherited from<a class="headerlink" href="#inherited-from_6" title="Permanent link">#</a></h4>
|
||||
<p>LensExtension.protocolHandlers</p>
|
||||
<hr />
|
||||
<h3 id="traymenus">trayMenus<a class="headerlink" href="#traymenus" title="Permanent link">#</a></h3>
|
||||
<p>• <strong>trayMenus</strong>: <code>TrayMenuRegistration</code>[] = <code>[]</code></p>
|
||||
<h2 id="accessors_1">Accessors<a class="headerlink" href="#accessors_1" title="Permanent link">#</a></h2>
|
||||
<h3 id="description">description<a class="headerlink" href="#description" title="Permanent link">#</a></h3>
|
||||
<p>• <code>get</code> <strong>description</strong>(): <code>string</code></p>
|
||||
|
||||
@@ -904,7 +904,7 @@
|
||||
<h3 id="ipcprefix">[IpcPrefix]<a class="headerlink" href="#ipcprefix" title="Permanent link">#</a></h3>
|
||||
<p>• <code>Readonly</code> <strong>[IpcPrefix]</strong>: <code>string</code></p>
|
||||
<h4 id="inherited-from">Inherited from<a class="headerlink" href="#inherited-from" title="Permanent link">#</a></h4>
|
||||
<p>IpcRegistrar.__@IpcPrefix@44748</p>
|
||||
<p>IpcRegistrar.__@IpcPrefix@44753</p>
|
||||
<hr />
|
||||
<h3 id="extension">extension<a class="headerlink" href="#extension" title="Permanent link">#</a></h3>
|
||||
<p>• <code>Protected</code> <strong>extension</strong>: <code>LensExtension</code></p>
|
||||
|
||||
@@ -1135,7 +1135,7 @@
|
||||
<h3 id="disposers">[Disposers]<a class="headerlink" href="#disposers" title="Permanent link">#</a></h3>
|
||||
<p>• <strong>[Disposers]</strong>: <code>ExtendableDisposer</code></p>
|
||||
<h4 id="inherited-from_1">Inherited from<a class="headerlink" href="#inherited-from_1" title="Permanent link">#</a></h4>
|
||||
<p>LensExtension.__@Disposers@30364</p>
|
||||
<p>LensExtension.__@Disposers@30369</p>
|
||||
<hr />
|
||||
<h3 id="apppreferences">appPreferences<a class="headerlink" href="#apppreferences" title="Permanent link">#</a></h3>
|
||||
<p>• <strong>appPreferences</strong>: <a href="../../interfaces/Common.Types.AppPreferenceRegistration/"><code>AppPreferenceRegistration</code></a>[] = <code>[]</code></p>
|
||||
|
||||
@@ -450,8 +450,8 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#app-menus" class="md-nav__link">
|
||||
App Menus
|
||||
<a href="#menus" class="md-nav__link">
|
||||
Menus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
@@ -872,8 +872,8 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#app-menus" class="md-nav__link">
|
||||
App Menus
|
||||
<a href="#menus" class="md-nav__link">
|
||||
Menus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
@@ -1007,8 +1007,8 @@ In order to see logs from this extension, you need to start Lens from the comman
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre></div>
|
||||
<h3 id="app-menus">App Menus<a class="headerlink" href="#app-menus" title="Permanent link">#</a></h3>
|
||||
<p>This extension can register custom app menus that will be displayed on OS native menus.</p>
|
||||
<h3 id="menus">Menus<a class="headerlink" href="#menus" title="Permanent link">#</a></h3>
|
||||
<p>This extension can register custom app and tray menus that will be displayed on OS native menus.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="k">import</span> <span class="p">{</span> <span class="nx">Main</span> <span class="p">}</span> <span class="kr">from</span> <span class="s2">"@k8slens/extensions"</span>
|
||||
|
||||
@@ -1022,6 +1022,29 @@ In order to see logs from this extension, you need to start Lens from the comman
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
|
||||
<span class="nx">trayMenus</span> <span class="o">=</span> <span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="nx">label</span><span class="o">:</span> <span class="s2">"My links"</span><span class="p">,</span>
|
||||
<span class="nx">submenu</span><span class="o">:</span> <span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="nx">label</span><span class="o">:</span> <span class="s2">"Lens"</span><span class="p">,</span>
|
||||
<span class="nx">click</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="nx">Main</span><span class="p">.</span><span class="nx">Navigation</span><span class="p">.</span><span class="nx">navigate</span><span class="p">(</span><span class="s2">"https://k8slens.dev"</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">{</span>
|
||||
<span class="kr">type</span><span class="o">:</span> <span class="s2">"separator"</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">{</span>
|
||||
<span class="nx">label</span><span class="o">:</span> <span class="s2">"Lens Github"</span><span class="p">,</span>
|
||||
<span class="nx">click</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="nx">Main</span><span class="p">.</span><span class="nx">Navigation</span><span class="p">.</span><span class="nx">navigate</span><span class="p">(</span><span class="s2">"https://github.com/lensapp/lens"</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre></div>
|
||||
<h2 id="renderer-extension">Renderer Extension<a class="headerlink" href="#renderer-extension" title="Permanent link">#</a></h2>
|
||||
|
||||
@@ -537,6 +537,13 @@
|
||||
appMenus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#traymenus" class="md-nav__link">
|
||||
trayMenus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -786,6 +793,13 @@
|
||||
appMenus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#traymenus" class="md-nav__link">
|
||||
trayMenus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -818,7 +832,7 @@
|
||||
<p>The Main Extension API is the interface to Lens's main process.
|
||||
Lens runs in both main and renderer processes.
|
||||
The Main Extension API allows you to access, configure, and customize Lens data, add custom application menu items and <a href="../protocol-handlers/">protocol handlers</a>, and run custom code in Lens's main process.
|
||||
It also provides convenient methods for navigating to built-in Lens pages and extension pages, as well as adding and removing sources of catalog entities. </p>
|
||||
It also provides convenient methods for navigating to built-in Lens pages and extension pages, as well as adding and removing sources of catalog entities.</p>
|
||||
<h2 id="mainlensextension-class"><code>Main.LensExtension</code> Class<a class="headerlink" href="#mainlensextension-class" title="Permanent link">#</a></h2>
|
||||
<h3 id="onactivate-and-ondeactivate-methods"><code>onActivate()</code> and <code>onDeactivate()</code> Methods<a class="headerlink" href="#onactivate-and-ondeactivate-methods" title="Permanent link">#</a></h3>
|
||||
<p>To create a main extension simply extend the <code>Main.LensExtension</code> class:</p>
|
||||
@@ -850,7 +864,6 @@ Achieve this by starting Lens from the command prompt.</p>
|
||||
<p>For more details on accessing Lens state data, please see the <a href="../stores">Stores</a> guide.</p>
|
||||
<h3 id="appmenus"><code>appMenus</code><a class="headerlink" href="#appmenus" title="Permanent link">#</a></h3>
|
||||
<p>The Main Extension API allows you to customize the UI application menu.
|
||||
Note that this is the only UI feature that the Main Extension API allows you to customize.
|
||||
The following example demonstrates adding an item to the <strong>Help</strong> menu.</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="k">import</span> <span class="p">{</span> <span class="nx">Main</span> <span class="p">}</span> <span class="kr">from</span> <span class="s2">"@k8slens/extensions"</span><span class="p">;</span>
|
||||
|
||||
@@ -867,7 +880,7 @@ The following example demonstrates adding an item to the <strong>Help</strong> m
|
||||
<span class="p">}</span>
|
||||
</code></pre></div>
|
||||
<p><code>appMenus</code> is an array of objects that satisfy the <code>MenuRegistration</code> interface.
|
||||
<code>MenuRegistration</code> extends React's <code>MenuItemConstructorOptions</code> interface.
|
||||
<code>MenuRegistration</code> extends Electron's <code>MenuItemConstructorOptions</code> interface.
|
||||
The properties of the appMenus array objects are defined as follows:</p>
|
||||
<ul>
|
||||
<li><code>parentId</code> is the name of the menu where your new menu item will be listed.
|
||||
@@ -894,6 +907,28 @@ Note that pages are associated with the <a href="../renderer-extension/"><code>R
|
||||
</code></pre></div>
|
||||
<p>When the menu item is clicked the <code>navigate()</code> method looks for and displays a global page with id <code>"myGlobalPage"</code>.
|
||||
This page would be defined in your extension's <code>Renderer.LensExtension</code> implementation (See <a href="../renderer-extension/"><code>Renderer.LensExtension</code></a>).</p>
|
||||
<h3 id="traymenus"><code>trayMenus</code><a class="headerlink" href="#traymenus" title="Permanent link">#</a></h3>
|
||||
<p><code>trayMenus</code> is an array of <code>TrayMenuRegistration</code> objects. Most importantly you can define a <code>label</code> and a <code>click</code> handler. Other properties are <code>submenu</code>, <code>enabled</code>, <code>toolTip</code>, <code>id</code> and <code>type</code>.</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="kd">interface</span> <span class="nx">TrayMenuRegistration</span> <span class="p">{</span>
|
||||
<span class="nx">label?</span>: <span class="kt">string</span><span class="p">;</span>
|
||||
<span class="nx">click</span><span class="o">?:</span> <span class="p">(</span><span class="nx">menuItem</span>: <span class="kt">TrayMenuRegistration</span><span class="p">)</span> <span class="p">=></span> <span class="ow">void</span><span class="p">;</span>
|
||||
<span class="nx">id?</span>: <span class="kt">string</span><span class="p">;</span>
|
||||
<span class="kr">type</span><span class="o">?:</span> <span class="s2">"normal"</span> <span class="o">|</span> <span class="s2">"separator"</span> <span class="o">|</span> <span class="s2">"submenu"</span>
|
||||
<span class="nx">toolTip?</span>: <span class="kt">string</span><span class="p">;</span>
|
||||
<span class="nx">enabled?</span>: <span class="kt">boolean</span><span class="p">;</span>
|
||||
<span class="nx">submenu?</span>: <span class="kt">TrayMenuRegistration</span><span class="p">[]</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre></div>
|
||||
<p>The following example demonstrates how tray menus can be added from extension:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="k">import</span> <span class="p">{</span> <span class="nx">Main</span> <span class="p">}</span> <span class="kr">from</span> <span class="s2">"@k8slens/extensions"</span><span class="p">;</span>
|
||||
|
||||
<span class="k">export</span> <span class="k">default</span> <span class="kd">class</span> <span class="nx">SampleTrayMenuMainExtension</span> <span class="k">extends</span> <span class="nx">Main</span><span class="p">.</span><span class="nx">LensExtension</span> <span class="p">{</span>
|
||||
<span class="nx">trayMenus</span> <span class="o">=</span> <span class="p">[{</span>
|
||||
<span class="nx">label</span><span class="o">:</span> <span class="s2">"menu from the extension"</span><span class="p">,</span>
|
||||
<span class="nx">click</span><span class="o">:</span> <span class="p">()</span> <span class="p">=></span> <span class="p">{</span> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">"tray menu clicked!"</span><span class="p">)</span> <span class="p">}</span>
|
||||
<span class="p">}]</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre></div>
|
||||
<h3 id="addcatalogsource-and-removecatalogsource-methods"><code>addCatalogSource()</code> and <code>removeCatalogSource()</code> Methods<a class="headerlink" href="#addcatalogsource-and-removecatalogsource-methods" title="Permanent link">#</a></h3>
|
||||
<p>The <code>Main.LensExtension</code> class also provides the <code>addCatalogSource()</code> and <code>removeCatalogSource()</code> methods, for managing custom catalog items (or entities).
|
||||
See the <a href="../catalog/"><code>Catalog</code></a> documentation for full details about the catalog.</p>
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Lens Extension API # Customize and enhance the Lens experience with the Lens Extension API. Use the extension API to create menus or page content. The same extension API was used to create many of Lens's core features. To install your first extension you should goto the extension page in lens. This documentation describes: How to build, run, test, and publish an extension. How to take full advantage of the Lens Extension API. Where to find guides and code samples to help get you started. What Extensions Can Do # Here are some examples of what you can achieve with the Extension API: Add custom components & views in the UI - Extending the Lens Workbench For an overview of the Lens Extension API, refer to the Common Capabilities page. Extension Guides Overview also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API. How to Build Extensions # Here is what each section of the Lens Extension API docs can help you with: Getting Started teaches fundamental concepts for building extensions with the Hello World sample. Extension Capabilities dissects Lens's Extension API into smaller categories and points you to more detailed topics. Extension Guides includes guides and code samples that explain specific usages of Lens Extension API. Testing and Publishing includes in-depth guides on various extension development topics, such as testing and publishing extensions. API Reference contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics. What's New # Just like Lens itself, the extension API updates on a monthly cadence, rolling out new features with every release. Keep up with Lens and the Lens Extension API by reviewing the release notes . Important changes since Lens v4 # Lens has undergone major design improvements in v5, which have resulted in several large changes to the extension API. Workspaces are gone, and the catalog is introduced for containing clusters, as well as other items, including custom entities. Lens has migrated from using mobx 5 to mobx 6 for internal state management, and this may have ramifications for extension implementations. Although the API retains many components from v4, given these changes, extensions written for Lens v4 are not compatible with the Lens v5 extension API. See the Lens v4 to v5 extension migration notes on getting old extensions working in Lens v5. Looking for Help # If you have questions for extension development, try asking on the Lens Dev Slack . It's a public chatroom for Lens developers, where Lens team members chime in from time to time. To provide feedback on the documentation or issues with the Lens Extension API, create new issues at lensapp/lens . Please use the labels area/documentation and/or area/extension . Downloading Lens # Download Lens for macOS, Windows, or Linux.","title":"Overview"},{"location":"#lens-extension-api","text":"Customize and enhance the Lens experience with the Lens Extension API. Use the extension API to create menus or page content. The same extension API was used to create many of Lens's core features. To install your first extension you should goto the extension page in lens. This documentation describes: How to build, run, test, and publish an extension. How to take full advantage of the Lens Extension API. Where to find guides and code samples to help get you started.","title":"Lens Extension API"},{"location":"#what-extensions-can-do","text":"Here are some examples of what you can achieve with the Extension API: Add custom components & views in the UI - Extending the Lens Workbench For an overview of the Lens Extension API, refer to the Common Capabilities page. Extension Guides Overview also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API.","title":"What Extensions Can Do"},{"location":"#how-to-build-extensions","text":"Here is what each section of the Lens Extension API docs can help you with: Getting Started teaches fundamental concepts for building extensions with the Hello World sample. Extension Capabilities dissects Lens's Extension API into smaller categories and points you to more detailed topics. Extension Guides includes guides and code samples that explain specific usages of Lens Extension API. Testing and Publishing includes in-depth guides on various extension development topics, such as testing and publishing extensions. API Reference contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics.","title":"How to Build Extensions"},{"location":"#whats-new","text":"Just like Lens itself, the extension API updates on a monthly cadence, rolling out new features with every release. Keep up with Lens and the Lens Extension API by reviewing the release notes .","title":"What's New"},{"locationLine truncated
|
||||
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Lens Extension API # Customize and enhance the Lens experience with the Lens Extension API. Use the extension API to create menus or page content. The same extension API was used to create many of Lens's core features. To install your first extension you should goto the extension page in lens. This documentation describes: How to build, run, test, and publish an extension. How to take full advantage of the Lens Extension API. Where to find guides and code samples to help get you started. What Extensions Can Do # Here are some examples of what you can achieve with the Extension API: Add custom components & views in the UI - Extending the Lens Workbench For an overview of the Lens Extension API, refer to the Common Capabilities page. Extension Guides Overview also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API. How to Build Extensions # Here is what each section of the Lens Extension API docs can help you with: Getting Started teaches fundamental concepts for building extensions with the Hello World sample. Extension Capabilities dissects Lens's Extension API into smaller categories and points you to more detailed topics. Extension Guides includes guides and code samples that explain specific usages of Lens Extension API. Testing and Publishing includes in-depth guides on various extension development topics, such as testing and publishing extensions. API Reference contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics. What's New # Just like Lens itself, the extension API updates on a monthly cadence, rolling out new features with every release. Keep up with Lens and the Lens Extension API by reviewing the release notes . Important changes since Lens v4 # Lens has undergone major design improvements in v5, which have resulted in several large changes to the extension API. Workspaces are gone, and the catalog is introduced for containing clusters, as well as other items, including custom entities. Lens has migrated from using mobx 5 to mobx 6 for internal state management, and this may have ramifications for extension implementations. Although the API retains many components from v4, given these changes, extensions written for Lens v4 are not compatible with the Lens v5 extension API. See the Lens v4 to v5 extension migration notes on getting old extensions working in Lens v5. Looking for Help # If you have questions for extension development, try asking on the Lens Dev Slack . It's a public chatroom for Lens developers, where Lens team members chime in from time to time. To provide feedback on the documentation or issues with the Lens Extension API, create new issues at lensapp/lens . Please use the labels area/documentation and/or area/extension . Downloading Lens # Download Lens for macOS, Windows, or Linux.","title":"Overview"},{"location":"#lens-extension-api","text":"Customize and enhance the Lens experience with the Lens Extension API. Use the extension API to create menus or page content. The same extension API was used to create many of Lens's core features. To install your first extension you should goto the extension page in lens. This documentation describes: How to build, run, test, and publish an extension. How to take full advantage of the Lens Extension API. Where to find guides and code samples to help get you started.","title":"Lens Extension API"},{"location":"#what-extensions-can-do","text":"Here are some examples of what you can achieve with the Extension API: Add custom components & views in the UI - Extending the Lens Workbench For an overview of the Lens Extension API, refer to the Common Capabilities page. Extension Guides Overview also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API.","title":"What Extensions Can Do"},{"location":"#how-to-build-extensions","text":"Here is what each section of the Lens Extension API docs can help you with: Getting Started teaches fundamental concepts for building extensions with the Hello World sample. Extension Capabilities dissects Lens's Extension API into smaller categories and points you to more detailed topics. Extension Guides includes guides and code samples that explain specific usages of Lens Extension API. Testing and Publishing includes in-depth guides on various extension development topics, such as testing and publishing extensions. API Reference contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics.","title":"How to Build Extensions"},{"location":"#whats-new","text":"Just like Lens itself, the extension API updates on a monthly cadence, rolling out new features with every release. Keep up with Lens and the Lens Extension API by reviewing the release notes .","title":"What's New"},{"locationLine truncated
|
||||
Binary file not shown.
Reference in new issue
Block a user