//GetAllSlots returns a list of all occupied slots in the lobby
324357
func (lobby *Lobby) ShuffleAllSlots() error {
	if lobby.GetPlayerNumber() == lobby.RequiredPlayers() {
		return errors.New("Cannot shuffle a full lobby")
	}

	lobby.Lock()
	lobby.GetAllSlots()
	classes := format.GetClasses(lobby.Type)
	swapClass := make(map[string]bool)

	for _, className := range classes {
		swapClass[className] = rand.Intn(2) == 1
	}

	err := db.DB.Delete(&LobbySlot{}, "lobby_id = ?", lobby.ID).Error
	if err != nil {
		return err
	}

	numClasses := len(classes)
	for i := range lobby.Slots {
		slot := &lobby.Slots[i]
		if swapClass[classes[slot.Slot%numClasses]] {
			slot.Slot = (slot.Slot + numClasses) % (2 * numClasses)
		}
		if err = db.DB.Create(&slot).Error; err != nil {
			return err
		}
	}
	lobby.Unlock()

	lobby.OnChange(true)
	return nil
}
1230657
func (c *IPChannelList) GetAllChannels() ([]IPChannel, error) {
	channels := c.Channels
	t := c

	for t.HasNextPage() {
		var err error
		t, err = t.NextPage()
		if err != nil {
			return nil, err
		}
		channels = append(channels, t.Channels...)
	}
	return channels, nil
}
853205
func (s *Sensu) GetStashesSlice(limit int, offset int) ([]interface{}, error) {
	return s.getList(fmt.Sprintf("stashes"), limit, offset)
}
904292
func GetAll() map[Kind][]Plugin {
	plugins := pluginGlobal.plugins()
	if plugins == nil {
		return nil
	}
	return plugins.plugins
}
968630
func (_class SRClass) GetAll(sessionID SessionRef) (_retval []SRRef, _err error) {
	_method := "SR.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertSRRefSetToGo(_method + " -> ", _result.Value)
	return
}
125239
func (api *SubnetsAPI) GetAll(options *SubnetGetOptions) (result *Subnets, err error) {
	uri := api.client.Endpoint + subnetUrl
	if options != nil {
		uri += getQueryString(options)
	}
	res, err := api.client.restClient.GetList(api.client.Endpoint, uri, api.client.options.TokenOptions)
	if err != nil {
		return
	}

	result = &Subnets{}
	err = json.Unmarshal(res, result)
	return
}
75301
func (_class ClusterHostClass) GetAll(sessionID SessionRef) (_retval []ClusterHostRef, _err error) {
	_method := "Cluster_host.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertClusterHostRefSetToGo(_method + " -> ", _result.Value)
	return
}
547867
func (c *Client) GetAllocFS(allocID string) (allocdir.AllocDirFS, error) {
	ar, err := c.getAllocRunner(allocID)
	if err != nil {
		return nil, err
	}

	return ar.GetAllocDir(), nil
}
403417
func (s *IPUserList) GetAllUsers() ([]IPUser, error) {
	users := s.Users
	t := s

	for t.HasNextPage() {
		var err error
		t, err = t.NextPage()
		if err != nil {
			return nil, err
		}
		users = append(users, t.Users...)
	}
	return users, nil
}
1255455
func GetAllTablets(ctx context.Context, ts *topo.Server, cell string) ([]*topo.TabletInfo, error) {
	aliases, err := ts.GetTabletsByCell(ctx, cell)
	if err != nil {
		return nil, err
	}
	sort.Sort(topoproto.TabletAliasList(aliases))

	tabletMap, err := ts.GetTabletMap(ctx, aliases)
	if err != nil {
		// we got another error than topo.ErrNoNode
		return nil, err
	}
	tablets := make([]*topo.TabletInfo, 0, len(aliases))
	for _, tabletAlias := range aliases {
		tabletInfo, ok := tabletMap[topoproto.TabletAliasString(tabletAlias)]
		if !ok {
			// tablet disappeared on us (GetTabletMap ignores
			// topo.ErrNoNode), just echo a warning
			log.Warningf("failed to load tablet %v", tabletAlias)
		} else {
			tablets = append(tablets, tabletInfo)
		}
	}

	return tablets, nil
}
741808
func (c *Cacher) GetAll() map[string]interface{} {
	c.mu.RLock()
	defer c.mu.RUnlock()
	// in order to avoid data race, we must copy the map
	ret := make(map[string]interface{}, len(c.data))
	for k, v := range c.data {
		ret[k] = v
	}
	return ret
}
64253
func (_class PoolUpdateClass) GetAll(sessionID SessionRef) (_retval []PoolUpdateRef, _err error) {
	_method := "pool_update.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertPoolUpdateRefSetToGo(_method + " -> ", _result.Value)
	return
}
612018
func (_class BlobClass) GetAll(sessionID SessionRef) (_retval []BlobRef, _err error) {
	_method := "blob.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertBlobRefSetToGo(_method + " -> ", _result.Value)
	return
}
796539
func (_class PUSBClass) GetAll(sessionID SessionRef) (_retval []PUSBRef, _err error) {
	_method := "PUSB.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertPUSBRefSetToGo(_method + " -> ", _result.Value)
	return
}
823085
func AllStages() sets.String {
	return sets.NewString(
		audit.StageRequestReceived,
		audit.StageResponseStarted,
		audit.StageResponseComplete,
		audit.StagePanic,
	)
}
810220
func (p *propertySet) filterAllocs(allocs []*structs.Allocation, filterTerminal bool) []*structs.Allocation {
	n := len(allocs)
	for i := 0; i < n; i++ {
		remove := false
		if filterTerminal {
			remove = allocs[i].TerminalStatus()
		}

		// If the constraint is on the task group filter the allocations to just
		// those on the task group
		if p.taskGroup != "" {
			remove = remove || allocs[i].TaskGroup != p.taskGroup
		}

		if remove {
			allocs[i], allocs[n-1] = allocs[n-1], nil
			i--
			n--
		}
	}
	return allocs[:n]
}
1338666
func (_class HostPatchClass) GetAll(sessionID SessionRef) (_retval []HostPatchRef, _err error) {
	_method := "host_patch.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertHostPatchRefSetToGo(_method + " -> ", _result.Value)
	return
}