ratz/src/chatservers/common/chatuser_collection.go

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 {}

// UsersActiveInChannel retrieves list of allusers who have been active in a particular channel
func (c *UserCollection) UsersActiveInChannel(channelid string, window TimeWindow) (activeusers []UserRecord) {}

// ActiveUsers retrieves list of all users who have been active in any  channel
func (c *UserCollection) ActiveUsers(window TimeWindow) (activeusers []UserRecord) {}

// UserActivityInChannel gives activity count for particular user for particular channel
func (c *UserCollection) UserActivityInChannel(userid UserId, channelid string, window TimeWindow) (rate int) {}

// UserActivityInAllChannels gives activity count for particular user across the server
func (c *UserCollection) UserActivityInAllChannels(userid UserId, window TimeWindow) (count int) {}

func (c *UserCollection) PruneDepartedUsers() {}

func (c *UserCollection) AllUsers() (users []UserRecord) {}