Browse Source

Add realm docs

gh-pages
Kegan Dougal 8 years ago
parent
commit
be918629f5
  1. 4
      pkg/github.com/index.html
  2. 10
      pkg/github.com/matrix-org/go-neb/api/handlers/index.html
  3. 20
      pkg/github.com/matrix-org/go-neb/api/index.html
  4. 4
      pkg/github.com/matrix-org/go-neb/index.html
  5. 23
      pkg/github.com/matrix-org/go-neb/matrix/index.html
  6. 204
      pkg/github.com/matrix-org/go-neb/realms/github/index.html
  7. 4
      pkg/github.com/matrix-org/go-neb/realms/index.html
  8. 266
      pkg/github.com/matrix-org/go-neb/realms/jira/index.html
  9. 6
      pkg/github.com/matrix-org/go-neb/services/echo/index.html
  10. 10
      pkg/github.com/matrix-org/go-neb/services/giphy/index.html
  11. 31
      pkg/github.com/matrix-org/go-neb/services/github/index.html
  12. 10
      pkg/github.com/matrix-org/go-neb/services/guggy/index.html
  13. 20
      pkg/github.com/matrix-org/go-neb/services/jira/index.html
  14. 18
      pkg/github.com/matrix-org/go-neb/services/jira/webhook/index.html
  15. 10
      pkg/github.com/matrix-org/go-neb/services/rssbot/index.html
  16. 42
      pkg/github.com/matrix-org/go-neb/types/index.html
  17. 4
      pkg/github.com/matrix-org/index.html

4
pkg/github.com/index.html

@ -872,7 +872,7 @@
<a href="matrix-org/go-neb/realms/github/index.html">github</a> <a href="matrix-org/go-neb/realms/github/index.html">github</a>
</td> </td>
<td class="pkg-synopsis"> <td class="pkg-synopsis">
Package github implements OAuth2 support for github.com
</td> </td>
</tr> </tr>
@ -883,7 +883,7 @@
<a href="matrix-org/go-neb/realms/jira/index.html">jira</a> <a href="matrix-org/go-neb/realms/jira/index.html">jira</a>
</td> </td>
<td class="pkg-synopsis"> <td class="pkg-synopsis">
Package jira implements OAuth1.0a support for arbitrary JIRA installations.
</td> </td>
</tr> </tr>

10
pkg/github.com/matrix-org/go-neb/api/handlers/index.html

@ -398,7 +398,7 @@ Response:
<h2 id="ConfigureService">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=491:666#L10">ConfigureService</a></h2>
<h2 id="ConfigureService">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=537:712#L12">ConfigureService</a></h2>
<pre>type ConfigureService struct { <pre>type ConfigureService struct {
<span class="comment">// contains filtered or unexported fields</span> <span class="comment">// contains filtered or unexported fields</span>
}</pre> }</pre>
@ -417,7 +417,7 @@ ConfigureService represents an HTTP handler which can process /admin/configureSe
<h3 id="NewConfigureService">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=730:822#L18">NewConfigureService</a></h3>
<h3 id="NewConfigureService">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=776:868#L20">NewConfigureService</a></h3>
<pre>func NewConfigureService(db *<a href="../../database/index.html">database</a>.<a href="../../database/index.html#ServiceDB">ServiceDB</a>, clients *<a href="../../clients/index.html">clients</a>.<a href="../../clients/index.html#Clients">Clients</a>) *<a href="index.html#ConfigureService">ConfigureService</a></pre> <pre>func NewConfigureService(db *<a href="../../database/index.html">database</a>.<a href="../../database/index.html#ServiceDB">ServiceDB</a>, clients *<a href="../../clients/index.html">clients</a>.<a href="../../clients/index.html#Clients">Clients</a>) *<a href="index.html#ConfigureService">ConfigureService</a></pre>
<p> <p>
NewConfigureService creates a new ConfigureService handler NewConfigureService creates a new ConfigureService handler
@ -429,7 +429,7 @@ NewConfigureService creates a new ConfigureService handler
<h3 id="ConfigureService.OnIncomingRequest">func (*ConfigureService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=2327:2423#L66">OnIncomingRequest</a></h3>
<h3 id="ConfigureService.OnIncomingRequest">func (*ConfigureService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=2373:2469#L68">OnIncomingRequest</a></h3>
<pre>func (s *<a href="index.html#ConfigureService">ConfigureService</a>) OnIncomingRequest(req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>) (interface{}, *<a href="../../errors/index.html">errors</a>.<a href="../../errors/index.html#HTTPError">HTTPError</a>)</pre> <pre>func (s *<a href="index.html#ConfigureService">ConfigureService</a>) OnIncomingRequest(req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>) (interface{}, *<a href="../../errors/index.html">errors</a>.<a href="../../errors/index.html#HTTPError">HTTPError</a>)</pre>
<p> <p>
OnIncomingRequest handles POST requests to /admin/configureService. OnIncomingRequest handles POST requests to /admin/configureService.
@ -473,7 +473,7 @@ Response:
<h2 id="GetService">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=4884:4934#L145">GetService</a></h2>
<h2 id="GetService">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=5053:5103#L151">GetService</a></h2>
<pre>type GetService struct { <pre>type GetService struct {
Db *<a href="../../database/index.html">database</a>.<a href="../../database/index.html#ServiceDB">ServiceDB</a> Db *<a href="../../database/index.html">database</a>.<a href="../../database/index.html#ServiceDB">ServiceDB</a>
}</pre> }</pre>
@ -494,7 +494,7 @@ GetService represents an HTTP handler which can process /admin/getService reques
<h3 id="GetService.OnIncomingRequest">func (*GetService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=5376:5466#L168">OnIncomingRequest</a></h3>
<h3 id="GetService.OnIncomingRequest">func (*GetService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/handlers/service.go?s=5545:5635#L174">OnIncomingRequest</a></h3>
<pre>func (h *<a href="index.html#GetService">GetService</a>) OnIncomingRequest(req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>) (interface{}, *<a href="../../errors/index.html">errors</a>.<a href="../../errors/index.html#HTTPError">HTTPError</a>)</pre> <pre>func (h *<a href="index.html#GetService">GetService</a>) OnIncomingRequest(req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>) (interface{}, *<a href="../../errors/index.html">errors</a>.<a href="../../errors/index.html#HTTPError">HTTPError</a>)</pre>
<p> <p>
OnIncomingRequest handles POST requests to /admin/getService. OnIncomingRequest handles POST requests to /admin/getService.

20
pkg/github.com/matrix-org/go-neb/api/index.html

@ -226,7 +226,7 @@ Package &#34;api.handlers&#34; for information on the HTTP API calls.
<h2 id="ClientConfig">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=2222:3382#L47">ClientConfig</a></h2>
<h2 id="ClientConfig">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=2222:3414#L47">ClientConfig</a></h2>
<pre>type ClientConfig struct { <pre>type ClientConfig struct {
<span class="comment">// The matrix User ID to connect with. E.g. @alice:matrix.org</span> <span class="comment">// The matrix User ID to connect with. E.g. @alice:matrix.org</span>
UserID <a href="../../../../builtin/index.html#string">string</a> UserID <a href="../../../../builtin/index.html#string">string</a>
@ -234,8 +234,8 @@ Package &#34;api.handlers&#34; for information on the HTTP API calls.
HomeserverURL <a href="../../../../builtin/index.html#string">string</a> HomeserverURL <a href="../../../../builtin/index.html#string">string</a>
<span class="comment">// The matrix access token to authenticate the requests with.</span> <span class="comment">// The matrix access token to authenticate the requests with.</span>
AccessToken <a href="../../../../builtin/index.html#string">string</a> AccessToken <a href="../../../../builtin/index.html#string">string</a>
<span class="comment">// True to start a sync stream for this user. If false, no /sync goroutine will be</span>
<span class="comment">// created and this client won&#39;t listen for new events from Matrix. For services</span>
<span class="comment">// True to start a sync stream for this user, making this a &#34;syncing client&#34;. If false, no</span>
<span class="comment">// /sync goroutine will be created and this client won&#39;t listen for new events from Matrix. For services</span>
<span class="comment">// which only SEND events into Matrix, it may be desirable to set Sync to false to reduce the</span> <span class="comment">// which only SEND events into Matrix, it may be desirable to set Sync to false to reduce the</span>
<span class="comment">// number of goroutines Go-NEB has to maintain. For services which respond to !commands,</span> <span class="comment">// number of goroutines Go-NEB has to maintain. For services which respond to !commands,</span>
<span class="comment">// Sync MUST be set to true in order to receive those commands.</span> <span class="comment">// Sync MUST be set to true in order to receive those commands.</span>
@ -266,7 +266,7 @@ Go-NEB can drive it. It forms the HTTP body to /configureClient requests.
<h3 id="ClientConfig.Check">func (*ClientConfig) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=4651:4687#L111">Check</a></h3>
<h3 id="ClientConfig.Check">func (*ClientConfig) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=4683:4719#L111">Check</a></h3>
<pre>func (c *<a href="index.html#ClientConfig">ClientConfig</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre> <pre>func (c *<a href="index.html#ClientConfig">ClientConfig</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Check that the client has supplied the correct fields. Check that the client has supplied the correct fields.
@ -279,7 +279,7 @@ Check that the client has supplied the correct fields.
<h2 id="ConfigFile">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=3672:3817#L79">ConfigFile</a></h2>
<h2 id="ConfigFile">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=3704:3849#L79">ConfigFile</a></h2>
<pre>type ConfigFile struct { <pre>type ConfigFile struct {
Clients []<a href="index.html#ClientConfig">ClientConfig</a> Clients []<a href="index.html#ClientConfig">ClientConfig</a>
Realms []<a href="index.html#ConfigureAuthRealmRequest">ConfigureAuthRealmRequest</a> Realms []<a href="index.html#ConfigureAuthRealmRequest">ConfigureAuthRealmRequest</a>
@ -333,7 +333,7 @@ ConfigureAuthRealmRequest is a request to /configureAuthRealm
<h3 id="ConfigureAuthRealmRequest.Check">func (*ConfigureAuthRealmRequest) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=4137:4186#L95">Check</a></h3>
<h3 id="ConfigureAuthRealmRequest.Check">func (*ConfigureAuthRealmRequest) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=4169:4218#L95">Check</a></h3>
<pre>func (c *<a href="index.html#ConfigureAuthRealmRequest">ConfigureAuthRealmRequest</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre> <pre>func (c *<a href="index.html#ConfigureAuthRealmRequest">ConfigureAuthRealmRequest</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Check validates the /configureAuthRealm request Check validates the /configureAuthRealm request
@ -377,7 +377,7 @@ ConfigureServiceRequest is a request to /configureService
<h3 id="ConfigureServiceRequest.Check">func (*ConfigureServiceRequest) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=3868:3915#L87">Check</a></h3>
<h3 id="ConfigureServiceRequest.Check">func (*ConfigureServiceRequest) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=3900:3947#L87">Check</a></h3>
<pre>func (c *<a href="index.html#ConfigureServiceRequest">ConfigureServiceRequest</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre> <pre>func (c *<a href="index.html#ConfigureServiceRequest">ConfigureServiceRequest</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Check validates the /configureService request Check validates the /configureService request
@ -417,7 +417,7 @@ RequestAuthSessionRequest is a request to /requestAuthSession
<h3 id="RequestAuthSessionRequest.Check">func (*RequestAuthSessionRequest) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=4971:5020#L122">Check</a></h3>
<h3 id="RequestAuthSessionRequest.Check">func (*RequestAuthSessionRequest) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=5003:5052#L122">Check</a></h3>
<pre>func (r *<a href="index.html#RequestAuthSessionRequest">RequestAuthSessionRequest</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre> <pre>func (r *<a href="index.html#RequestAuthSessionRequest">RequestAuthSessionRequest</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Check that the request is valid. Check that the request is valid.
@ -430,7 +430,7 @@ Check that the request is valid.
<h2 id="Session">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=3522:3626#L71">Session</a></h2>
<h2 id="Session">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=3554:3658#L71">Session</a></h2>
<pre>type Session struct { <pre>type Session struct {
SessionID <a href="../../../../builtin/index.html#string">string</a> SessionID <a href="../../../../builtin/index.html#string">string</a>
RealmID <a href="../../../../builtin/index.html#string">string</a> RealmID <a href="../../../../builtin/index.html#string">string</a>
@ -455,7 +455,7 @@ They are created for use with ConfigFile.
<h3 id="Session.Check">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=4372:4403#L103">Check</a></h3>
<h3 id="Session.Check">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/api/api.go?s=4404:4435#L103">Check</a></h3>
<pre>func (c *<a href="index.html#Session">Session</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre> <pre>func (c *<a href="index.html#Session">Session</a>) Check() <a href="../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Check validates the session config request Check validates the session config request

4
pkg/github.com/matrix-org/go-neb/index.html

@ -204,7 +204,7 @@
<a href="realms/github/index.html">github</a> <a href="realms/github/index.html">github</a>
</td> </td>
<td class="pkg-synopsis"> <td class="pkg-synopsis">
Package github implements OAuth2 support for github.com
</td> </td>
</tr> </tr>
@ -215,7 +215,7 @@
<a href="realms/jira/index.html">jira</a> <a href="realms/jira/index.html">jira</a>
</td> </td>
<td class="pkg-synopsis"> <td class="pkg-synopsis">
Package jira implements OAuth1.0a support for arbitrary JIRA installations.
</td> </td>
</tr> </tr>

23
pkg/github.com/matrix-org/go-neb/matrix/index.html

@ -298,7 +298,7 @@ processing goroutine.
<h2 id="Client">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=1645:2042#L39">Client</a></h2>
<h2 id="Client">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=1682:2113#L41">Client</a></h2>
<pre>type Client struct { <pre>type Client struct {
HomeserverURL *<a href="../../../../net/url/index.html">url</a>.<a href="../../../../net/url/index.html#URL">URL</a> HomeserverURL *<a href="../../../../net/url/index.html">url</a>.<a href="../../../../net/url/index.html#URL">URL</a>
Prefix <a href="../../../../builtin/index.html#string">string</a> Prefix <a href="../../../../builtin/index.html#string">string</a>
@ -308,6 +308,7 @@ processing goroutine.
Worker *<a href="index.html#Worker">Worker</a> Worker *<a href="index.html#Worker">Worker</a>
NextBatchStorer <a href="index.html#NextBatchStorer">NextBatchStorer</a> NextBatchStorer <a href="index.html#NextBatchStorer">NextBatchStorer</a>
ClientConfig <a href="../api/index.html">api</a>.<a href="../api/index.html#ClientConfig">ClientConfig</a>
<span class="comment">// contains filtered or unexported fields</span> <span class="comment">// contains filtered or unexported fields</span>
}</pre> }</pre>
<p> <p>
@ -325,7 +326,7 @@ Client represents a Matrix client.
<h3 id="NewClient">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=13235:13334#L414">NewClient</a></h3>
<h3 id="NewClient">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=13306:13405#L417">NewClient</a></h3>
<pre>func NewClient(httpClient *<a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#Client">Client</a>, homeserverURL *<a href="../../../../net/url/index.html">url</a>.<a href="../../../../net/url/index.html#URL">URL</a>, accessToken, userID <a href="../../../../builtin/index.html#string">string</a>) *<a href="index.html#Client">Client</a></pre> <pre>func NewClient(httpClient *<a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#Client">Client</a>, homeserverURL *<a href="../../../../net/url/index.html">url</a>.<a href="../../../../net/url/index.html#URL">URL</a>, accessToken, userID <a href="../../../../builtin/index.html#string">string</a>) *<a href="index.html#Client">Client</a></pre>
<p> <p>
NewClient creates a new Matrix Client ready for syncing NewClient creates a new Matrix Client ready for syncing
@ -337,7 +338,7 @@ NewClient creates a new Matrix Client ready for syncing
<h3 id="Client.JoinRoom">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=3187:3280#L86">JoinRoom</a></h3>
<h3 id="Client.JoinRoom">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=3258:3351#L89">JoinRoom</a></h3>
<pre>func (cli *<a href="index.html#Client">Client</a>) JoinRoom(roomIDorAlias, serverName, invitingUserID <a href="../../../../builtin/index.html#string">string</a>) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre> <pre>func (cli *<a href="index.html#Client">Client</a>) JoinRoom(roomIDorAlias, serverName, invitingUserID <a href="../../../../builtin/index.html#string">string</a>) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre>
<p> <p>
JoinRoom joins the client to a room ID or alias. If serverName is specified, this will be added as a query param JoinRoom joins the client to a room ID or alias. If serverName is specified, this will be added as a query param
@ -350,7 +351,7 @@ inserted into the content of the join request. Returns a room ID.
<h3 id="Client.SendMessageEvent">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=4377:4486#L124">SendMessageEvent</a></h3>
<h3 id="Client.SendMessageEvent">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=4448:4557#L127">SendMessageEvent</a></h3>
<pre>func (cli *<a href="index.html#Client">Client</a>) SendMessageEvent(roomID <a href="../../../../builtin/index.html#string">string</a>, eventType <a href="../../../../builtin/index.html#string">string</a>, contentJSON interface{}) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre> <pre>func (cli *<a href="index.html#Client">Client</a>) SendMessageEvent(roomID <a href="../../../../builtin/index.html#string">string</a>, eventType <a href="../../../../builtin/index.html#string">string</a>, contentJSON interface{}) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre>
<p> <p>
SendMessageEvent sends a message event into a room, returning the event_id on success. SendMessageEvent sends a message event into a room, returning the event_id on success.
@ -362,7 +363,7 @@ contentJSON should be a pointer to something that can be encoded as JSON using j
<h3 id="Client.SendText">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=4979:5043#L139">SendText</a></h3>
<h3 id="Client.SendText">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=5050:5114#L142">SendText</a></h3>
<pre>func (cli *<a href="index.html#Client">Client</a>) SendText(roomID, text <a href="../../../../builtin/index.html#string">string</a>) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre> <pre>func (cli *<a href="index.html#Client">Client</a>) SendText(roomID, text <a href="../../../../builtin/index.html#string">string</a>) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre>
<p> <p>
SendText sends an m.room.message event into the given room with a msgtype of m.text SendText sends an m.room.message event into the given room with a msgtype of m.text
@ -373,7 +374,7 @@ SendText sends an m.room.message event into the given room with a msgtype of m.t
<h3 id="Client.SetDisplayName">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=3934:3993#L113">SetDisplayName</a></h3>
<h3 id="Client.SetDisplayName">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=4005:4064#L116">SetDisplayName</a></h3>
<pre>func (cli *<a href="index.html#Client">Client</a>) SetDisplayName(displayName <a href="../../../../builtin/index.html#string">string</a>) <a href="../../../../builtin/index.html#error">error</a></pre> <pre>func (cli *<a href="index.html#Client">Client</a>) SetDisplayName(displayName <a href="../../../../builtin/index.html#string">string</a>) <a href="../../../../builtin/index.html#error">error</a></pre>
<p> <p>
SetDisplayName sets the user&#39;s profile display name SetDisplayName sets the user&#39;s profile display name
@ -384,7 +385,7 @@ SetDisplayName sets the user&#39;s profile display name
<h3 id="Client.StopSync">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=10684:10713#L316">StopSync</a></h3>
<h3 id="Client.StopSync">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=10755:10784#L319">StopSync</a></h3>
<pre>func (cli *<a href="index.html#Client">Client</a>) StopSync()</pre> <pre>func (cli *<a href="index.html#Client">Client</a>) StopSync()</pre>
<p> <p>
StopSync stops the ongoing sync started by Sync. StopSync stops the ongoing sync started by Sync.
@ -395,7 +396,7 @@ StopSync stops the ongoing sync started by Sync.
<h3 id="Client.Sync">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=6578:6603#L189">Sync</a></h3>
<h3 id="Client.Sync">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=6649:6674#L192">Sync</a></h3>
<pre>func (cli *<a href="index.html#Client">Client</a>) Sync()</pre> <pre>func (cli *<a href="index.html#Client">Client</a>) Sync()</pre>
<p> <p>
Sync starts syncing with the provided Homeserver. This function will be invoked continually. Sync starts syncing with the provided Homeserver. This function will be invoked continually.
@ -407,7 +408,7 @@ If Sync is called twice then the first sync will be stopped.
<h3 id="Client.UploadLink">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=5198:5256#L145">UploadLink</a></h3>
<h3 id="Client.UploadLink">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=5269:5327#L148">UploadLink</a></h3>
<pre>func (cli *<a href="index.html#Client">Client</a>) UploadLink(link <a href="../../../../builtin/index.html#string">string</a>) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre> <pre>func (cli *<a href="index.html#Client">Client</a>) UploadLink(link <a href="../../../../builtin/index.html#string">string</a>) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre>
<p> <p>
UploadLink uploads an HTTP URL and then returns an MXC URI. UploadLink uploads an HTTP URL and then returns an MXC URI.
@ -418,7 +419,7 @@ UploadLink uploads an HTTP URL and then returns an MXC URI.
<h3 id="Client.UploadToContentRepo">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=5562:5676#L157">UploadToContentRepo</a></h3>
<h3 id="Client.UploadToContentRepo">func (*Client) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=5633:5747#L160">UploadToContentRepo</a></h3>
<pre>func (cli *<a href="index.html#Client">Client</a>) UploadToContentRepo(content <a href="../../../../io/index.html">io</a>.<a href="../../../../io/index.html#Reader">Reader</a>, contentType <a href="../../../../builtin/index.html#string">string</a>, contentLength <a href="../../../../builtin/index.html#int64">int64</a>) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre> <pre>func (cli *<a href="index.html#Client">Client</a>) UploadToContentRepo(content <a href="../../../../io/index.html">io</a>.<a href="../../../../io/index.html#Reader">Reader</a>, contentType <a href="../../../../builtin/index.html#string">string</a>, contentLength <a href="../../../../builtin/index.html#int64">int64</a>) (<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre>
<p> <p>
UploadToContentRepo uploads the given bytes to the content repository and returns an MXC URI. UploadToContentRepo uploads the given bytes to the content repository and returns an MXC URI.
@ -573,7 +574,7 @@ ImageMessage is an m.image event
<h2 id="NextBatchStorer">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=1130:1372#L25">NextBatchStorer</a></h2>
<h2 id="NextBatchStorer">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/matrix/matrix.go?s=1167:1409#L27">NextBatchStorer</a></h2>
<pre>type NextBatchStorer interface { <pre>type NextBatchStorer interface {
<span class="comment">// Save a next_batch token for a given user. Best effort.</span> <span class="comment">// Save a next_batch token for a given user. Best effort.</span>
Save(userID, nextBatch <a href="../../../../builtin/index.html#string">string</a>) Save(userID, nextBatch <a href="../../../../builtin/index.html#string">string</a>)

204
pkg/github.com/matrix-org/go-neb/realms/github/index.html

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#375EAB"> <meta name="theme-color" content="#375EAB">
<title>realms - The Go Programming Language</title>
<title>github - The Go Programming Language</title>
<link type="text/css" rel="stylesheet" href="../../../../../../lib/godoc/style.css"> <link type="text/css" rel="stylesheet" href="../../../../../../lib/godoc/style.css">
@ -42,7 +42,7 @@
<div class="container"> <div class="container">
<h1>Package realms</h1>
<h1>Package github</h1>
@ -87,7 +87,10 @@
</div> </div>
<div class="expanded"> <div class="expanded">
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2> <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
<p>
Package github implements OAuth2 support for github.com
</p>
</div> </div>
</div> </div>
@ -103,53 +106,65 @@
<div id="manual-nav"> <div id="manual-nav">
<dl> <dl>
<dd><a href="index.html#pkg-constants">Constants</a></dd>
<dd><a href="index.html#AuthRequest">type AuthRequest</a></dd>
<dd><a href="index.html#AuthResponse">type AuthResponse</a></dd>
<dd><a href="index.html#GithubRealm">type GithubRealm</a></dd>
<dd><a href="index.html#Realm">type Realm</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubRealm.AuthSession">func (r *GithubRealm) AuthSession(id, userID, realmID string) types.AuthSession</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.AuthSession">func (r *Realm) AuthSession(id, userID, realmID string) types.AuthSession</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubRealm.ID">func (r *GithubRealm) ID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.ID">func (r *Realm) ID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubRealm.Init">func (r *GithubRealm) Init() error</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.Init">func (r *Realm) Init() error</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubRealm.OnReceiveRedirect">func (r *GithubRealm) OnReceiveRedirect(w http.ResponseWriter, req *http.Request)</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.OnReceiveRedirect">func (r *Realm) OnReceiveRedirect(w http.ResponseWriter, req *http.Request)</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubRealm.Register">func (r *GithubRealm) Register() error</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.Register">func (r *Realm) Register() error</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubRealm.RequestAuthSession">func (r *GithubRealm) RequestAuthSession(userID string, req json.RawMessage) interface{}</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.RequestAuthSession">func (r *Realm) RequestAuthSession(userID string, req json.RawMessage) interface{}</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubRealm.Type">func (r *GithubRealm) Type() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.Type">func (r *Realm) Type() string</a></dd>
<dd><a href="index.html#GithubSession">type GithubSession</a></dd>
<dd><a href="index.html#Session">type Session</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubSession.Authenticated">func (s *GithubSession) Authenticated() bool</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.Authenticated">func (s *Session) Authenticated() bool</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubSession.ID">func (s *GithubSession) ID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.ID">func (s *Session) ID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubSession.Info">func (s *GithubSession) Info() interface{}</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.Info">func (s *Session) Info() interface{}</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubSession.RealmID">func (s *GithubSession) RealmID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.RealmID">func (s *Session) RealmID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#GithubSession.UserID">func (s *GithubSession) UserID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.UserID">func (s *Session) UserID() string</a></dd>
@ -209,21 +224,90 @@
</div> <!-- #pkg-callgraph --> </div> <!-- #pkg-callgraph -->
<h2 id="pkg-constants">Constants</h2>
<pre>const <span id="RealmType">RealmType</span> = &#34;github&#34;</pre>
<p>
RealmType of the Github Realm
</p>
<h2 id="AuthRequest">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=1397:1503#L46">AuthRequest</a></h2>
<pre>type AuthRequest struct {
<span class="comment">// Optional. The URL to redirect to after authentication.</span>
RedirectURL <a href="../../../../../builtin/index.html#string">string</a>
}</pre>
<p>
AuthRequest is a request for authenticating with github.com
</p>
<h2 id="AuthResponse">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=1554:1646#L52">AuthResponse</a></h2>
<pre>type AuthResponse struct {
<span class="comment">// The URL to visit to perform OAuth on github.com</span>
URL <a href="../../../../../builtin/index.html#string">string</a>
}</pre>
<p>
AuthResponse is a response to an AuthRequest.
</p>
<h2 id="GithubRealm">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=376:508#L8">GithubRealm</a></h2>
<pre>type GithubRealm struct {
<h2 id="Realm">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=609:897#L19">Realm</a></h2>
<pre>type Realm struct {
<span class="comment">// The client secret for this Github application.</span>
ClientSecret <a href="../../../../../builtin/index.html#string">string</a> ClientSecret <a href="../../../../../builtin/index.html#string">string</a>
ClientID <a href="../../../../../builtin/index.html#string">string</a>
StarterLink <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// The client ID for this Github application.</span>
ClientID <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// Optional. The URL to redirect the client to after authentication.</span>
StarterLink <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// contains filtered or unexported fields</span> <span class="comment">// contains filtered or unexported fields</span>
}</pre> }</pre>
<p> <p>
GithubRealm can handle OAuth processes with github.com
Realm can handle OAuth processes with github.com
</p> </p>
<p>
Example request:
</p>
<pre>{
&#34;ClientSecret&#34;: &#34;YOUR_CLIENT_SECRET&#34;,
&#34;ClientID&#34;: &#34;YOUR_CLIENT_ID&#34;
}
</pre>
@ -238,10 +322,10 @@ GithubRealm can handle OAuth processes with github.com
<h3 id="GithubRealm.AuthSession">func (*GithubRealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=6752:6831#L233">AuthSession</a></h3>
<pre>func (r *<a href="index.html#GithubRealm">GithubRealm</a>) AuthSession(id, userID, realmID <a href="../../../../../builtin/index.html#string">string</a>) <a href="../../types/index.html">types</a>.<a href="../../types/index.html#AuthSession">AuthSession</a></pre>
<h3 id="Realm.AuthSession">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=7676:7749#L268">AuthSession</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) AuthSession(id, userID, realmID <a href="../../../../../builtin/index.html#string">string</a>) <a href="../../types/index.html">types</a>.<a href="../../types/index.html#AuthSession">AuthSession</a></pre>
<p> <p>
AuthSession returns a GithubSession for this user
AuthSession returns a Github Session for this user
</p> </p>
@ -249,8 +333,8 @@ AuthSession returns a GithubSession for this user
<h3 id="GithubRealm.ID">func (*GithubRealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2462:2495#L90">ID</a></h3>
<pre>func (r *<a href="index.html#GithubRealm">GithubRealm</a>) ID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Realm.ID">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=3121:3148#L118">ID</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) ID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
ID returns the realm ID ID returns the realm ID
</p> </p>
@ -260,8 +344,8 @@ ID returns the realm ID
<h3 id="GithubRealm.Init">func (*GithubRealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2612:2646#L100">Init</a></h3>
<pre>func (r *<a href="index.html#GithubRealm">GithubRealm</a>) Init() <a href="../../../../../builtin/index.html#error">error</a></pre>
<h3 id="Realm.Init">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=3260:3288#L128">Init</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) Init() <a href="../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Init does nothing. Init does nothing.
</p> </p>
@ -271,8 +355,8 @@ Init does nothing.
<h3 id="GithubRealm.OnReceiveRedirect">func (*GithubRealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=4179:4260#L157">OnReceiveRedirect</a></h3>
<pre>func (r *<a href="index.html#GithubRealm">GithubRealm</a>) OnReceiveRedirect(w <a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>)</pre>
<h3 id="Realm.OnReceiveRedirect">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=5126:5201#L192">OnReceiveRedirect</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) OnReceiveRedirect(w <a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>)</pre>
<p> <p>
OnReceiveRedirect processes OAuth redirect requests from Github OnReceiveRedirect processes OAuth redirect requests from Github
</p> </p>
@ -282,8 +366,8 @@ OnReceiveRedirect processes OAuth redirect requests from Github
<h3 id="GithubRealm.Register">func (*GithubRealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2690:2728#L105">Register</a></h3>
<pre>func (r *<a href="index.html#GithubRealm">GithubRealm</a>) Register() <a href="../../../../../builtin/index.html#error">error</a></pre>
<h3 id="Realm.Register">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=3332:3364#L133">Register</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) Register() <a href="../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Register does nothing. Register does nothing.
</p> </p>
@ -293,19 +377,34 @@ Register does nothing.
<h3 id="GithubRealm.RequestAuthSession">func (*GithubRealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2831:2919#L110">RequestAuthSession</a></h3>
<pre>func (r *<a href="index.html#GithubRealm">GithubRealm</a>) RequestAuthSession(userID <a href="../../../../../builtin/index.html#string">string</a>, req <a href="../../../../../encoding/json/index.html">json</a>.<a href="../../../../../encoding/json/index.html#RawMessage">RawMessage</a>) interface{}</pre>
<h3 id="Realm.RequestAuthSession">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=3823:3905#L149">RequestAuthSession</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) RequestAuthSession(userID <a href="../../../../../builtin/index.html#string">string</a>, req <a href="../../../../../encoding/json/index.html">json</a>.<a href="../../../../../encoding/json/index.html#RawMessage">RawMessage</a>) interface{}</pre>
<p> <p>
RequestAuthSession generates an OAuth2 URL for this user to auth with github via. RequestAuthSession generates an OAuth2 URL for this user to auth with github via.
The request body is of type &#34;github.AuthRequest&#34;. The response is of type &#34;github.AuthResponse&#34;.
</p>
<p>
Request example:
</p> </p>
<pre>{
&#34;RedirectURL&#34;: &#34;<a href="https://optional-url.com/to/redirect/to/after/auth">https://optional-url.com/to/redirect/to/after/auth</a>&#34;
}
</pre>
<p>
Response example:
</p>
<pre>{
&#34;URL&#34;: &#34;<a href="https://github.com/login/oauth/authorize?client_id=abcdef&amp;client_secret=acascacac">https://github.com/login/oauth/authorize?client_id=abcdef&amp;client_secret=acascacac</a>....&#34;
}
</pre>
<h3 id="GithubRealm.Type">func (*GithubRealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2532:2567#L95">Type</a></h3>
<pre>func (r *<a href="index.html#GithubRealm">GithubRealm</a>) Type() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Realm.Type">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=3185:3214#L123">Type</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) Type() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
Type is github Type is github
</p> </p>
@ -317,18 +416,19 @@ Type is github
<h2 id="GithubSession">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=570:945#L17">GithubSession</a></h2>
<pre>type GithubSession struct {
<span class="comment">// The client-supplied URL to redirect them to after the auth process is complete.</span>
ClientsRedirectURL <a href="../../../../../builtin/index.html#string">string</a>
<h2 id="Session">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=953:1332#L32">Session</a></h2>
<pre>type Session struct {
<span class="comment">// AccessToken is the github access token for the user</span> <span class="comment">// AccessToken is the github access token for the user</span>
AccessToken <a href="../../../../../builtin/index.html#string">string</a> AccessToken <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// Scopes are the set of *ALLOWED* scopes (which may not be the same as the requested scopes)</span> <span class="comment">// Scopes are the set of *ALLOWED* scopes (which may not be the same as the requested scopes)</span>
Scopes <a href="../../../../../builtin/index.html#string">string</a> Scopes <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// Optional. The client-supplied URL to redirect them to after the auth process is complete.</span>
ClientsRedirectURL <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// contains filtered or unexported fields</span> <span class="comment">// contains filtered or unexported fields</span>
}</pre> }</pre>
<p> <p>
GithubSession represents an authenticated github session
Session represents an authenticated github session
</p> </p>
@ -344,8 +444,8 @@ GithubSession represents an authenticated github session
<h3 id="GithubSession.Authenticated">func (*GithubSession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=1020:1064#L30">Authenticated</a></h3>
<pre>func (s *<a href="index.html#GithubSession">GithubSession</a>) Authenticated() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
<h3 id="Session.Authenticated">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=1721:1759#L58">Authenticated</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) Authenticated() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
<p> <p>
Authenticated returns true if the user has completed the auth process Authenticated returns true if the user has completed the auth process
</p> </p>
@ -355,8 +455,8 @@ Authenticated returns true if the user has completed the auth process
<h3 id="GithubSession.ID">func (*GithubSession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2381:2416#L85">ID</a></h3>
<pre>func (s *<a href="index.html#GithubSession">GithubSession</a>) ID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Session.ID">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=3046:3075#L113">ID</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) ID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
ID returns the session ID ID returns the session ID
</p> </p>
@ -366,8 +466,8 @@ ID returns the session ID
<h3 id="GithubSession.Info">func (*GithubSession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=1184:1226#L35">Info</a></h3>
<pre>func (s *<a href="index.html#GithubSession">GithubSession</a>) Info() interface{}</pre>
<h3 id="Session.Info">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=1879:1915#L63">Info</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) Info() interface{}</pre>
<p> <p>
Info returns a list of possible repositories that this session can integrate with. Info returns a list of possible repositories that this session can integrate with.
</p> </p>
@ -377,8 +477,8 @@ Info returns a list of possible repositories that this session can integrate wit
<h3 id="GithubSession.RealmID">func (*GithubSession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2288:2328#L80">RealmID</a></h3>
<pre>func (s *<a href="index.html#GithubSession">GithubSession</a>) RealmID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Session.RealmID">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2959:2993#L108">RealmID</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) RealmID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
RealmID returns the realm ID of the realm which performed the authentication RealmID returns the realm ID of the realm which performed the authentication
</p> </p>
@ -388,8 +488,8 @@ RealmID returns the realm ID of the realm which performed the authentication
<h3 id="GithubSession.UserID">func (*GithubSession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2146:2185#L75">UserID</a></h3>
<pre>func (s *<a href="index.html#GithubSession">GithubSession</a>) UserID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Session.UserID">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/github/github.go?s=2823:2856#L103">UserID</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) UserID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
UserID returns the user_id who authorised with Github UserID returns the user_id who authorised with Github
</p> </p>

4
pkg/github.com/matrix-org/go-neb/realms/index.html

@ -91,7 +91,7 @@
<a href="github/index.html">github</a> <a href="github/index.html">github</a>
</td> </td>
<td class="pkg-synopsis"> <td class="pkg-synopsis">
Package github implements OAuth2 support for github.com
</td> </td>
</tr> </tr>
@ -102,7 +102,7 @@
<a href="jira/index.html">jira</a> <a href="jira/index.html">jira</a>
</td> </td>
<td class="pkg-synopsis"> <td class="pkg-synopsis">
Package jira implements OAuth1.0a support for arbitrary JIRA installations.
</td> </td>
</tr> </tr>

266
pkg/github.com/matrix-org/go-neb/realms/jira/index.html

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#375EAB"> <meta name="theme-color" content="#375EAB">
<title>realms - The Go Programming Language</title>
<title>jira - The Go Programming Language</title>
<link type="text/css" rel="stylesheet" href="../../../../../../lib/godoc/style.css"> <link type="text/css" rel="stylesheet" href="../../../../../../lib/godoc/style.css">
@ -42,7 +42,7 @@
<div class="container"> <div class="container">
<h1>Package realms</h1>
<h1>Package jira</h1>
@ -89,7 +89,10 @@
</div> </div>
<div class="expanded"> <div class="expanded">
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2> <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
<p>
Package jira implements OAuth1.0a support for arbitrary JIRA installations.
</p>
</div> </div>
</div> </div>
@ -105,59 +108,71 @@
<div id="manual-nav"> <div id="manual-nav">
<dl> <dl>
<dd><a href="index.html#pkg-constants">Constants</a></dd>
<dd><a href="index.html#AuthRequest">type AuthRequest</a></dd>
<dd><a href="index.html#AuthResponse">type AuthResponse</a></dd>
<dd><a href="index.html#JIRARealm">type JIRARealm</a></dd>
<dd><a href="index.html#Realm">type Realm</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.AuthSession">func (r *JIRARealm) AuthSession(id, userID, realmID string) types.AuthSession</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.AuthSession">func (r *Realm) AuthSession(id, userID, realmID string) types.AuthSession</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.ID">func (r *JIRARealm) ID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.ID">func (r *Realm) ID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.Init">func (r *JIRARealm) Init() error</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.Init">func (r *Realm) Init() error</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.JIRAClient">func (r *JIRARealm) JIRAClient(userID string, allowUnauth bool) (*jira.Client, error)</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.JIRAClient">func (r *Realm) JIRAClient(userID string, allowUnauth bool) (*jira.Client, error)</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.OnReceiveRedirect">func (r *JIRARealm) OnReceiveRedirect(w http.ResponseWriter, req *http.Request)</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.OnReceiveRedirect">func (r *Realm) OnReceiveRedirect(w http.ResponseWriter, req *http.Request)</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.ProjectKeyExists">func (r *JIRARealm) ProjectKeyExists(userID, projectKey string) (bool, error)</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.ProjectKeyExists">func (r *Realm) ProjectKeyExists(userID, projectKey string) (bool, error)</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.Register">func (r *JIRARealm) Register() error</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.Register">func (r *Realm) Register() error</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.RequestAuthSession">func (r *JIRARealm) RequestAuthSession(userID string, req json.RawMessage) interface{}</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.RequestAuthSession">func (r *Realm) RequestAuthSession(userID string, req json.RawMessage) interface{}</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRARealm.Type">func (r *JIRARealm) Type() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Realm.Type">func (r *Realm) Type() string</a></dd>
<dd><a href="index.html#JIRASession">type JIRASession</a></dd>
<dd><a href="index.html#Session">type Session</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRASession.Authenticated">func (s *JIRASession) Authenticated() bool</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.Authenticated">func (s *Session) Authenticated() bool</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRASession.ID">func (s *JIRASession) ID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.ID">func (s *Session) ID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRASession.Info">func (s *JIRASession) Info() interface{}</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.Info">func (s *Session) Info() interface{}</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRASession.RealmID">func (s *JIRASession) RealmID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.RealmID">func (s *Session) RealmID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#JIRASession.UserID">func (s *JIRASession) UserID() string</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Session.UserID">func (s *Session) UserID() string</a></dd>
@ -217,28 +232,125 @@
</div> <!-- #pkg-callgraph --> </div> <!-- #pkg-callgraph -->
<h2 id="pkg-constants">Constants</h2>
<pre>const <span id="RealmType">RealmType</span> = &#34;jira&#34;</pre>
<p>
RealmType of the JIRA realm
</p>
<h2 id="AuthRequest">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=3573:3679#L92">AuthRequest</a></h2>
<pre>type AuthRequest struct {
<span class="comment">// Optional. The URL to redirect to after authentication.</span>
RedirectURL <a href="../../../../../builtin/index.html#string">string</a>
}</pre>
<p>
AuthRequest is a request for authenticating with JIRA
</p>
<h2 id="JIRARealm">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=467:944#L13">JIRARealm</a></h2>
<pre>type JIRARealm struct {
JIRAEndpoint <a href="../../../../../builtin/index.html#string">string</a>
Server <a href="../../../../../builtin/index.html#string">string</a> <span class="comment">// clobbered based on /serverInfo request</span>
Version <a href="../../../../../builtin/index.html#string">string</a> <span class="comment">// clobbered based on /serverInfo request</span>
ConsumerName <a href="../../../../../builtin/index.html#string">string</a>
ConsumerKey <a href="../../../../../builtin/index.html#string">string</a>
<h2 id="AuthResponse">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=3730:3835#L98">AuthResponse</a></h2>
<pre>type AuthResponse struct {
<span class="comment">// The URL to visit to perform OAuth on this JIRA installation.</span>
URL <a href="../../../../../builtin/index.html#string">string</a>
}</pre>
<p>
AuthResponse is a response to an AuthRequest.
</p>
<h2 id="Realm">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=971:2932#L27">Realm</a></h2>
<pre>type Realm struct {
<span class="comment">// The HTTPS URL of the JIRA installation to authenticate with.</span>
JIRAEndpoint <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// The desired &#34;Consumer Name&#34; field of the &#34;Application Links&#34; admin page on JIRA.</span>
<span class="comment">// Generally this is the name of the service. Users will need to enter this string</span>
<span class="comment">// into their JIRA admin web form.</span>
ConsumerName <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// The desired &#34;Consumer Key&#34; field of the &#34;Application Links&#34; admin page on JIRA.</span>
<span class="comment">// Generally this is the name of the service. Users will need to enter this string</span>
<span class="comment">// into their JIRA admin web form.</span>
ConsumerKey <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// The desired &#34;Consumer Secret&#34; field of the &#34;Application Links&#34; admin page on JIRA.</span>
<span class="comment">// This should be a random long string. Users will need to enter this string into</span>
<span class="comment">// their JIRA admin web form.</span>
ConsumerSecret <a href="../../../../../builtin/index.html#string">string</a> ConsumerSecret <a href="../../../../../builtin/index.html#string">string</a>
PublicKeyPEM <a href="../../../../../builtin/index.html#string">string</a> <span class="comment">// clobbered based on PrivateKeyPEM</span>
PrivateKeyPEM <a href="../../../../../builtin/index.html#string">string</a>
HasWebhook <a href="../../../../../builtin/index.html#bool">bool</a> <span class="comment">// clobbered based on NEB</span>
StarterLink <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// A string which contains the private key for performing OAuth 1.0 requests.</span>
<span class="comment">// This MUST be in PEM format. It must NOT have a password. Go-NEB will convert this</span>
<span class="comment">// into a public key in PEM format and return this to users. Users will need to enter</span>
<span class="comment">// the *public* key into their JIRA admin web form.</span>
<span class="comment">//</span>
<span class="comment">// To generate a private key PEM: (JIRA does not support bit lengths &gt;2048):</span>
<span class="comment">// $ openssl genrsa -out privkey.pem 2048</span>
<span class="comment">// $ cat privkey.pem</span>
PrivateKeyPEM <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// Optional. If supplied, !jira commands will return this link whenever someone is</span>
<span class="comment">// prompted to login to JIRA.</span>
StarterLink <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// The server name of the JIRA installation from /serverInfo.</span>
<span class="comment">// This is an informational field populated by Go-NEB post-creation.</span>
Server <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// The JIRA version string from /serverInfo.</span>
<span class="comment">// This is an informational field populated by Go-NEB post-creation.</span>
Version <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// The public key for the given private key. This is populated by Go-NEB.</span>
PublicKeyPEM <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// Internal field. True if this realm has already registered a webhook with the JIRA installation.</span>
HasWebhook <a href="../../../../../builtin/index.html#bool">bool</a>
<span class="comment">// contains filtered or unexported fields</span> <span class="comment">// contains filtered or unexported fields</span>
}</pre> }</pre>
<p> <p>
JIRARealm is an AuthRealm which can process JIRA installations
Realm is an AuthRealm which can process JIRA installations.
</p>
<p>
Example request:
</p> </p>
<pre>{
&#34;JIRAEndpoint&#34;: &#34;matrix.org/jira/&#34;,
&#34;ConsumerName&#34;: &#34;goneb&#34;,
&#34;ConsumerKey&#34;: &#34;goneb&#34;,
&#34;ConsumerSecret&#34;: &#34;random_long_string&#34;,
&#34;PrivateKeyPEM&#34;: &#34;-----BEGIN RSA PRIVATE KEY-----\r\nMIIEowIBAAKCAQEA39UhbOvQHEkBP9fGnhU+eSObTAwX9req2l1NiuNaPU9rE7tf6Bk\r\n-----END RSA PRIVATE KEY-----&#34;
}
</pre>
@ -253,8 +365,8 @@ JIRARealm is an AuthRealm which can process JIRA installations
<h3 id="JIRARealm.AuthSession">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=6730:6807#L223">AuthSession</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) AuthSession(id, userID, realmID <a href="../../../../../builtin/index.html#string">string</a>) <a href="../../types/index.html">types</a>.<a href="../../types/index.html#AuthSession">AuthSession</a></pre>
<h3 id="Realm.AuthSession">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=9437:9510#L291">AuthSession</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) AuthSession(id, userID, realmID <a href="../../../../../builtin/index.html#string">string</a>) <a href="../../types/index.html">types</a>.<a href="../../types/index.html#AuthSession">AuthSession</a></pre>
<p> <p>
AuthSession returns a JIRASession with the given parameters AuthSession returns a JIRASession with the given parameters
</p> </p>
@ -264,8 +376,8 @@ AuthSession returns a JIRASession with the given parameters
<h3 id="JIRARealm.ID">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=2075:2106#L68">ID</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) ID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Realm.ID">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=4526:4553#L130">ID</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) ID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
ID returns the ID of this JIRA realm. ID returns the ID of this JIRA realm.
</p> </p>
@ -275,8 +387,8 @@ ID returns the ID of this JIRA realm.
<h3 id="JIRARealm.Init">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=2279:2311#L78">Init</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) Init() <a href="../../../../../builtin/index.html#error">error</a></pre>
<h3 id="Realm.Init">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=4725:4753#L140">Init</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) Init() <a href="../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Init initialises the private key for this JIRA realm. Init initialises the private key for this JIRA realm.
</p> </p>
@ -286,8 +398,8 @@ Init initialises the private key for this JIRA realm.
<h3 id="JIRARealm.JIRAClient">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=8077:8162#L269">JIRAClient</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) JIRAClient(userID <a href="../../../../../builtin/index.html#string">string</a>, allowUnauth <a href="../../../../../builtin/index.html#bool">bool</a>) (*jira.<a href="index.html#Client">Client</a>, <a href="../../../../../builtin/index.html#error">error</a>)</pre>
<h3 id="Realm.JIRAClient">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=10772:10853#L337">JIRAClient</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) JIRAClient(userID <a href="../../../../../builtin/index.html#string">string</a>, allowUnauth <a href="../../../../../builtin/index.html#bool">bool</a>) (*<a href="../../../../andygrunwald/go-jira/index.html">jira</a>.<a href="../../../../andygrunwald/go-jira/index.html#Client">Client</a>, <a href="../../../../../builtin/index.html#error">error</a>)</pre>
<p> <p>
JIRAClient returns an authenticated jira.Client for the given userID. Returns an unauthenticated JIRAClient returns an authenticated jira.Client for the given userID. Returns an unauthenticated
client if allowUnauth is true and no authenticated session is found, else returns an error. client if allowUnauth is true and no authenticated session is found, else returns an error.
@ -298,8 +410,8 @@ client if allowUnauth is true and no authenticated session is found, else return
<h3 id="JIRARealm.OnReceiveRedirect">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=4893:4972#L167">OnReceiveRedirect</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) OnReceiveRedirect(w <a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>)</pre>
<h3 id="Realm.OnReceiveRedirect">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=7608:7683#L235">OnReceiveRedirect</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) OnReceiveRedirect(w <a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>)</pre>
<p> <p>
OnReceiveRedirect is called when JIRA installations redirect back to NEB OnReceiveRedirect is called when JIRA installations redirect back to NEB
</p> </p>
@ -309,8 +421,8 @@ OnReceiveRedirect is called when JIRA installations redirect back to NEB
<h3 id="JIRARealm.ProjectKeyExists">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=7154:7231#L235">ProjectKeyExists</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) ProjectKeyExists(userID, projectKey <a href="../../../../../builtin/index.html#string">string</a>) (<a href="../../../../../builtin/index.html#bool">bool</a>, <a href="../../../../../builtin/index.html#error">error</a>)</pre>
<h3 id="Realm.ProjectKeyExists">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=9853:9926#L303">ProjectKeyExists</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) ProjectKeyExists(userID, projectKey <a href="../../../../../builtin/index.html#string">string</a>) (<a href="../../../../../builtin/index.html#bool">bool</a>, <a href="../../../../../builtin/index.html#error">error</a>)</pre>
<p> <p>
ProjectKeyExists returns true if the given project key exists on this JIRA realm. ProjectKeyExists returns true if the given project key exists on this JIRA realm.
An authenticated client for userID will be used if one exists, else an An authenticated client for userID will be used if one exists, else an
@ -323,8 +435,8 @@ of projects.
<h3 id="JIRARealm.Register">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=2749:2785#L94">Register</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) Register() <a href="../../../../../builtin/index.html#error">error</a></pre>
<h3 id="Realm.Register">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=5191:5223#L156">Register</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) Register() <a href="../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Register is called when this realm is being created from an external entity Register is called when this realm is being created from an external entity
</p> </p>
@ -334,19 +446,34 @@ Register is called when this realm is being created from an external entity
<h3 id="JIRARealm.RequestAuthSession">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=3647:3733#L124">RequestAuthSession</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) RequestAuthSession(userID <a href="../../../../../builtin/index.html#string">string</a>, req <a href="../../../../../encoding/json/index.html">json</a>.<a href="../../../../../encoding/json/index.html#RawMessage">RawMessage</a>) interface{}</pre>
<h3 id="Realm.RequestAuthSession">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=6403:6485#L196">RequestAuthSession</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) RequestAuthSession(userID <a href="../../../../../builtin/index.html#string">string</a>, req <a href="../../../../../encoding/json/index.html">json</a>.<a href="../../../../../encoding/json/index.html#RawMessage">RawMessage</a>) interface{}</pre>
<p> <p>
RequestAuthSession is called by a user wishing to auth with this JIRA realm
RequestAuthSession is called by a user wishing to auth with this JIRA realm.
The request body is of type &#34;jira.AuthRequest&#34;. Returns a &#34;jira.AuthResponse&#34;.
</p> </p>
<p>
Request example:
</p>
<pre>{
&#34;RedirectURL&#34;: &#34;<a href="https://somewhere.somehow">https://somewhere.somehow</a>&#34;
}
</pre>
<p>
Response example:
</p>
<pre>{
&#34;URL&#34;: &#34;<a href="https://jira.somewhere.com/plugins/servlet/oauth/authorize?oauth_token=7yeuierbgweguiegrTbOT">https://jira.somewhere.com/plugins/servlet/oauth/authorize?oauth_token=7yeuierbgweguiegrTbOT</a>&#34;
}
</pre>
<h3 id="JIRARealm.Type">func (*JIRARealm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=2168:2201#L73">Type</a></h3>
<pre>func (r *<a href="index.html#JIRARealm">JIRARealm</a>) Type() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Realm.Type">func (*Realm) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=4615:4644#L135">Type</a></h3>
<pre>func (r *<a href="index.html#Realm">Realm</a>) Type() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
Type returns the type of realm this is. Type returns the type of realm this is.
</p> </p>
@ -358,16 +485,21 @@ Type returns the type of realm this is.
<h2 id="JIRASession">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=1085:1364#L31">JIRASession</a></h2>
<pre>type JIRASession struct {
RequestSecret <a href="../../../../../builtin/index.html#string">string</a>
AccessToken <a href="../../../../../builtin/index.html#string">string</a>
AccessSecret <a href="../../../../../builtin/index.html#string">string</a>
ClientsRedirectURL <a href="../../../../../builtin/index.html#string">string</a> <span class="comment">// where to redirect the client to after auth</span>
<h2 id="Session">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=3069:3514#L74">Session</a></h2>
<pre>type Session struct {
<span class="comment">// The secret obtained when requesting an authentication session with JIRA.</span>
RequestSecret <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// A JIRA access token for a Matrix user ID.</span>
AccessToken <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// A JIRA access secret for a Matrix user ID.</span>
AccessSecret <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// Optional. The URL to redirect the client to after authentication.</span>
ClientsRedirectURL <a href="../../../../../builtin/index.html#string">string</a>
<span class="comment">// contains filtered or unexported fields</span> <span class="comment">// contains filtered or unexported fields</span>
}</pre> }</pre>
<p> <p>
JIRASession represents a single authentication session between a user and a JIRA endpoint.
Session represents a single authentication session between a user and a JIRA endpoint.
The endpoint is dictated by the realm ID. The endpoint is dictated by the realm ID.
</p> </p>
@ -384,8 +516,8 @@ The endpoint is dictated by the realm ID.
<h3 id="JIRASession.Authenticated">func (*JIRASession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=1439:1481#L42">Authenticated</a></h3>
<pre>func (s *<a href="index.html#JIRASession">JIRASession</a>) Authenticated() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
<h3 id="Session.Authenticated">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=3910:3948#L104">Authenticated</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) Authenticated() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
<p> <p>
Authenticated returns true if the user has completed the auth process Authenticated returns true if the user has completed the auth process
</p> </p>
@ -395,8 +527,8 @@ Authenticated returns true if the user has completed the auth process
<h3 id="JIRASession.ID">func (*JIRASession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=1982:2015#L63">ID</a></h3>
<pre>func (s *<a href="index.html#JIRASession">JIRASession</a>) ID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Session.ID">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=4437:4466#L125">ID</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) ID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
ID returns the OAuth1 request_token which is used when looking up sessions in the redirect ID returns the OAuth1 request_token which is used when looking up sessions in the redirect
handler. handler.
@ -407,8 +539,8 @@ handler.
<h3 id="JIRASession.Info">func (*JIRASession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=1563:1603#L47">Info</a></h3>
<pre>func (s *<a href="index.html#JIRASession">JIRASession</a>) Info() interface{}</pre>
<h3 id="Session.Info">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=4030:4066#L109">Info</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) Info() interface{}</pre>
<p> <p>
Info returns nothing Info returns nothing
</p> </p>
@ -418,8 +550,8 @@ Info returns nothing
<h3 id="JIRASession.RealmID">func (*JIRASession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=1814:1852#L57">RealmID</a></h3>
<pre>func (s *<a href="index.html#JIRASession">JIRASession</a>) RealmID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Session.RealmID">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=4273:4307#L119">RealmID</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) RealmID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
RealmID returns the JIRA realm ID which created this session. RealmID returns the JIRA realm ID which created this session.
</p> </p>
@ -429,8 +561,8 @@ RealmID returns the JIRA realm ID which created this session.
<h3 id="JIRASession.UserID">func (*JIRASession) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=1689:1726#L52">UserID</a></h3>
<pre>func (s *<a href="index.html#JIRASession">JIRASession</a>) UserID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<h3 id="Session.UserID">func (*Session) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/realms/jira/jira.go?s=4152:4185#L114">UserID</a></h3>
<pre>func (s *<a href="index.html#Session">Session</a>) UserID() <a href="../../../../../builtin/index.html#string">string</a></pre>
<p> <p>
UserID returns the ID of the user performing the authentication. UserID returns the ID of the user performing the authentication.
</p> </p>

6
pkg/github.com/matrix-org/go-neb/services/echo/index.html

@ -116,7 +116,7 @@ Package echo implements a Service which echoes back !commands.
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (e *Service) Commands(cli *matrix.Client, roomID string) []types.Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (e *Service) Commands(cli *matrix.Client) []types.Command</a></dd>
@ -211,8 +211,8 @@ Service represents the Echo service. It has no Config fields.
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/echo/echo.go?s=449:526#L12">Commands</a></h3>
<pre>func (e *<a href="index.html#Service">Service</a>) Commands(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>, roomID <a href="../../../../../builtin/index.html#string">string</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/echo/echo.go?s=449:511#L12">Commands</a></h3>
<pre>func (e *<a href="index.html#Service">Service</a>) Commands(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<p> <p>
Commands supported: Commands supported:
</p> </p>

10
pkg/github.com/matrix-org/go-neb/services/giphy/index.html

@ -116,7 +116,7 @@ Package giphy implements a Service which adds !commands for Giphy.
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (s *Service) Commands(client *matrix.Client, roomID string) []types.Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (s *Service) Commands(client *matrix.Client) []types.Command</a></dd>
@ -190,7 +190,7 @@ ServiceType of the Giphy service.
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/giphy/giphy.go?s=809:999#L33">Service</a></h2>
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/giphy/giphy.go?s=817:1007#L33">Service</a></h2>
<pre>type Service struct { <pre>type Service struct {
<a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a> <a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a>
<span class="comment">// The Giphy API key to use when making HTTP requests to Giphy.</span> <span class="comment">// The Giphy API key to use when making HTTP requests to Giphy.</span>
@ -201,7 +201,7 @@ ServiceType of the Giphy service.
Service contains the Config fields for the Giphy Service. Service contains the Config fields for the Giphy Service.
</p> </p>
<p> <p>
Example:
Example request:
</p> </p>
<pre>{ <pre>{
&#34;api_key&#34;: &#34;dc6zaTOxFJmzC&#34; &#34;api_key&#34;: &#34;dc6zaTOxFJmzC&#34;
@ -221,8 +221,8 @@ Example:
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/giphy/giphy.go?s=1136:1216#L43">Commands</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Commands(client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>, roomID <a href="../../../../../builtin/index.html#string">string</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/giphy/giphy.go?s=1144:1209#L43">Commands</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Commands(client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<p> <p>
Commands supported: Commands supported:
</p> </p>

31
pkg/github.com/matrix-org/go-neb/services/github/index.html

@ -122,10 +122,10 @@ webhook service adds Github webhook support.
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (s *Service) Commands(cli *matrix.Client, roomID string) []types.Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (s *Service) Commands(cli *matrix.Client) []types.Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Expansions">func (s *Service) Expansions(cli *matrix.Client, roomID string) []types.Expansion</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Expansions">func (s *Service) Expansions(cli *matrix.Client) []types.Expansion</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Register">func (s *Service) Register(oldService types.Service, client *matrix.Client) error</a></dd> <dd>&nbsp; &nbsp; <a href="index.html#Service.Register">func (s *Service) Register(oldService types.Service, client *matrix.Client) error</a></dd>
@ -224,7 +224,7 @@ WebhookServiceType of the Github Webhook service.
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github.go?s=1569:1766#L41">Service</a></h2>
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github.go?s=1543:1740#L40">Service</a></h2>
<pre>type Service struct { <pre>type Service struct {
<a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a> <a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a>
<span class="comment">// The ID of an existing &#34;github&#34; realm. This realm will be used to obtain</span> <span class="comment">// The ID of an existing &#34;github&#34; realm. This realm will be used to obtain</span>
@ -235,8 +235,7 @@ WebhookServiceType of the Github Webhook service.
Service contains the Config fields for the Github service. Service contains the Config fields for the Github service.
</p> </p>
<p> <p>
Before you can set up a Github Service, you need to set up a Github Realm. This
service requires a syncing client.
Before you can set up a Github Service, you need to set up a Github Realm.
</p> </p>
<p> <p>
You can set a &#34;default repository&#34; for a Matrix room by sending a `m.room.bot.options` state event You can set a &#34;default repository&#34; for a Matrix room by sending a `m.room.bot.options` state event
@ -252,7 +251,7 @@ which has the following `content`:
This will allow the &#34;owner/repo&#34; to be omitted when creating/expanding issues. This will allow the &#34;owner/repo&#34; to be omitted when creating/expanding issues.
</p> </p>
<p> <p>
Example:
Example request:
</p> </p>
<pre>{ <pre>{
&#34;RealmID&#34;: &#34;github-realm-id&#34; &#34;RealmID&#34;: &#34;github-realm-id&#34;
@ -272,8 +271,8 @@ Example:
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github.go?s=5003:5080#L148">Commands</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Commands(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>, roomID <a href="../../../../../builtin/index.html#string">string</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github.go?s=4973:5035#L147">Commands</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Commands(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<p> <p>
Commands supported: Commands supported:
</p> </p>
@ -290,8 +289,8 @@ is no link, it will return a Starter Link instead.
<h3 id="Service.Expansions">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github.go?s=5557:5638#L165">Expansions</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Expansions(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>, roomID <a href="../../../../../builtin/index.html#string">string</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Expansion">Expansion</a></pre>
<h3 id="Service.Expansions">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github.go?s=5512:5578#L164">Expansions</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Expansions(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Expansion">Expansion</a></pre>
<p> <p>
Expansions expands strings of the form: Expansions expands strings of the form:
</p> </p>
@ -312,7 +311,7 @@ using the default repository.
<h3 id="Service.Register">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github.go?s=7243:7324#L214">Register</a></h3>
<h3 id="Service.Register">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github.go?s=7183:7264#L213">Register</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Register(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>, client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../builtin/index.html#error">error</a></pre> <pre>func (s *<a href="index.html#Service">Service</a>) Register(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>, client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Register makes sure that the given realm ID maps to a github realm. Register makes sure that the given realm ID maps to a github realm.
@ -325,7 +324,7 @@ Register makes sure that the given realm ID maps to a github realm.
<h2 id="WebhookService">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github_webhook.go?s=1314:2534#L35">WebhookService</a></h2>
<h2 id="WebhookService">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github_webhook.go?s=1331:2551#L35">WebhookService</a></h2>
<pre>type WebhookService struct { <pre>type WebhookService struct {
<a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a> <a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a>
@ -366,7 +365,7 @@ to it. It requires a public domain which Github can reach. Notices will be sent
as the service user ID, not the ClientUserID. as the service user ID, not the ClientUserID.
</p> </p>
<p> <p>
Example:
Example request:
</p> </p>
<pre>{ <pre>{
ClientUserID: &#34;@alice:localhost&#34;, ClientUserID: &#34;@alice:localhost&#34;,
@ -396,7 +395,7 @@ Example:
<h3 id="WebhookService.OnReceiveWebhook">func (*WebhookService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github_webhook.go?s=2984:3087#L70">OnReceiveWebhook</a></h3>
<h3 id="WebhookService.OnReceiveWebhook">func (*WebhookService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github_webhook.go?s=3001:3104#L70">OnReceiveWebhook</a></h3>
<pre>func (s *<a href="index.html#WebhookService">WebhookService</a>) OnReceiveWebhook(w <a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>, cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>)</pre> <pre>func (s *<a href="index.html#WebhookService">WebhookService</a>) OnReceiveWebhook(w <a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>, cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>)</pre>
<p> <p>
OnReceiveWebhook receives requests from Github and possibly sends requests to Matrix as a result. OnReceiveWebhook receives requests from Github and possibly sends requests to Matrix as a result.
@ -416,7 +415,7 @@ Github.
<h3 id="WebhookService.PostRegister">func (*WebhookService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github_webhook.go?s=7141:7204#L197">PostRegister</a></h3>
<h3 id="WebhookService.PostRegister">func (*WebhookService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github_webhook.go?s=7158:7221#L197">PostRegister</a></h3>
<pre>func (s *<a href="index.html#WebhookService">WebhookService</a>) PostRegister(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>)</pre> <pre>func (s *<a href="index.html#WebhookService">WebhookService</a>) PostRegister(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>)</pre>
<p> <p>
PostRegister cleans up removed repositories from the old service by PostRegister cleans up removed repositories from the old service by
@ -428,7 +427,7 @@ working out the delta between the old and new hooks.
<h3 id="WebhookService.Register">func (*WebhookService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github_webhook.go?s=5139:5227#L135">Register</a></h3>
<h3 id="WebhookService.Register">func (*WebhookService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/github/github_webhook.go?s=5156:5244#L135">Register</a></h3>
<pre>func (s *<a href="index.html#WebhookService">WebhookService</a>) Register(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>, client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../builtin/index.html#error">error</a></pre> <pre>func (s *<a href="index.html#WebhookService">WebhookService</a>) Register(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>, client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Register will create webhooks for the repos specified in Rooms Register will create webhooks for the repos specified in Rooms

10
pkg/github.com/matrix-org/go-neb/services/guggy/index.html

@ -116,7 +116,7 @@ Package guggy implements a Service which adds !commands for Guggy.
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (s *Service) Commands(client *matrix.Client, roomID string) []types.Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (s *Service) Commands(client *matrix.Client) []types.Command</a></dd>
@ -190,7 +190,7 @@ ServiceType of the Guggy service
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/guggy/guggy.go?s=768:910#L31">Service</a></h2>
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/guggy/guggy.go?s=776:918#L31">Service</a></h2>
<pre>type Service struct { <pre>type Service struct {
<a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a> <a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a>
<span class="comment">// The Guggy API key to use when making HTTP requests to Guggy.</span> <span class="comment">// The Guggy API key to use when making HTTP requests to Guggy.</span>
@ -200,7 +200,7 @@ ServiceType of the Guggy service
Service contains the Config fields for the Guggy service. Service contains the Config fields for the Guggy service.
</p> </p>
<p> <p>
Example:
Example request:
</p> </p>
<pre>{ <pre>{
&#34;api_key&#34;: &#34;fkweugfyuwegfweyg&#34; &#34;api_key&#34;: &#34;fkweugfyuwegfweyg&#34;
@ -220,8 +220,8 @@ Example:
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/guggy/guggy.go?s=1048:1128#L40">Commands</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Commands(client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>, roomID <a href="../../../../../builtin/index.html#string">string</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/guggy/guggy.go?s=1056:1121#L40">Commands</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Commands(client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<p> <p>
Commands supported: Commands supported:
</p> </p>

20
pkg/github.com/matrix-org/go-neb/services/jira/index.html

@ -121,10 +121,10 @@ The service adds !commands and issue expansions, in addition to JIRA webhook sup
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (s *Service) Commands(cli *matrix.Client, roomID string) []types.Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Commands">func (s *Service) Commands(cli *matrix.Client) []types.Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Expansions">func (s *Service) Expansions(cli *matrix.Client, roomID string) []types.Expansion</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.Expansions">func (s *Service) Expansions(cli *matrix.Client) []types.Expansion</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#Service.OnReceiveWebhook">func (s *Service) OnReceiveWebhook(w http.ResponseWriter, req *http.Request, cli *matrix.Client)</a></dd> <dd>&nbsp; &nbsp; <a href="index.html#Service.OnReceiveWebhook">func (s *Service) OnReceiveWebhook(w http.ResponseWriter, req *http.Request, cli *matrix.Client)</a></dd>
@ -204,7 +204,7 @@ ServiceType of the JIRA Service
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=1402:2124#L41">Service</a></h2>
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=1412:2134#L41">Service</a></h2>
<pre>type Service struct { <pre>type Service struct {
<a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a> <a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a>
@ -234,7 +234,7 @@ Service contains the Config fields for the JIRA service.
Before you can set up a JIRA Service, you need to set up a JIRA Realm. Before you can set up a JIRA Service, you need to set up a JIRA Realm.
</p> </p>
<p> <p>
Example:
Example request:
</p> </p>
<pre>{ <pre>{
Rooms: { Rooms: {
@ -265,8 +265,8 @@ Example:
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=7320:7397#L231">Commands</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Commands(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>, roomID <a href="../../../../../builtin/index.html#string">string</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<h3 id="Service.Commands">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=7327:7389#L231">Commands</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Commands(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Command">Command</a></pre>
<p> <p>
Commands supported: Commands supported:
</p> </p>
@ -287,8 +287,8 @@ if there is a known public project with that project key.
<h3 id="Service.Expansions">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=7979:8060#L248">Expansions</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Expansions(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>, roomID <a href="../../../../../builtin/index.html#string">string</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Expansion">Expansion</a></pre>
<h3 id="Service.Expansions">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=7971:8037#L248">Expansions</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Expansions(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) []<a href="../../types/index.html">types</a>.<a href="../../types/index.html#Expansion">Expansion</a></pre>
<p> <p>
Expansions expands JIRA issues represented as: Expansions expands JIRA issues represented as:
</p> </p>
@ -306,7 +306,7 @@ be chosen arbitrarily.
<h3 id="Service.OnReceiveWebhook">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=8386:8482#L260">OnReceiveWebhook</a></h3>
<h3 id="Service.OnReceiveWebhook">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=8363:8459#L260">OnReceiveWebhook</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) OnReceiveWebhook(w <a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>, cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>)</pre> <pre>func (s *<a href="index.html#Service">Service</a>) OnReceiveWebhook(w <a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../../net/http/index.html">http</a>.<a href="../../../../../net/http/index.html#Request">Request</a>, cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>)</pre>
<p> <p>
OnReceiveWebhook receives requests from JIRA and possibly sends requests to Matrix as a result. OnReceiveWebhook receives requests from JIRA and possibly sends requests to Matrix as a result.
@ -317,7 +317,7 @@ OnReceiveWebhook receives requests from JIRA and possibly sends requests to Matr
<h3 id="Service.Register">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=2246:2327#L65">Register</a></h3>
<h3 id="Service.Register">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/jira.go?s=2256:2337#L65">Register</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Register(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>, client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../builtin/index.html#error">error</a></pre> <pre>func (s *<a href="index.html#Service">Service</a>) Register(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>, client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Register ensures that the given realm IDs are valid JIRA realms and registers webhooks Register ensures that the given realm IDs are valid JIRA realms and registers webhooks

18
pkg/github.com/matrix-org/go-neb/services/jira/webhook/index.html

@ -109,7 +109,7 @@
<dd><a href="index.html#OnReceiveRequest">func OnReceiveRequest(req *http.Request) (string, *Event, *errors.HTTPError)</a></dd> <dd><a href="index.html#OnReceiveRequest">func OnReceiveRequest(req *http.Request) (string, *Event, *errors.HTTPError)</a></dd>
<dd><a href="index.html#RegisterHook">func RegisterHook(jrealm *realms.JIRARealm, projects []string, userID, webhookEndpointURL string) error</a></dd>
<dd><a href="index.html#RegisterHook">func RegisterHook(jrealm *jira.Realm, projects []string, userID, webhookEndpointURL string) error</a></dd>
@ -178,7 +178,7 @@
<h2 id="OnReceiveRequest">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go?s=4003:4079#L93">OnReceiveRequest</a></h2>
<h2 id="OnReceiveRequest">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go?s=4013:4089#L94">OnReceiveRequest</a></h2>
<pre>func OnReceiveRequest(req *<a href="../../../../../../net/http/index.html">http</a>.<a href="../../../../../../net/http/index.html#Request">Request</a>) (<a href="../../../../../../builtin/index.html#string">string</a>, *<a href="index.html#Event">Event</a>, *<a href="../../../errors/index.html">errors</a>.<a href="../../../errors/index.html#HTTPError">HTTPError</a>)</pre> <pre>func OnReceiveRequest(req *<a href="../../../../../../net/http/index.html">http</a>.<a href="../../../../../../net/http/index.html#Request">Request</a>) (<a href="../../../../../../builtin/index.html#string">string</a>, *<a href="index.html#Event">Event</a>, *<a href="../../../errors/index.html">errors</a>.<a href="../../../errors/index.html#HTTPError">HTTPError</a>)</pre>
<p> <p>
OnReceiveRequest is called when JIRA hits NEB with an update. OnReceiveRequest is called when JIRA hits NEB with an update.
@ -191,8 +191,8 @@ Returns the project key and webhook event, or an error.
<h2 id="RegisterHook">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go?s=896:999#L24">RegisterHook</a></h2>
<pre>func RegisterHook(jrealm *realms.<a href="index.html#JIRARealm">JIRARealm</a>, projects []<a href="../../../../../../builtin/index.html#string">string</a>, userID, webhookEndpointURL <a href="../../../../../../builtin/index.html#string">string</a>) <a href="../../../../../../builtin/index.html#error">error</a></pre>
<h2 id="RegisterHook">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go?s=912:1009#L25">RegisterHook</a></h2>
<pre>func RegisterHook(jrealm *<a href="../../../realms/jira/index.html">jira</a>.<a href="../../../realms/jira/index.html#Realm">Realm</a>, projects []<a href="../../../../../../builtin/index.html#string">string</a>, userID, webhookEndpointURL <a href="../../../../../../builtin/index.html#string">string</a>) <a href="../../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
RegisterHook checks to see if this user is allowed to track the given projects and then tracks them. RegisterHook checks to see if this user is allowed to track the given projects and then tracks them.
</p> </p>
@ -204,12 +204,12 @@ RegisterHook checks to see if this user is allowed to track the given projects a
<h2 id="Event">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go?s=599:790#L16">Event</a></h2>
<h2 id="Event">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go?s=607:806#L17">Event</a></h2>
<pre>type Event struct { <pre>type Event struct {
WebhookEvent <a href="../../../../../../builtin/index.html#string">string</a> `json:&#34;webhookEvent&#34;`
Timestamp <a href="../../../../../../builtin/index.html#int64">int64</a> `json:&#34;timestamp&#34;`
User <a href="../../../realms/jira/index.html">jira</a>.<a href="../../../realms/jira/index.html#User">User</a> `json:&#34;user&#34;`
Issue <a href="../../../realms/jira/index.html">jira</a>.<a href="../../../realms/jira/index.html#Issue">Issue</a> `json:&#34;issue&#34;`
WebhookEvent <a href="../../../../../../builtin/index.html#string">string</a> `json:&#34;webhookEvent&#34;`
Timestamp <a href="../../../../../../builtin/index.html#int64">int64</a> `json:&#34;timestamp&#34;`
User <a href="../../../../../andygrunwald/go-jira/index.html">gojira</a>.<a href="../../../../../andygrunwald/go-jira/index.html#User">User</a> `json:&#34;user&#34;`
Issue <a href="../../../../../andygrunwald/go-jira/index.html">gojira</a>.<a href="../../../../../andygrunwald/go-jira/index.html#Issue">Issue</a> `json:&#34;issue&#34;`
}</pre> }</pre>
<p> <p>
Event represents an incoming JIRA webhook event Event represents an incoming JIRA webhook event

10
pkg/github.com/matrix-org/go-neb/services/rssbot/index.html

@ -196,7 +196,7 @@ ServiceType of the RSS Bot service
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go?s=1294:2255#L42">Service</a></h2>
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go?s=1302:2263#L42">Service</a></h2>
<pre>type Service struct { <pre>type Service struct {
<a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a> <a href="../../types/index.html">types</a>.<a href="../../types/index.html#DefaultService">DefaultService</a>
<span class="comment">// Feeds is a map of feed URL to configuration options for this feed.</span> <span class="comment">// Feeds is a map of feed URL to configuration options for this feed.</span>
@ -221,7 +221,7 @@ ServiceType of the RSS Bot service
Service contains the Config fields for this service. Service contains the Config fields for this service.
</p> </p>
<p> <p>
Example:
Example request:
</p> </p>
<pre>{ <pre>{
feeds: { feeds: {
@ -249,7 +249,7 @@ Example:
<h3 id="Service.OnPoll">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go?s=4838:4892#L139">OnPoll</a></h3>
<h3 id="Service.OnPoll">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go?s=4846:4900#L139">OnPoll</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) OnPoll(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../time/index.html">time</a>.<a href="../../../../../time/index.html#Time">Time</a></pre> <pre>func (s *<a href="index.html#Service">Service</a>) OnPoll(cli *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../time/index.html">time</a>.<a href="../../../../../time/index.html#Time">Time</a></pre>
<p> <p>
OnPoll rechecks RSS feeds which are due to be polled. OnPoll rechecks RSS feeds which are due to be polled.
@ -272,7 +272,7 @@ Returns a timestamp representing when this Service should have OnPoll called aga
<h3 id="Service.PostRegister">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go?s=3821:3877#L115">PostRegister</a></h3>
<h3 id="Service.PostRegister">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go?s=3829:3885#L115">PostRegister</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) PostRegister(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>)</pre> <pre>func (s *<a href="index.html#Service">Service</a>) PostRegister(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>)</pre>
<p> <p>
PostRegister deletes this service if there are no feeds remaining. PostRegister deletes this service if there are no feeds remaining.
@ -283,7 +283,7 @@ PostRegister deletes this service if there are no feeds remaining.
<h3 id="Service.Register">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go?s=2368:2449#L64">Register</a></h3>
<h3 id="Service.Register">func (*Service) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go?s=2376:2457#L64">Register</a></h3>
<pre>func (s *<a href="index.html#Service">Service</a>) Register(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>, client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../builtin/index.html#error">error</a></pre> <pre>func (s *<a href="index.html#Service">Service</a>) Register(oldService <a href="../../types/index.html">types</a>.<a href="../../types/index.html#Service">Service</a>, client *<a href="../../matrix/index.html">matrix</a>.<a href="../../matrix/index.html#Client">Client</a>) <a href="../../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Register will check the liveness of each RSS feed given. If all feeds check out okay, no error is returned. Register will check the liveness of each RSS feed given. If all feeds check out okay, no error is returned.

42
pkg/github.com/matrix-org/go-neb/types/index.html

@ -152,10 +152,10 @@
<dd>&nbsp; &nbsp; <a href="index.html#DefaultService.Commands">func (s *DefaultService) Commands(cli *matrix.Client, roomID string) []Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#DefaultService.Commands">func (s *DefaultService) Commands(cli *matrix.Client) []Command</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#DefaultService.Expansions">func (s *DefaultService) Expansions(cli *matrix.Client, roomID string) []Expansion</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#DefaultService.Expansions">func (s *DefaultService) Expansions(cli *matrix.Client) []Expansion</a></dd>
<dd>&nbsp; &nbsp; <a href="index.html#DefaultService.OnReceiveWebhook">func (s *DefaultService) OnReceiveWebhook(w http.ResponseWriter, req *http.Request, cli *matrix.Client)</a></dd> <dd>&nbsp; &nbsp; <a href="index.html#DefaultService.OnReceiveWebhook">func (s *DefaultService) OnReceiveWebhook(w http.ResponseWriter, req *http.Request, cli *matrix.Client)</a></dd>
@ -259,7 +259,7 @@
<h2 id="BaseURL">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=4311:4339#L99">BaseURL</a></h2>
<h2 id="BaseURL">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=4251:4279#L99">BaseURL</a></h2>
<pre>func BaseURL(u <a href="../../../../builtin/index.html#string">string</a>) <a href="../../../../builtin/index.html#error">error</a></pre> <pre>func BaseURL(u <a href="../../../../builtin/index.html#string">string</a>) <a href="../../../../builtin/index.html#error">error</a></pre>
<p> <p>
BaseURL sets the base URL of NEB to the url given. This URL must be accessible from the BaseURL sets the base URL of NEB to the url given. This URL must be accessible from the
@ -272,7 +272,7 @@ public internet.
<h2 id="PollingServiceTypes">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=5116:5159#L127">PollingServiceTypes</a></h2>
<h2 id="PollingServiceTypes">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=5056:5099#L127">PollingServiceTypes</a></h2>
<pre>func PollingServiceTypes() (types []<a href="../../../../builtin/index.html#string">string</a>)</pre> <pre>func PollingServiceTypes() (types []<a href="../../../../builtin/index.html#string">string</a>)</pre>
<p> <p>
PollingServiceTypes returns a list of service types which meet the Poller interface PollingServiceTypes returns a list of service types which meet the Poller interface
@ -296,7 +296,7 @@ RegisterAuthRealm registers a factory for creating AuthRealm instances.
<h2 id="RegisterService">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=4806:4872#L117">RegisterService</a></h2>
<h2 id="RegisterService">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=4746:4812#L117">RegisterService</a></h2>
<pre>func RegisterService(factory func(<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#string">string</a>) <a href="index.html#Service">Service</a>)</pre> <pre>func RegisterService(factory func(<a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#string">string</a>, <a href="../../../../builtin/index.html#string">string</a>) <a href="index.html#Service">Service</a>)</pre>
<p> <p>
RegisterService registers a factory for creating Service instances. RegisterService registers a factory for creating Service instances.
@ -444,7 +444,7 @@ Matches if the arguments start with the path of the command.
<h2 id="DefaultService">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=2186:2282#L43">DefaultService</a></h2>
<h2 id="DefaultService">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=2156:2252#L43">DefaultService</a></h2>
<pre>type DefaultService struct { <pre>type DefaultService struct {
<span class="comment">// contains filtered or unexported fields</span> <span class="comment">// contains filtered or unexported fields</span>
}</pre> }</pre>
@ -463,7 +463,7 @@ DefaultService NO-OPs the implementation of optional Service interface methods.
<h3 id="NewDefaultService">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=2399:2482#L50">NewDefaultService</a></h3>
<h3 id="NewDefaultService">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=2369:2452#L50">NewDefaultService</a></h3>
<pre>func NewDefaultService(serviceID, serviceUserID, serviceType <a href="../../../../builtin/index.html#string">string</a>) <a href="index.html#DefaultService">DefaultService</a></pre> <pre>func NewDefaultService(serviceID, serviceUserID, serviceType <a href="../../../../builtin/index.html#string">string</a>) <a href="index.html#DefaultService">DefaultService</a></pre>
<p> <p>
NewDefaultService creates a new service with implementations for ServiceID(), ServiceType() and ServiceUserID() NewDefaultService creates a new service with implementations for ServiceID(), ServiceType() and ServiceUserID()
@ -475,8 +475,8 @@ NewDefaultService creates a new service with implementations for ServiceID(), Se
<h3 id="DefaultService.Commands">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3493:3571#L75">Commands</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) Commands(cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>, roomID <a href="../../../../builtin/index.html#string">string</a>) []<a href="index.html#Command">Command</a></pre>
<h3 id="DefaultService.Commands">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3463:3526#L75">Commands</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) Commands(cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>) []<a href="index.html#Command">Command</a></pre>
<p> <p>
Commands returns no commands. Commands returns no commands.
</p> </p>
@ -486,8 +486,8 @@ Commands returns no commands.
<h3 id="DefaultService.Expansions">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3634:3716#L80">Expansions</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) Expansions(cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>, roomID <a href="../../../../builtin/index.html#string">string</a>) []<a href="index.html#Expansion">Expansion</a></pre>
<h3 id="DefaultService.Expansions">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3589:3656#L80">Expansions</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) Expansions(cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>) []<a href="index.html#Expansion">Expansion</a></pre>
<p> <p>
Expansions returns no expansions. Expansions returns no expansions.
</p> </p>
@ -497,7 +497,7 @@ Expansions returns no expansions.
<h3 id="DefaultService.OnReceiveWebhook">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=4039:4142#L91">OnReceiveWebhook</a></h3>
<h3 id="DefaultService.OnReceiveWebhook">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3979:4082#L91">OnReceiveWebhook</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) OnReceiveWebhook(w <a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#Request">Request</a>, cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>)</pre> <pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) OnReceiveWebhook(w <a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#Request">Request</a>, cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>)</pre>
<p> <p>
OnReceiveWebhook does nothing but 200 OK the request. OnReceiveWebhook does nothing but 200 OK the request.
@ -508,7 +508,7 @@ OnReceiveWebhook does nothing but 200 OK the request.
<h3 id="DefaultService.PostRegister">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3920:3977#L88">PostRegister</a></h3>
<h3 id="DefaultService.PostRegister">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3860:3917#L88">PostRegister</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) PostRegister(oldService <a href="index.html#Service">Service</a>)</pre> <pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) PostRegister(oldService <a href="index.html#Service">Service</a>)</pre>
<p> <p>
PostRegister does nothing. PostRegister does nothing.
@ -519,7 +519,7 @@ PostRegister does nothing.
<h3 id="DefaultService.Register">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3791:3873#L85">Register</a></h3>
<h3 id="DefaultService.Register">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3731:3813#L85">Register</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) Register(oldService <a href="index.html#Service">Service</a>, client *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>) <a href="../../../../builtin/index.html#error">error</a></pre> <pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) Register(oldService <a href="index.html#Service">Service</a>, client *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>) <a href="../../../../builtin/index.html#error">error</a></pre>
<p> <p>
Register does nothing and returns no error. Register does nothing and returns no error.
@ -530,7 +530,7 @@ Register does nothing and returns no error.
<h3 id="DefaultService.ServiceID">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=2728:2771#L56">ServiceID</a></h3>
<h3 id="DefaultService.ServiceID">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=2698:2741#L56">ServiceID</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) ServiceID() <a href="../../../../builtin/index.html#string">string</a></pre> <pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) ServiceID() <a href="../../../../builtin/index.html#string">string</a></pre>
<p> <p>
ServiceID returns the service&#39;s ID. In order for this to return the ID, DefaultService MUST have been ServiceID returns the service&#39;s ID. In order for this to return the ID, DefaultService MUST have been
@ -542,7 +542,7 @@ initialised by NewDefaultService, the zero-initialiser is NOT enough.
<h3 id="DefaultService.ServiceType">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3387:3432#L70">ServiceType</a></h3>
<h3 id="DefaultService.ServiceType">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3357:3402#L70">ServiceType</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) ServiceType() <a href="../../../../builtin/index.html#string">string</a></pre> <pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) ServiceType() <a href="../../../../builtin/index.html#string">string</a></pre>
<p> <p>
ServiceType returns the type of service. See each individual service package for the ServiceType constant ServiceType returns the type of service. See each individual service package for the ServiceType constant
@ -555,7 +555,7 @@ initialised by NewDefaultService, the zero-initialiser is NOT enough.
<h3 id="DefaultService.ServiceUserID">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=3016:3063#L63">ServiceUserID</a></h3>
<h3 id="DefaultService.ServiceUserID">func (*DefaultService) <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=2986:3033#L63">ServiceUserID</a></h3>
<pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) ServiceUserID() <a href="../../../../builtin/index.html#string">string</a></pre> <pre>func (s *<a href="index.html#DefaultService">DefaultService</a>) ServiceUserID() <a href="../../../../builtin/index.html#string">string</a></pre>
<p> <p>
ServiceUserID returns the user ID that the service sends events as. In order for this to return the ServiceUserID returns the user ID that the service sends events as. In order for this to return the
@ -622,7 +622,7 @@ Poller represents a thing which can poll. Services should implement this method
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=697:2073#L20">Service</a></h2>
<h2 id="Service">type <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=697:2043#L20">Service</a></h2>
<pre>type Service interface { <pre>type Service interface {
<span class="comment">// Return the user ID of this service.</span> <span class="comment">// Return the user ID of this service.</span>
ServiceUserID() <a href="../../../../builtin/index.html#string">string</a> ServiceUserID() <a href="../../../../builtin/index.html#string">string</a>
@ -630,8 +630,8 @@ Poller represents a thing which can poll. Services should implement this method
ServiceID() <a href="../../../../builtin/index.html#string">string</a> ServiceID() <a href="../../../../builtin/index.html#string">string</a>
<span class="comment">// Return the type of service. This string MUST NOT change.</span> <span class="comment">// Return the type of service. This string MUST NOT change.</span>
ServiceType() <a href="../../../../builtin/index.html#string">string</a> ServiceType() <a href="../../../../builtin/index.html#string">string</a>
Commands(cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>, roomID <a href="../../../../builtin/index.html#string">string</a>) []<a href="index.html#Command">Command</a>
Expansions(cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>, roomID <a href="../../../../builtin/index.html#string">string</a>) []<a href="index.html#Expansion">Expansion</a>
Commands(cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>) []<a href="index.html#Command">Command</a>
Expansions(cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>) []<a href="index.html#Expansion">Expansion</a>
OnReceiveWebhook(w <a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#Request">Request</a>, cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>) OnReceiveWebhook(w <a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#ResponseWriter">ResponseWriter</a>, req *<a href="../../../../net/http/index.html">http</a>.<a href="../../../../net/http/index.html#Request">Request</a>, cli *<a href="../matrix/index.html">matrix</a>.<a href="../matrix/index.html#Client">Client</a>)
<span class="comment">// A lifecycle function which is invoked when the service is being registered. The old service, if one exists, is provided,</span> <span class="comment">// A lifecycle function which is invoked when the service is being registered. The old service, if one exists, is provided,</span>
<span class="comment">// along with a Client instance for ServiceUserID(). If this function returns an error, the service will not be registered</span> <span class="comment">// along with a Client instance for ServiceUserID(). If this function returns an error, the service will not be registered</span>
@ -659,7 +659,7 @@ A Service is the configuration for a bot service.
<h3 id="CreateService">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=5367:5468#L136">CreateService</a></h3>
<h3 id="CreateService">func <a href="http://localhost:6060/src/github.com/matrix-org/go-neb/types/service.go?s=5307:5408#L136">CreateService</a></h3>
<pre>func CreateService(serviceID, serviceType, serviceUserID <a href="../../../../builtin/index.html#string">string</a>, serviceJSON []<a href="../../../../builtin/index.html#byte">byte</a>) (<a href="index.html#Service">Service</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre> <pre>func CreateService(serviceID, serviceType, serviceUserID <a href="../../../../builtin/index.html#string">string</a>, serviceJSON []<a href="../../../../builtin/index.html#byte">byte</a>) (<a href="index.html#Service">Service</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre>
<p> <p>
CreateService creates a Service of the given type and serviceID. CreateService creates a Service of the given type and serviceID.

4
pkg/github.com/matrix-org/index.html

@ -212,7 +212,7 @@
<a href="go-neb/realms/github/index.html">github</a> <a href="go-neb/realms/github/index.html">github</a>
</td> </td>
<td class="pkg-synopsis"> <td class="pkg-synopsis">
Package github implements OAuth2 support for github.com
</td> </td>
</tr> </tr>
@ -223,7 +223,7 @@
<a href="go-neb/realms/jira/index.html">jira</a> <a href="go-neb/realms/jira/index.html">jira</a>
</td> </td>
<td class="pkg-synopsis"> <td class="pkg-synopsis">
Package jira implements OAuth1.0a support for arbitrary JIRA installations.
</td> </td>
</tr> </tr>

Loading…
Cancel
Save