Documentation ¶
Index ¶
- Variables
- func CheckExists(id string) func(*bolt.Tx) error
- func CheckNotExist(id string) func(*bolt.Tx) error
- func Delete(id string) func(*bolt.Tx) error
- func Get(s *Stream, id string) func(*bolt.Tx) error
- func GetAll(user string, filters ...users.Filter) func(*bolt.Tx) ([]*Stream, error)
- func IsExists(err error) bool
- func IsMissing(err error) bool
- func IsUnauthorized(err error) bool
- func Upsert(s *Stream) func(*bolt.Tx) error
- type Connected
- type ConnectionNotif
- type Deleted
- type Disconnected
- type Message
- type Removed
- type Stream
Constants ¶
This section is empty.
Variables ¶
var (
StreamBucket = store.Bucket("streams")
)
Buckets. Note that each River in RiverBucket is a bucket.
Functions ¶
func CheckExists ¶
CheckExists returns a function which returns nil if the Stream with the given ID exists.
func CheckNotExist ¶
CheckNotExist returns a function which returns nil if the Stream with the given ID does not exist.
func GetAll ¶
GetAll returns a function which unmarshals all streams for which the user has ownership. If Filters are passed, only streams for which filter.Member(stream) == true will be returned.
func IsUnauthorized ¶
Types ¶
type Connected ¶
type Connected ConnectionNotif
Connected is a notification Resourcer that can inform a user someone has joined the Stream.
type ConnectionNotif ¶
ConnectionNotif is a base for stream Resourcers to create notifs. Implement store.Resourcer as a method on an alias of ConnectionNotif.
type Deleted ¶
type Deleted string
Deleted is a notification Resourcer that notifies the user a resource has been deleted.
type Disconnected ¶
type Disconnected ConnectionNotif
Disconnected is a notification Resourcer that can inform a user someone has left the Stream.
func (Disconnected) Resource ¶
func (Disconnected) Resource() store.Resource
Resource implements Resourcer.Resource on Disconnected.
type Removed ¶
type Removed string
Removed is a notification Resourcer that can inform a user they have been removed from the Stream without informing them of any other information about the Stream.
type Stream ¶
Stream represents user access to an underlying Router, Coupler, etc.
func (*Stream) Connected ¶
Connected is a method on Stream which returns a Resourcer for the connection notif.
func (*Stream) Disconnected ¶
Disconnected is a method on Stream which returns a Resourcer for the disconnection notif.