// Map can map ids to key.Destination objects.
500546
func (vind *Null) Map(cursor VCursor, ids []sqltypes.Value) ([]key.Destination, error) {
	out := make([]key.Destination, 0, len(ids))
	for i := 0; i < len(ids); i++ {
		out = append(out, key.DestinationKeyspaceID(nullksid))
	}
	return out, nil
}
813274
func (y *Yaml) Map() (map[interface{}]interface{}, error) {
	if m, ok := (y.data).(map[interface{}]interface{}); ok {
		return m, nil
	}
	return nil, errors.New("type assertion to map[interface]interface{} failed")
}
676470
func Map(array []interface{}, iterator ResultIterator) []interface{} {
	var result = make([]interface{}, len(array))
	for index, data := range array {
		result[index] = iterator(data, index)
	}
	return result
}
899499
func (i *injector) Map(val interface{}) TypeMapper {
	i.values[reflect.TypeOf(val)] = reflect.ValueOf(val)
	return i
}
1314038
func (t *Template) Map() (map[string]interface{}, error) {
	m := map[string]interface{}{
		"$schema":        schema,
		"contentVersion": contentVersion,
		"resources":      t.Resources,
	}
	return m, nil
}
82145
func (i *ImageService) Map() map[image.ID]*image.Image {
	return i.imageStore.Map()
}
780444
func (kinds *Kinds) Map() map[string]*Kind {
	m := make(map[string]*Kind, len(kinds.GetKind()))
	for _, k := range kinds.GetKind() {
		m[k.Name] = k
	}
	return m
}
736404
func (s Seq) Map(mapfn func(i int, v float64) float64) Seq {
	output := make([]float64, s.Len())
	for i := 0; i < s.Len(); i++ {
		mapfn(i, s.GetValue(i))
	}
	return Seq{Array(output)}
}
1140081
func (domain *TypedDataDomain) Map() map[string]interface{} {
	dataMap := map[string]interface{}{}

	if domain.ChainId != nil {
		dataMap["chainId"] = domain.ChainId
	}

	if len(domain.Name) > 0 {
		dataMap["name"] = domain.Name
	}

	if len(domain.Version) > 0 {
		dataMap["version"] = domain.Version
	}

	if len(domain.VerifyingContract) > 0 {
		dataMap["verifyingContract"] = domain.VerifyingContract
	}

	if len(domain.Salt) > 0 {
		dataMap["salt"] = domain.Salt
	}
	return dataMap
}
1227473
func (r RoleMap) Map(remoteRoles []string) ([]string, error) {
	_, err := r.parse()
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var outRoles []string
	// when no remote roles is specified, assume that
	// there is a single empty remote role (that should match wildcards)
	if len(remoteRoles) == 0 {
		remoteRoles = []string{""}
	}
	for _, mapping := range r {
		expression := mapping.Remote
		for _, remoteRole := range remoteRoles {
			// never map default implicit role, it is always
			// added by default
			if remoteRole == teleport.DefaultImplicitRole {
				continue
			}
			for _, replacementRole := range mapping.Local {
				replacement, err := utils.ReplaceRegexp(expression, replacementRole, remoteRole)
				switch {
				case err == nil:
					// empty replacement can occur when $2 expand refers
					// to non-existing capture group in match expression
					if replacement != "" {
						outRoles = append(outRoles, replacement)
					}
				case trace.IsNotFound(err):
					continue
				default:
					return nil, trace.Wrap(err)
				}
			}
		}
	}
	return outRoles, nil
}
1004773
func (mp MultiPoint) Map() map[string]interface{} {
	result := make(map[string]interface{})
	result[COORDINATES] = mp.Coordinates
	result[TYPE] = MULTIPOINT
	return result
}
794182
func (m *MSS) Map() *Properties {
	if m.base.properties != nil {
		return m.base.properties
	}
	return &Properties{}
}
184383
func (vind *Hash) Map(cursor VCursor, ids []sqltypes.Value) ([]key.Destination, error) {
	out := make([]key.Destination, len(ids))
	for i, id := range ids {
		var num uint64
		var err error

		if id.IsSigned() {
			// This is ToUint64 with no check on negative values.
			str := id.ToString()
			var ival int64
			ival, err = strconv.ParseInt(str, 10, 64)
			num = uint64(ival)
		} else {
			num, err = sqltypes.ToUint64(id)
		}

		if err != nil {
			out[i] = key.DestinationNone{}
			continue
		}
		out[i] = key.DestinationKeyspaceID(vhash(num))
	}
	return out, nil
}
1105205
func (t *PackageList) Map() map[*build.Package]bool {
	t.ensureInit()
	return t.pkgpool
}
207832
func (polygon Polygon) Map() map[string]interface{} {
	result := make(map[string]interface{})
	result[COORDINATES] = polygon.Coordinates
	result[TYPE] = POLYGON
	return result
}
571355
func (vind *UnicodeLooseMD5) Map(cursor VCursor, ids []sqltypes.Value) ([]key.Destination, error) {
	out := make([]key.Destination, 0, len(ids))
	for _, id := range ids {
		data, err := unicodeHash(id)
		if err != nil {
			return nil, fmt.Errorf("UnicodeLooseMD5.Map: %v", err)
		}
		out = append(out, key.DestinationKeyspaceID(data))
	}
	return out, nil
}
141612
func (feature *Feature) Map() map[string]interface{} {
	result := make(map[string]interface{})
	switch ft := feature.Geometry.(type) {
	case Mapper:
		result[GEOMETRY] = ft.Map()
	case map[string]interface{}:
		result[GEOMETRY] = ft
	default:
		result[GEOMETRY] = nil
	}
	result[PROPERTIES] = feature.Properties
	result[TYPE] = FEATURE
	result[ID] = feature.ID
	return result
}