// AddIndexName will add an index name.
// If path == $filename then it redirects to Root, which defaults to "/".
//
// It can be called BEFORE the server start.
429930
func (s *SPABuilder) AddIndexName(filename string) *SPABuilder {
	s.IndexNames = append(s.IndexNames, filename)
	return s
}
1172039
func (i *index) Name() string {
	parts := strings.Split(i.id, "/")
	return parts[1]
}
715210
func (s *DeleteGlobalSecondaryIndexAction) SetIndexName(v string) *DeleteGlobalSecondaryIndexAction {
	s.IndexName = &v
	return s
}
735744
func (s Session) AddSessionName(name string) Session {
	return s.appendString(TypeSessionName, name)
}
1134073
func FormatIndexFileName(id, level int) string {
	return fmt.Sprintf("L%d-%08d%s", level, id, IndexFileExt)
}
574426
func (idx *IndexMap) Rename(indname string) *IndexMap {
	idx.IndexName = indname
	return idx
}
162709
func AddPrefix(path string) string {
	if !strings.HasPrefix(path, Prefix) {
		path = Prefix + path
	}
	return path
}
845028
func (s *DescribeIndexOutput) SetIndexName(v string) *DescribeIndexOutput {
	s.IndexName = &v
	return s
}
951534
func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsDescription {
	s.IndexName = &v
	return s
}
1039724
func NewIndex(path, name string) (*Index, error) {
	err := validateName(name)
	if err != nil {
		return nil, errors.Wrap(err, "validating name")
	}

	return &Index{
		path:   path,
		name:   name,
		fields: make(map[string]*Field),

		newAttrStore: newNopAttrStore,
		columnAttrs:  nopStore,

		broadcaster:    NopBroadcaster,
		Stats:          stats.NopStatsClient,
		logger:         logger.NopLogger,
		trackExistence: true,
	}, nil
}
879416
func (s *ElasticsearchDestinationDescription) SetIndexName(v string) *ElasticsearchDestinationDescription {
	s.IndexName = &v
	return s
}
708797
func canonicalTarName(name string, isDir bool) (string, error) {
	name, err := CanonicalTarNameForPath(name)
	if err != nil {
		return "", err
	}

	// suffix with '/' for directories
	if isDir && !strings.HasSuffix(name, "/") {
		name += "/"
	}
	return name, nil
}
1221197
func folderNameFromFileName(filename string) string {
	base := filepath.Base(filename)
	firstDot := strings.Index(base, ".")
	if firstDot > -1 {
		return base[:firstDot]
	}
	return base
}
316200
func (c Config) GetIndexPath(base string) string {
	if c.IndexPath != "" {
		return c.IndexPath
	}
	return filepath.Join(base, DefaultIndexDirectoryName)
}
421302
func (o *Object) AddToIndex(indexName string, indexValue string) {
	if o.Indexes == nil {
		o.Indexes = make(map[string][]string)
	}
	if o.Indexes[indexName] == nil {
		o.Indexes[indexName] = make([]string, 1)
		o.Indexes[indexName][0] = indexValue
	} else {
		o.Indexes[indexName] = append(o.Indexes[indexName], indexValue)
	}
}
299872
func (s *ElasticsearchDestinationConfiguration) SetIndexName(v string) *ElasticsearchDestinationConfiguration {
	s.IndexName = &v
	return s
}
779313
func (table *Table) AddIndex(index *Index) {
	table.Indexes[index.Name] = index
}