func (us *TimedUserSet) AddUser(user config.User) error { id := user.ID() idx := len(us.validUsers) us.validUsers = append(us.validUsers, user) nowSec := time.Now().Unix() lastSec := nowSec - cacheDurationSec us.generateNewHashes(lastSec, nowSec+cacheDurationSec, idx, id) return nil }
func (us *MockUserSet) AddUser(user config.User) error { us.UserIds = append(us.UserIds, user.ID()) return nil }