Documentation ¶
Overview ¶
Package storage provides clients for Microsoft Azure Storage Services.
Index ¶
- Constants
- type AzureStorageServiceError
- type AzureTable
- type Client
- type TableEntity
- type TableServiceClient
- func (c *TableServiceClient) BatchInsert(table AzureTable, entities []*TableEntity) error
- func (c *TableServiceClient) CreateTable(table AzureTable) error
- func (c *TableServiceClient) DeleteTable(table AzureTable) error
- func (c *TableServiceClient) InsertEntity(table AzureTable, entity TableEntity) error
- type UnexpectedStatusCodeError
Constants ¶
const ( // DefaultBaseURL is the domain name used for storage requests when a // default client is created. DefaultBaseURL = "core.windows.net" // DefaultAPIVersion is the Azure Storage API version string used when a // basic client is created. DefaultAPIVersion = "2015-02-21" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureStorageServiceError ¶
type AzureStorageServiceError struct { Code string `xml:"Code"` Message string `xml:"Message"` AuthenticationErrorDetail string `xml:"AuthenticationErrorDetail"` QueryParameterName string `xml:"QueryParameterName"` QueryParameterValue string `xml:"QueryParameterValue"` Reason string `xml:"Reason"` StatusCode int RequestID string }
AzureStorageServiceError contains fields of the error response from Azure Storage Service REST API. See https://msdn.microsoft.com/en-us/library/azure/dd179382.aspx Some fields might be specific to certain calls.
func (AzureStorageServiceError) Error ¶
func (e AzureStorageServiceError) Error() string
type Client ¶
type Client struct { // HTTPClient is the http.Client used to initiate API // requests. If it is nil, http.DefaultClient is used. HTTPClient *http.Client // contains filtered or unexported fields }
Client is the object that needs to be constructed to perform operations on the storage account.
func NewBasicClient ¶
NewBasicClient constructs a Client with given storage service name and key.
func (Client) GetTableService ¶
func (c Client) GetTableService() TableServiceClient
GetTableService returns a TableServiceClient which can operate on the table service of the storage account.
type TableEntity ¶
TableEntity struct specifies entity to be saved to Azure Tables
type TableServiceClient ¶
type TableServiceClient struct {
// contains filtered or unexported fields
}
TableServiceClient contains operations for Microsoft Azure Table Storage Service.
func (*TableServiceClient) BatchInsert ¶
func (c *TableServiceClient) BatchInsert(table AzureTable, entities []*TableEntity) error
BatchInsert inserts set of entities in the specified table. Function assumes that batch is formed properly
func (*TableServiceClient) CreateTable ¶
func (c *TableServiceClient) CreateTable(table AzureTable) error
CreateTable creates the table given the specific name. This function fails if the name is not compliant with the specification.
func (*TableServiceClient) DeleteTable ¶
func (c *TableServiceClient) DeleteTable(table AzureTable) error
DeleteTable deletes the table given the specific name. This function fails if the table is not present. Be advised: DeleteTable deletes all the entries that may be present.
func (*TableServiceClient) InsertEntity ¶
func (c *TableServiceClient) InsertEntity(table AzureTable, entity TableEntity) error
InsertEntity inserts an entity in the specified table. The function fails if there is an entity with the same PartitionKey and RowKey in the table.
type UnexpectedStatusCodeError ¶
type UnexpectedStatusCodeError struct {
// contains filtered or unexported fields
}
UnexpectedStatusCodeError is returned when a storage service responds with neither an error nor with an HTTP status code indicating success.
func (UnexpectedStatusCodeError) Error ¶
func (e UnexpectedStatusCodeError) Error() string