Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionOptions ¶
type DataFriendList ¶
type DataFriendList struct {
Friends []string `json:"friends"`
}
type DataSession ¶
type DataSession struct {
Host string `json:"host"`
}
type Db ¶
type Db interface {
GetFriendList(ctx context.Context, id string) ([]string, error)
SetFriendList(ctx context.Context, id string, friends []string) error
GetSessionData(ctx context.Context, ids []string) (map[string]DataSession, error)
SetSessionData(ctx context.Context, id string, data DataSession) error
Subscribe(ctx context.Context) (chan PresenceChangedEvent, error)
SendNotification(ctx context.Context, n PresenceChangedEvent) error
}
func New ¶
func New(opts ConnectionOptions) Db
type PresenceChangedEvent ¶
Click to show internal directories.
Click to hide internal directories.