presence

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package presence provides a high-level store of information about user presence on pages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionID added in v0.3.4

type SessionID string

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *Store

func (*Store) Add

func (s *Store) Add(topic Topic, sessionID SessionID) (changed bool)

func (*Store) Count added in v0.2.4

func (s *Store) Count(topic Topic) (count int)

func (*Store) Forget

func (s *Store) Forget(sessionID SessionID)

func (*Store) IsKnown

func (s *Store) IsKnown(sessionID SessionID) bool

func (*Store) List

func (s *Store) List(topic Topic) (users []User, anonymousSessions []SessionID)

func (*Store) Remember

func (s *Store) Remember(sessionID SessionID, userID UserID, userIdentifier UserIdentifier)

func (*Store) Remove

func (s *Store) Remove(topic Topic, sessionID SessionID) (changed bool)

type Topic added in v0.3.4

type Topic string

type User

type User struct {
	ID         UserID
	Identifier UserIdentifier
}

type UserID added in v0.3.4

type UserID string

type UserIdentifier added in v0.3.4

type UserIdentifier string

Jump to

Keyboard shortcuts

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