Documentation ¶
Index ¶
- Constants
- func UserAgent() string
- type Client
- func (client Client) Delete(ctx context.Context, accountName, tableName string, input DeleteEntityInput) (result autorest.Response, err error)
- func (client Client) DeletePreparer(ctx context.Context, accountName, tableName string, input DeleteEntityInput) (*http.Request, error)
- func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) DeleteSender(req *http.Request) (*http.Response, error)
- func (client Client) Get(ctx context.Context, accountName, tableName string, input GetEntityInput) (result GetEntityResult, err error)
- func (client Client) GetPreparer(ctx context.Context, accountName, tableName string, input GetEntityInput) (*http.Request, error)
- func (client Client) GetResourceID(accountName, tableName, partitionKey, rowKey string) string
- func (client Client) GetResponder(resp *http.Response) (result GetEntityResult, err error)
- func (client Client) GetSender(req *http.Request) (*http.Response, error)
- func (client Client) Insert(ctx context.Context, accountName, tableName string, input InsertEntityInput) (result autorest.Response, err error)
- func (client Client) InsertOrMerge(ctx context.Context, accountName, tableName string, ...) (result autorest.Response, err error)
- func (client Client) InsertOrMergePreparer(ctx context.Context, accountName, tableName string, ...) (*http.Request, error)
- func (client Client) InsertOrMergeResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) InsertOrMergeSender(req *http.Request) (*http.Response, error)
- func (client Client) InsertOrReplace(ctx context.Context, accountName, tableName string, ...) (result autorest.Response, err error)
- func (client Client) InsertOrReplacePreparer(ctx context.Context, accountName, tableName string, ...) (*http.Request, error)
- func (client Client) InsertOrReplaceResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) InsertOrReplaceSender(req *http.Request) (*http.Response, error)
- func (client Client) InsertPreparer(ctx context.Context, accountName, tableName string, input InsertEntityInput) (*http.Request, error)
- func (client Client) InsertResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) InsertSender(req *http.Request) (*http.Response, error)
- func (client Client) Query(ctx context.Context, accountName, tableName string, input QueryEntitiesInput) (result QueryEntitiesResult, err error)
- func (client Client) QueryPreparer(ctx context.Context, accountName, tableName string, input QueryEntitiesInput) (*http.Request, error)
- func (client Client) QueryResponder(resp *http.Response) (result QueryEntitiesResult, err error)
- func (client Client) QuerySender(req *http.Request) (*http.Response, error)
- type DeleteEntityInput
- type GetEntityInput
- type GetEntityResult
- type InsertEntityInput
- type InsertOrMergeEntityInput
- type InsertOrReplaceEntityInput
- type MetaDataLevel
- type QueryEntitiesInput
- type QueryEntitiesResult
- type ResourceID
- type StorageTableEntity
Constants ¶
const APIVersion = "2020-08-04"
APIVersion is the version of the API used for all Storage API Operations
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is the base client for Table Storage Shares.
func NewWithEnvironment ¶
func NewWithEnvironment(environment azure.Environment) Client
NewWithEnvironment creates an instance of the Client client.
func (Client) Delete ¶
func (client Client) Delete(ctx context.Context, accountName, tableName string, input DeleteEntityInput) (result autorest.Response, err error)
Delete deletes an existing entity in a table.
func (Client) DeletePreparer ¶
func (client Client) DeletePreparer(ctx context.Context, accountName, tableName string, input DeleteEntityInput) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (Client) DeleteResponder ¶
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (Client) DeleteSender ¶
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (Client) Get ¶
func (client Client) Get(ctx context.Context, accountName, tableName string, input GetEntityInput) (result GetEntityResult, err error)
Get queries entities in a table and includes the $filter and $select options.
func (Client) GetPreparer ¶
func (client Client) GetPreparer(ctx context.Context, accountName, tableName string, input GetEntityInput) (*http.Request, error)
GetPreparer prepares the Get request.
func (Client) GetResourceID ¶
GetResourceID returns the Resource ID for the given Entity This can be useful when, for example, you're using this as a unique identifier
func (Client) GetResponder ¶
func (client Client) GetResponder(resp *http.Response) (result GetEntityResult, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (Client) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (Client) Insert ¶
func (client Client) Insert(ctx context.Context, accountName, tableName string, input InsertEntityInput) (result autorest.Response, err error)
Insert inserts a new entity into a table.
func (Client) InsertOrMerge ¶
func (client Client) InsertOrMerge(ctx context.Context, accountName, tableName string, input InsertOrMergeEntityInput) (result autorest.Response, err error)
InsertOrMerge updates an existing entity or inserts a new entity if it does not exist in the table. Because this operation can insert or update an entity, it is also known as an upsert operation.
func (Client) InsertOrMergePreparer ¶
func (client Client) InsertOrMergePreparer(ctx context.Context, accountName, tableName string, input InsertOrMergeEntityInput) (*http.Request, error)
InsertOrMergePreparer prepares the InsertOrMerge request.
func (Client) InsertOrMergeResponder ¶
func (client Client) InsertOrMergeResponder(resp *http.Response) (result autorest.Response, err error)
InsertOrMergeResponder handles the response to the InsertOrMerge request. The method always closes the http.Response Body.
func (Client) InsertOrMergeSender ¶
InsertOrMergeSender sends the InsertOrMerge request. The method will close the http.Response Body if it receives an error.
func (Client) InsertOrReplace ¶
func (client Client) InsertOrReplace(ctx context.Context, accountName, tableName string, input InsertOrReplaceEntityInput) (result autorest.Response, err error)
InsertOrReplace replaces an existing entity or inserts a new entity if it does not exist in the table. Because this operation can insert or update an entity, it is also known as an upsert operation.
func (Client) InsertOrReplacePreparer ¶
func (client Client) InsertOrReplacePreparer(ctx context.Context, accountName, tableName string, input InsertOrReplaceEntityInput) (*http.Request, error)
InsertOrReplacePreparer prepares the InsertOrReplace request.
func (Client) InsertOrReplaceResponder ¶
func (client Client) InsertOrReplaceResponder(resp *http.Response) (result autorest.Response, err error)
InsertOrReplaceResponder handles the response to the InsertOrReplace request. The method always closes the http.Response Body.
func (Client) InsertOrReplaceSender ¶
InsertOrReplaceSender sends the InsertOrReplace request. The method will close the http.Response Body if it receives an error.
func (Client) InsertPreparer ¶
func (client Client) InsertPreparer(ctx context.Context, accountName, tableName string, input InsertEntityInput) (*http.Request, error)
InsertPreparer prepares the Insert request.
func (Client) InsertResponder ¶
InsertResponder handles the response to the Insert request. The method always closes the http.Response Body.
func (Client) InsertSender ¶
InsertSender sends the Insert request. The method will close the http.Response Body if it receives an error.
func (Client) Query ¶
func (client Client) Query(ctx context.Context, accountName, tableName string, input QueryEntitiesInput) (result QueryEntitiesResult, err error)
Query queries entities in a table and includes the $filter and $select options.
func (Client) QueryPreparer ¶
func (client Client) QueryPreparer(ctx context.Context, accountName, tableName string, input QueryEntitiesInput) (*http.Request, error)
QueryPreparer prepares the Query request.
func (Client) QueryResponder ¶
func (client Client) QueryResponder(resp *http.Response) (result QueryEntitiesResult, err error)
QueryResponder handles the response to the Query request. The method always closes the http.Response Body.
type DeleteEntityInput ¶
type DeleteEntityInput struct { // When inserting an entity into a table, you must specify values for the PartitionKey and RowKey system properties. // Together, these properties form the primary key and must be unique within the table. // Both the PartitionKey and RowKey values must be string values; each key value may be up to 64 KB in size. // If you are using an integer value for the key value, you should convert the integer to a fixed-width string, // because they are canonically sorted. For example, you should convert the value 1 to 0000001 to ensure proper sorting. RowKey string PartitionKey string }
type GetEntityInput ¶
type GetEntityInput struct { PartitionKey string RowKey string // The Level of MetaData which should be returned MetaDataLevel MetaDataLevel }
type GetEntityResult ¶
type InsertEntityInput ¶
type InsertEntityInput struct { // The level of MetaData provided for this Entity MetaDataLevel MetaDataLevel // The Entity which should be inserted, by default all values are strings // To explicitly type a property, specify the appropriate OData data type by setting // the m:type attribute within the property definition Entity map[string]interface{} // When inserting an entity into a table, you must specify values for the PartitionKey and RowKey system properties. // Together, these properties form the primary key and must be unique within the table. // Both the PartitionKey and RowKey values must be string values; each key value may be up to 64 KB in size. // If you are using an integer value for the key value, you should convert the integer to a fixed-width string, // because they are canonically sorted. For example, you should convert the value 1 to 0000001 to ensure proper sorting. RowKey string PartitionKey string }
type InsertOrMergeEntityInput ¶
type InsertOrMergeEntityInput struct { // The Entity which should be inserted, by default all values are strings // To explicitly type a property, specify the appropriate OData data type by setting // the m:type attribute within the property definition Entity map[string]interface{} // When inserting an entity into a table, you must specify values for the PartitionKey and RowKey system properties. // Together, these properties form the primary key and must be unique within the table. // Both the PartitionKey and RowKey values must be string values; each key value may be up to 64 KB in size. // If you are using an integer value for the key value, you should convert the integer to a fixed-width string, // because they are canonically sorted. For example, you should convert the value 1 to 0000001 to ensure proper sorting. RowKey string PartitionKey string }
type InsertOrReplaceEntityInput ¶
type InsertOrReplaceEntityInput struct { // The Entity which should be inserted, by default all values are strings // To explicitly type a property, specify the appropriate OData data type by setting // the m:type attribute within the property definition Entity map[string]interface{} // When inserting an entity into a table, you must specify values for the PartitionKey and RowKey system properties. // Together, these properties form the primary key and must be unique within the table. // Both the PartitionKey and RowKey values must be string values; each key value may be up to 64 KB in size. // If you are using an integer value for the key value, you should convert the integer to a fixed-width string, // because they are canonically sorted. For example, you should convert the value 1 to 0000001 to ensure proper sorting. RowKey string PartitionKey string }
type MetaDataLevel ¶
type MetaDataLevel string
var ( NoMetaData MetaDataLevel = "nometadata" MinimalMetaData MetaDataLevel = "minimalmetadata" FullMetaData MetaDataLevel = "fullmetadata" )
type QueryEntitiesInput ¶
type QueryEntitiesInput struct { // An optional OData filter Filter *string // An optional comma-separated PropertyNamesToSelect *[]string // An optional OData top Top *int PartitionKey string RowKey string // The Level of MetaData which should be returned MetaDataLevel MetaDataLevel // The Next Partition Key used to load data from a previous point NextPartitionKey *string // The Next Row Key used to load data from a previous point NextRowKey *string }
type QueryEntitiesResult ¶
type ResourceID ¶
func ParseResourceID ¶
func ParseResourceID(id string) (*ResourceID, error)
ParseResourceID parses the specified Resource ID and returns an object which can be used to look up the specified Entity within the specified Table
type StorageTableEntity ¶
type StorageTableEntity interface { Delete(ctx context.Context, accountName, tableName string, input DeleteEntityInput) (result autorest.Response, err error) Insert(ctx context.Context, accountName, tableName string, input InsertEntityInput) (result autorest.Response, err error) InsertOrReplace(ctx context.Context, accountName, tableName string, input InsertOrReplaceEntityInput) (result autorest.Response, err error) InsertOrMerge(ctx context.Context, accountName, tableName string, input InsertOrMergeEntityInput) (result autorest.Response, err error) Query(ctx context.Context, accountName, tableName string, input QueryEntitiesInput) (result QueryEntitiesResult, err error) Get(ctx context.Context, accountName, tableName string, input GetEntityInput) (result GetEntityResult, err error) GetResourceID(accountName, tableName, partitionKey, rowKey string) string }