Skip to content

Commit

Permalink
Merge pull request #33 from jirenius/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jirenius committed May 14, 2019
2 parents f03ff0a + 7099aba commit ad946d0
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@

---

[Go](http://golang.org) package implementing the RES-Service Protocol. Used to create REST, real time, and RPC APIs, where all your reactive web clients are synchronized seamlessly through [Resgate](https://github.com/jirenius/resgate).
[Go](http://golang.org) package implementing the RES-Service Protocol. Used to create REST, real time, and RPC APIs, where all your reactive web clients are synchronized seamlessly through [Resgate](https://github.com/resgateio/resgate).

Visit [Resgate.io](https://resgate.io) for more information.

Expand Down
2 changes: 1 addition & 1 deletion doc.go
@@ -1,7 +1,7 @@
/*
Package res provides RES service implementations for realtime API's through Resgate:
https://github.com/jirenius/resgate
https://github.com/resgateio/resgate
The implementation provides low level methods to listen to and handle incoming
requests, and to send events.
Expand Down
2 changes: 1 addition & 1 deletion examples/book-collection/README.md
Expand Up @@ -12,7 +12,7 @@ edited and deleted by multiple users simultaneously.

## Prerequisite

* Have [NATS Server](https://nats.io/download/nats-io/gnatsd/) and [Resgate](https://github.com/jirenius/resgate) running
* Have [NATS Server](https://nats.io/download/nats-io/gnatsd/) and [Resgate](https://github.com/resgateio/resgate) running

## Install and run

Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/README.md
Expand Up @@ -8,7 +8,7 @@ This is an example of a simple Hello World RES service written in Go.

## Prerequisite

* Have [NATS Server](https://nats.io/download/nats-io/gnatsd/) and [Resgate](https://github.com/jirenius/resgate) running
* Have [NATS Server](https://nats.io/download/nats-io/gnatsd/) and [Resgate](https://github.com/resgateio/resgate) running

## Install and run

Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/index.html
Expand Up @@ -7,7 +7,7 @@
<script src="https://unpkg.com/resclient@latest/dist/resclient.min.js"></script>
</head>
<body>
<p>Client application for the <a href="https://github.com/jirenius/resgate">Resgate Hello World example</a>.</p>
<p>Client application for the <a href="https://github.com/resgateio/resgate">Resgate Hello World example</a>.</p>
<p>Try running it in two separate tabs!</p>
<div id="root"></div>
<script>
Expand Down
4 changes: 2 additions & 2 deletions patterns.go
@@ -1,7 +1,7 @@
package res

// Code inspired, and partly borrowed, from SubList in gnatsd
// https://github.com/nats-io/gnatsd/blob/master/server/sublist.go
// Code inspired, and partly borrowed, from SubList in nats-server
// https://github.com/nats-io/nats-server/blob/master/server/sublist.go

// Common byte variables for wildcards and token separator.
const (
Expand Down
12 changes: 6 additions & 6 deletions resource.go
Expand Up @@ -41,7 +41,7 @@ type Resource interface {
// RemoveEvent, or ReaccessEvent should be used instead.
//
// See the protocol specification for more information:
// https://github.com/jirenius/resgate/blob/master/docs/res-service-protocol.md#events
// https://github.com/resgateio/resgate/blob/master/docs/res-service-protocol.md#events
Event(event string, payload interface{})

// ChangeEvents sends a change event with properties that has been changed
Expand All @@ -51,26 +51,26 @@ type Resource interface {
// The values must be serializable into JSON primitives, resource references,
// or a delete action objects.
// See the protocol specification for more information:
// https://github.com/jirenius/resgate/blob/master/docs/res-service-protocol.md#model-change-event
// https://github.com/resgateio/resgate/blob/master/docs/res-service-protocol.md#model-change-event
ChangeEvent(props map[string]interface{})

// AddEvent sends an add event, adding the value at index idx.
// Panics if the resource is not a Collection, or if idx is less than 0.
// The value must be serializable into a JSON primitive or resource reference.
// See the protocol specification for more information:
// https://github.com/jirenius/resgate/blob/master/docs/res-service-protocol.md#collection-add-event
// https://github.com/resgateio/resgate/blob/master/docs/res-service-protocol.md#collection-add-event
AddEvent(value interface{}, idx int)

// RemoveEvent sends a remove event, removing the value at index idx.
// Panics if the resource is not a Collection, or if idx is less than 0.
// See the protocol specification for more information:
// https://github.com/jirenius/resgate/blob/master/docs/res-service-protocol.md#collection-remove-event
// https://github.com/resgateio/resgate/blob/master/docs/res-service-protocol.md#collection-remove-event
RemoveEvent(idx int)

// ReaccessEvent sends a reaccess event to signal that the resource's access permissions has changed.
// It will invalidate any previous access response sent for the resource.
// See the protocol specification for more information:
// https://github.com/jirenius/resgate/blob/master/docs/res-service-protocol.md#reaccess-event
// https://github.com/resgateio/resgate/blob/master/docs/res-service-protocol.md#reaccess-event
ReaccessEvent()

QueryEvent(func(QueryRequest))
Expand Down Expand Up @@ -154,7 +154,7 @@ func isValidPart(p string) bool {
// RemoveEvent, or ReaccessEvent should be used instead.
//
// This is to ensure compliance with the specifications:
// https://github.com/jirenius/resgate/blob/master/docs/res-service-protocol.md#events
// https://github.com/resgateio/resgate/blob/master/docs/res-service-protocol.md#events
func (r *resource) Event(event string, payload interface{}) {
switch event {
case "change":
Expand Down
4 changes: 2 additions & 2 deletions service.go
Expand Up @@ -8,9 +8,9 @@ import (
"sync/atomic"
"time"

"github.com/jirenius/resgate/logger"
"github.com/jirenius/timerqueue"
nats "github.com/nats-io/go-nats"
"github.com/resgateio/resgate/logger"
)

// The size of the in channel receiving messages from NATS Server.
Expand Down Expand Up @@ -312,7 +312,7 @@ func Group(group string) HandlerOption {

// SetReset sets the patterns used for resources and access when a reset is made.¨
// For more details on system reset, see:
// https://github.com/jirenius/resgate/blob/master/docs/res-service-protocol.md#system-reset-event
// https://github.com/resgateio/resgate/blob/master/docs/res-service-protocol.md#system-reset-event
func (s *Service) SetReset(resources, access []string) {
s.resetResources = resources
s.resetAccess = access
Expand Down
4 changes: 2 additions & 2 deletions test/natstest.go
Expand Up @@ -13,9 +13,9 @@ import (
"time"

res "github.com/jirenius/go-res"
"github.com/nats-io/gnatsd/server"
ntest "github.com/nats-io/gnatsd/test"
nats "github.com/nats-io/go-nats"
"github.com/nats-io/nats-server/server"
ntest "github.com/nats-io/nats-server/test"
)

// MockConn mocks a client connection to a NATS server.
Expand Down
2 changes: 1 addition & 1 deletion test/test.go
Expand Up @@ -5,7 +5,7 @@ import (
"time"

res "github.com/jirenius/go-res"
"github.com/jirenius/resgate/logger"
"github.com/resgateio/resgate/logger"
)

const timeoutDuration = 4 * time.Second
Expand Down

0 comments on commit ad946d0

Please sign in to comment.