client/lxd_projects.go
func (r *ProtocolLXD) GetProjects() ([]api.Project, error) {
	if !r.HasExtension("projects") {
		return nil, fmt.Errorf("The server is missing the required \"projects\" API extension")
	}

	projects := []api.Project{}

	// Fetch the raw value
	_, err := r.queryStruct("GET", "/projects?recursion=1", nil, "", &projects)
	if err != nil {
		return nil, err
	}

	return projects, nil
}
func (r *ProtocolLXD) GetProjects() ([]api.Project, error) {
	if !r.HasExtension("projects") {
		return nil, fmt.Errorf("The server is missing the required \"projects\" API extension")
	}

	projects := []api.Project{}

	// Fetch the raw value
	_, err := r.queryStruct("GET", "/projects?recursion=1", nil, "", &projects)
	if err != nil {
		return nil, err
	}

	return projects, nil
}
func ( r * ProtocolLXD ) GetProjects ( ) ( [ ] api . Project , error ) { if ! r . HasExtension ( " " ) { return nil , fmt . Errorf ( " \" \" " ) } projects := [ ] api . Project { } // Fetch the raw value _ , err := r . queryStruct ( " " , " " , nil , " " , & projects ) if err != nil { return nil , err } return projects , nil }
// GetProjects returns a list of available Project structs
GetProjects returns a list of available Project structs