type UserCollection …
func NewUserCollection(server ChatServer, users map[UserId]UserRecord, fetchFunc func(UserId, ChatServer) (UserRecord, error)) *UserCollection { … }
type Role …
type RolesCollection …
func (c RolesCollection) Role(id string) Role { … }
func (c *UserCollection) Fetch(uid UserId) UserRecord { … }
func (c *UserCollection) UsersActiveInChannel(channelid string, window TimeWindow) (activeusers []UserRecord) { … }
func (c *UserCollection) ActiveUsers(window TimeWindow) (activeusers []UserRecord) { … }
func (c *UserCollection) UserActivityInChannel(userid UserId, channelid string, window TimeWindow) (rate int) { … }
func (c *UserCollection) UserActivityInAllChannels(userid UserId, window TimeWindow) (count int) { … }
func (c *UserCollection) PruneDepartedUsers() { … }
func (c *UserCollection) AllUsers() (users []UserRecord) { … }