roam

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageHandler

type MessageHandler func(userID string, message []byte)

MessageHandler is handler function for roam-go MessageHandler func passed in with subscribe method will be invoked on receiving data from backend

type Subscription

type Subscription interface {
	// Subscribe will subscribe and trigger handler func on message
	Subscribe(handler MessageHandler) error
	//Unsubscribe will unsubscribe from subscibed topics
	Unsubscribe() error
}

Subscription is interface definition for a roam-go client

func NewGroupSubscription

func NewGroupSubscription(apikey, groupID string) (Subscription, error)

NewGroupSubscription to initialize subscription to subscribe to group level data

func NewProjectSubscription

func NewProjectSubscription(apikey string) (Subscription, error)

NewProjectSubscription to initialize subscription to subscribe to project level data

func NewUserSubscription

func NewUserSubscription(apikey, userID string) (Subscription, error)

NewUserSubscription to initialize subscription to subscribe to a single user data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL