// ProjectNames returns a sorted list of the names of all of the projects
// that the supplied authority can view.
426425
func ProjectNames(c context.Context, a cfgclient.Authority) ([]types.ProjectName, error) {
	configPath := ProjectConfigPath(c)

	var metas []*config.Meta
	if err := cfgclient.Projects(c, a, configPath, nil, &metas); err != nil {
		log.WithError(err).Errorf(c, "Failed to load project configs.")
		return nil, err
	}

	// Iterate through our Metas and extract the project names.
	projects := make([]types.ProjectName, 0, len(metas))
	for _, meta := range metas {
		if projectName := meta.ConfigSet.Project(); projectName != "" {
			projects = append(projects, types.ProjectName(projectName))
		}
	}
	sort.Sort(projectNameSlice(projects))
	return projects, nil
}
1182432
func (cache *RelationCache) MemberNames() (memberNames []string) {
	for memberName := range cache.members {
		memberNames = append(memberNames, memberName)
	}
	sort.Strings(memberNames)
	return memberNames
}
962364
func (a Fields) AliasNames() []string {
	names := []string{}
	for _, f := range a {
		names = append(names, f.Name())
	}
	return names
}
1338338
func (s *ListProjectsOutput) SetProjects(v []*ProjectSummary) *ListProjectsOutput {
	s.Projects = v
	return s
}
976939
func (s *UpdatePlacementInput) SetProjectName(v string) *UpdatePlacementInput {
	s.ProjectName = &v
	return s
}
9786
func (s *PlacementDescription) SetProjectName(v string) *PlacementDescription {
	s.ProjectName = &v
	return s
}
756749
func (c *Client) ListProjects(p *ListProjectsParameter) ([]*Project, error) {
	obj, err := c.Request("listProjects", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.([]*Project), err
}
347119
func (r *ClusterVFS) listNames() ([]string, error) {
	paths, err := r.basePath.ReadTree()
	if err != nil {
		return nil, fmt.Errorf("error reading state store: %v", err)
	}

	var keys []string
	for _, p := range paths {
		relativePath, err := vfs.RelativePath(r.basePath, p)
		if err != nil {
			return nil, err
		}
		if !strings.HasSuffix(relativePath, "/config") {
			continue
		}
		key := strings.TrimSuffix(relativePath, "/config")
		keys = append(keys, key)
	}
	return keys, nil
}
654997
func (s *Build) SetProjectName(v string) *Build {
	s.ProjectName = &v
	return s
}
914720
func (s *StartBuildInput) SetProjectName(v string) *StartBuildInput {
	s.ProjectName = &v
	return s
}
1179456
func (s *DisassociateDeviceFromPlacementInput) SetProjectName(v string) *DisassociateDeviceFromPlacementInput {
	s.ProjectName = &v
	return s
}
915833
func (s *InvalidateProjectCacheInput) SetProjectName(v string) *InvalidateProjectCacheInput {
	s.ProjectName = &v
	return s
}
522032
func (b *Backends) Names() []string {
	var names []string
	for _, backend := range b.Backends {
		names = append(names, backend.Name)
	}
	return names
}
1050723
func GetBuildsWithProjectName(projectName string) []*Build {
	o := orm.NewOrm()

	var builds []*Build
	num, err := o.QueryTable("build").Filter("project_name", projectName).All(&builds)
	fmt.Printf("Returned Rows Num: %s, %s", num, err)
	return builds
}
374989
func (i Indexes) Names() (v []string) {
	for k := range i {
		v = append(v, k)
	}
	return
}
1102368
func (v *version) AppProjects() AppProjectInformer {
	return &appProjectInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
599437
func (r *Repository) GetHasProjects() bool {
	if r == nil || r.HasProjects == nil {
		return false
	}
	return *r.HasProjects
}