Documentation ¶
Index ¶
- type Client
- func (c Client) Delete(ctx context.Context, tableName string, input DeleteEntityInput) (result DeleteEntityResponse, err error)
- func (c Client) Get(ctx context.Context, tableName string, input GetEntityInput) (result GetEntityResponse, err error)
- func (c Client) Insert(ctx context.Context, tableName string, input InsertEntityInput) (result InsertResponse, err error)
- func (c Client) InsertOrMerge(ctx context.Context, tableName string, input InsertOrMergeEntityInput) (result InsertOrMergeResponse, err error)
- func (c Client) InsertOrReplace(ctx context.Context, tableName string, input InsertOrReplaceEntityInput) (result InsertOrReplaceResponse, err error)
- func (c Client) Query(ctx context.Context, tableName string, input QueryEntitiesInput) (result QueryEntitiesResponse, err error)
- type DeleteEntityInput
- type DeleteEntityResponse
- type EntityId
- type GetEntityInput
- type GetEntityResponse
- type InsertEntityInput
- type InsertOrMergeEntityInput
- type InsertOrMergeResponse
- type InsertOrReplaceEntityInput
- type InsertOrReplaceResponse
- type InsertResponse
- type MetaDataLevel
- type QueryEntitiesInput
- type QueryEntitiesResponse
- type StorageTableEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the base client for Table Storage Shares.
func NewWithBaseUri ¶
func (Client) Delete ¶
func (c Client) Delete(ctx context.Context, tableName string, input DeleteEntityInput) (result DeleteEntityResponse, err error)
Delete deletes an existing entity in a table.
func (Client) Get ¶
func (c Client) Get(ctx context.Context, tableName string, input GetEntityInput) (result GetEntityResponse, err error)
Get queries entities in a table and includes the $filter and $select options.
func (Client) Insert ¶
func (c Client) Insert(ctx context.Context, tableName string, input InsertEntityInput) (result InsertResponse, err error)
Insert inserts a new entity into a table.
func (Client) InsertOrMerge ¶
func (c Client) InsertOrMerge(ctx context.Context, tableName string, input InsertOrMergeEntityInput) (result InsertOrMergeResponse, 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) InsertOrReplace ¶
func (c Client) InsertOrReplace(ctx context.Context, tableName string, input InsertOrReplaceEntityInput) (result InsertOrReplaceResponse, 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) Query ¶
func (c Client) Query(ctx context.Context, tableName string, input QueryEntitiesInput) (result QueryEntitiesResponse, err error)
Query queries entities in a table and includes the $filter and $select options.
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 DeleteEntityResponse ¶
type EntityId ¶
type EntityId struct { // AccountId specifies the ID of the Storage Account where this Entity exists. AccountId accounts.AccountId // TableName specifies the name of the Table where this Entity exists. TableName string // PartitionKey specifies the Partition Key for this Entity. PartitionKey string // RowKey specifies the Row Key for this Entity. RowKey string }
func NewEntityID ¶
func ParseEntityID ¶
ParseEntityID parses `input` into a Entity ID using a known `domainSuffix`
type GetEntityInput ¶
type GetEntityInput struct { PartitionKey string RowKey string // The Level of MetaData which should be returned MetaDataLevel MetaDataLevel }
type GetEntityResponse ¶
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 InsertOrMergeResponse ¶
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 InsertOrReplaceResponse ¶
type InsertResponse ¶
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 QueryEntitiesResponse ¶
type StorageTableEntity ¶
type StorageTableEntity interface { Delete(ctx context.Context, tableName string, input DeleteEntityInput) (resp DeleteEntityResponse, err error) Insert(ctx context.Context, tableName string, input InsertEntityInput) (resp InsertResponse, err error) InsertOrReplace(ctx context.Context, tableName string, input InsertOrReplaceEntityInput) (resp InsertOrReplaceResponse, err error) InsertOrMerge(ctx context.Context, tableName string, input InsertOrMergeEntityInput) (resp InsertOrMergeResponse, err error) Query(ctx context.Context, tableName string, input QueryEntitiesInput) (resp QueryEntitiesResponse, err error) Get(ctx context.Context, tableName string, input GetEntityInput) (resp GetEntityResponse, err error) }