...

Source file src/github.com/Azure/azure-sdk-for-go/services/classic/management/location/entities.go

Documentation: github.com/Azure/azure-sdk-for-go/services/classic/management/location

     1  // +build go1.7
     2  
     3  package location
     4  
     5  // Copyright (c) Microsoft Corporation. All rights reserved.
     6  // Licensed under the MIT License. See License.txt in the project root for license information.
     7  
     8  import (
     9  	"bytes"
    10  	"encoding/xml"
    11  	"fmt"
    12  	"strings"
    13  
    14  	"github.com/Azure/azure-sdk-for-go/services/classic/management"
    15  )
    16  
    17  //LocationClient is used to perform operations on Azure Locations
    18  type LocationClient struct {
    19  	client management.Client
    20  }
    21  
    22  type ListLocationsResponse struct {
    23  	XMLName   xml.Name   `xml:"Locations"`
    24  	Locations []Location `xml:"Location"`
    25  }
    26  
    27  type Location struct {
    28  	Name                    string
    29  	DisplayName             string
    30  	AvailableServices       []string `xml:"AvailableServices>AvailableService"`
    31  	WebWorkerRoleSizes      []string `xml:"ComputeCapabilities>WebWorkerRoleSizes>RoleSize"`
    32  	VirtualMachineRoleSizes []string `xml:"ComputeCapabilities>VirtualMachinesRoleSizes>RoleSize"`
    33  }
    34  
    35  func (ll ListLocationsResponse) String() string {
    36  	var buf bytes.Buffer
    37  	for _, l := range ll.Locations {
    38  		fmt.Fprintf(&buf, "%s, ", l.Name)
    39  	}
    40  
    41  	return strings.Trim(buf.String(), ", ")
    42  }
    43  

View as plain text