...

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

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

     1  // +build go1.7
     2  
     3  package storageservice
     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  	"encoding/xml"
    10  
    11  	"github.com/Azure/azure-sdk-for-go/services/classic/management"
    12  )
    13  
    14  // StorageServiceClient is used to perform operations on Azure Storage
    15  type StorageServiceClient struct {
    16  	client management.Client
    17  }
    18  
    19  type ListStorageServicesResponse struct {
    20  	StorageServices []StorageServiceResponse `xml:"StorageService"`
    21  }
    22  
    23  type StorageServiceResponse struct {
    24  	URL                      string `xml:"Url"`
    25  	ServiceName              string
    26  	StorageServiceProperties StorageServiceProperties
    27  }
    28  
    29  type StorageServiceProperties struct {
    30  	Description           string
    31  	Location              string
    32  	Label                 string
    33  	Status                string
    34  	Endpoints             []string `xml:"Endpoints>Endpoint"`
    35  	GeoReplicationEnabled string
    36  	GeoPrimaryRegion      string
    37  }
    38  
    39  type GetStorageServiceKeysResponse struct {
    40  	URL          string `xml:"Url"`
    41  	PrimaryKey   string `xml:"StorageServiceKeys>Primary"`
    42  	SecondaryKey string `xml:"StorageServiceKeys>Secondary"`
    43  }
    44  
    45  type CreateStorageServiceInput struct {
    46  	XMLName xml.Name `xml:"http://schemas.microsoft.com/windowsazure CreateStorageServiceInput"`
    47  	StorageAccountCreateParameters
    48  }
    49  
    50  type StorageAccountCreateParameters struct {
    51  	ServiceName        string
    52  	Description        string `xml:",omitempty"`
    53  	Label              string
    54  	AffinityGroup      string `xml:",omitempty"`
    55  	Location           string `xml:",omitempty"`
    56  	ExtendedProperties ExtendedPropertyList
    57  	AccountType        AccountType
    58  }
    59  
    60  type AccountType string
    61  
    62  const (
    63  	AccountTypeStandardLRS   AccountType = "Standard_LRS"
    64  	AccountTypeStandardZRS   AccountType = "Standard_ZRS"
    65  	AccountTypeStandardGRS   AccountType = "Standard_GRS"
    66  	AccountTypeStandardRAGRS AccountType = "Standard_RAGRS"
    67  	AccountTypePremiumLRS    AccountType = "Premium_LRS"
    68  )
    69  
    70  type ExtendedPropertyList struct {
    71  	ExtendedProperty []ExtendedProperty
    72  }
    73  
    74  type ExtendedProperty struct {
    75  	Name  string
    76  	Value string
    77  }
    78  
    79  type AvailabilityResponse struct {
    80  	XMLName xml.Name `xml:"AvailabilityResponse"`
    81  	Xmlns   string   `xml:"xmlns,attr"`
    82  	Result  bool
    83  	Reason  string
    84  }
    85  

View as plain text