// IndicesByAlias returns all indices given a specific alias name.
559709
func (ar AliasesResult) IndicesByAlias(aliasName string) []string {
	var indices []string
	for indexName, indexInfo := range ar.Indices {
		for _, aliasInfo := range indexInfo.Aliases {
			if aliasInfo.AliasName == aliasName {
				indices = append(indices, indexName)
			}
		}
	}
	return indices
}
899583
func ValidAlias(alias string) bool {
	for _, i := range DateTimeAliases {
		if i == alias {
			return true
		}
	}
	return false
}
885619
func alias(a, b *decimal.Big) *decimal.Big {
	if a != b {
		return a
	}
	return decimal.WithContext(a.Context)
}
155446
func (s *DistributionSummary) SetAliases(v *Aliases) *DistributionSummary {
	s.Aliases = v
	return s
}
959679
func (fm *filterManager) FilterByIndex(index int) Filter {
	fm.fmLocker.RLock()
	defer fm.fmLocker.RUnlock()
	n := len(fm.filters)
	if index < 0 && index >= n {
		return nil
	}
	return fm.filters[index]
}
259668
func (f *Fpdf) RegisterAlias(alias, replacement string) {
	f.aliasMap[alias] = replacement
}
561423
func (ir indexResult) HasAlias(aliasName string) bool {
	for _, alias := range ir.Aliases {
		if alias.AliasName == aliasName {
			return true
		}
	}
	return false
}
1259797
func (s *ClusterStateService) Indices(indices ...string) *ClusterStateService {
	s.indices = make([]string, 0)
	s.indices = append(s.indices, indices...)
	return s
}
1216668
func (s *DirectoryDescription) SetAlias(v string) *DirectoryDescription {
	s.Alias = &v
	return s
}
288942
func (s *DescribeOrganizationOutput) SetAlias(v string) *DescribeOrganizationOutput {
	s.Alias = &v
	return s
}
932044
func (f *Function) GetAliases() (*lambda.ListAliasesOutput, error) {
	f.Log.Debug("fetching aliases")
	return f.Service.ListAliases(&lambda.ListAliasesInput{
		FunctionName: &f.FunctionName,
	})
}
294716
func (c *threadSafeMap) ByIndex(indexName, indexKey string) ([]interface{}, error) {
	c.lock.RLock()
	defer c.lock.RUnlock()

	indexFunc := c.indexers[indexName]
	if indexFunc == nil {
		return nil, fmt.Errorf("Index with name %s does not exist", indexName)
	}

	index := c.indices[indexName]

	set := index[indexKey]
	list := make([]interface{}, 0, set.Len())
	for _, key := range set.List() {
		list = append(list, c.items[key])
	}

	return list, nil
}
1075142
func (s *ListAliasesOutput) SetAliases(v []*AliasConfiguration) *ListAliasesOutput {
	s.Aliases = v
	return s
}
5921
func loadAlias(filename, alias string) (hostConfig, error) {
	cfg := &config{}
	configBytes, err := ioutil.ReadFile(filename)
	if err != nil {
		return hostConfig{}, err
	}
	if err = json.Unmarshal(configBytes, cfg); err != nil {
		return hostConfig{}, err
	}
	return cfg.Hosts[alias], nil
}
1304165
func (i *IdentityStore) entityByAliasFactorsInTxn(txn *memdb.Txn, mountAccessor, aliasName string, clone bool) (*identity.Entity, error) {
	if txn == nil {
		return nil, fmt.Errorf("nil txn")
	}

	if mountAccessor == "" {
		return nil, fmt.Errorf("missing mount accessor")
	}

	if aliasName == "" {
		return nil, fmt.Errorf("missing alias name")
	}

	alias, err := i.MemDBAliasByFactorsInTxn(txn, mountAccessor, aliasName, false, false)
	if err != nil {
		return nil, err
	}

	if alias == nil {
		return nil, nil
	}

	return i.MemDBEntityByAliasIDInTxn(txn, alias.ID, clone)
}
88746
func IndexResourcesByName(items []Resource) map[string]Resource {
	indexed := make(map[string]Resource, len(items))
	for _, item := range items {
		indexed[GetResourceName(item)] = item
	}
	return indexed
}
1365377
func (s *AliasListEntry) SetAliasName(v string) *AliasListEntry {
	s.AliasName = &v
	return s
}