Documentation ¶
Overview ¶
Package types describes the types used in the project
Package types contains general types to use in core and interpreter
Index ¶
- func SprintError(code, message, extra string, origErr error) string
- func StringValue(str *string) string
- func ToString(str string) *string
- type AttributeDefinition
- type AttributeValueUpdate
- type BatchedErrors
- type ConditionalCheckFailedException
- func (s *ConditionalCheckFailedException) Code() string
- func (s *ConditionalCheckFailedException) Error() string
- func (s ConditionalCheckFailedException) GoString() string
- func (s *ConditionalCheckFailedException) Message() string
- func (s *ConditionalCheckFailedException) OrigErr() error
- func (s *ConditionalCheckFailedException) RequestID() string
- func (s *ConditionalCheckFailedException) StatusCode() int
- func (s ConditionalCheckFailedException) String() string
- type CreateGlobalSecondaryIndexAction
- type CreateTableInput
- type DeleteGlobalSecondaryIndexAction
- type DeleteItemInput
- type Error
- type ExpectedAttributeValue
- type GlobalSecondaryIndex
- type GlobalSecondaryIndexDescription
- type GlobalSecondaryIndexUpdate
- type Item
- type KeySchemaElement
- type LocalSecondaryIndex
- type LocalSecondaryIndexDescription
- type Projection
- type ProvisionedThroughput
- type PutItemInput
- type RequestFailure
- type TableDescription
- type UnmarshalError
- type UpdateGlobalSecondaryIndexAction
- type UpdateItemInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SprintError ¶
SprintError returns a string of the formatted error code.
func StringValue ¶
StringValue returns the string value of a string pointer
Types ¶
type AttributeDefinition ¶
type AttributeDefinition struct { AttributeName *string `min:"1" type:"string" required:"true"` AttributeType *string `type:"string" required:"true" enum:"ScalarAttributeType"` // contains filtered or unexported fields }
AttributeDefinition represents an attribute for describing the key schema for the table and indexes.
type AttributeValueUpdate ¶
type AttributeValueUpdate struct { Action *string `type:"string" enum:"AttributeAction"` Value Item `type:"structure"` // contains filtered or unexported fields }
AttributeValueUpdate represents the attributes to be modified, the action to perform on each, and the new value for each.
type BatchedErrors ¶
BatchedErrors is a batch of errors which also wraps lower level errors with code, message, and original errors. Calling Error() will include all errors that occurred in the batch.
func NewBatchError ¶
func NewBatchError(code, message string, errs []error) BatchedErrors
NewBatchError returns an BatchedErrors with a collection of errors as an array of errors.
type ConditionalCheckFailedException ¶
type ConditionalCheckFailedException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` MessageText string `locationName:"message" type:"string"` Item map[string]*Item `type:"map"` // contains filtered or unexported fields }
ConditionalCheckFailedException a condition specified in the operation could not be evaluated.
func (*ConditionalCheckFailedException) Code ¶
func (s *ConditionalCheckFailedException) Code() string
Code returns the exception type name.
func (*ConditionalCheckFailedException) Error ¶
func (s *ConditionalCheckFailedException) Error() string
func (ConditionalCheckFailedException) GoString ¶
func (s ConditionalCheckFailedException) GoString() string
GoString returns the string representation
func (*ConditionalCheckFailedException) Message ¶
func (s *ConditionalCheckFailedException) Message() string
Message returns the exception's message.
func (*ConditionalCheckFailedException) OrigErr ¶
func (s *ConditionalCheckFailedException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ConditionalCheckFailedException) RequestID ¶
func (s *ConditionalCheckFailedException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ConditionalCheckFailedException) StatusCode ¶
func (s *ConditionalCheckFailedException) StatusCode() int
StatusCode returns the HTTP status code for the request's response error.
func (ConditionalCheckFailedException) String ¶
func (s ConditionalCheckFailedException) String() string
String returns the string representation
type CreateGlobalSecondaryIndexAction ¶
type CreateGlobalSecondaryIndexAction struct { IndexName *string `min:"3" type:"string" required:"true"` KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` Projection *Projection `type:"structure" required:"true"` ProvisionedThroughput *ProvisionedThroughput `type:"structure"` // contains filtered or unexported fields }
CreateGlobalSecondaryIndexAction represents a new global secondary index to be added to an existing table.
type CreateTableInput ¶
type CreateTableInput struct { ProvisionedThroughput *ProvisionedThroughput `type:"structure"` KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` }
CreateTableInput input to create a table
type DeleteGlobalSecondaryIndexAction ¶
type DeleteGlobalSecondaryIndexAction struct { IndexName *string `min:"3" type:"string" required:"true"` // contains filtered or unexported fields }
DeleteGlobalSecondaryIndexAction struct to handle the deletion of a index
type DeleteItemInput ¶
type DeleteItemInput struct { ConditionExpression *string `type:"string"` ConditionalOperator *string `type:"string" enum:"ConditionalOperator"` Expected map[string]*ExpectedAttributeValue `type:"map"` ExpressionAttributeNames map[string]*string `type:"map"` ExpressionAttributeValues map[string]*Item `type:"map"` Key map[string]*Item `type:"map" required:"true"` ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"` ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"` ReturnValues *string `type:"string" enum:"ReturnValue"` TableName *string `min:"3" type:"string" required:"true"` // contains filtered or unexported fields }
DeleteItemInput represents the input of a DeleteItem operation.
type Error ¶
An Error wraps lower level errors with code, message and an original error. The underlying concrete error type may also satisfy other interfaces which can be to used to obtain more specific information about the error.
type ExpectedAttributeValue ¶
type ExpectedAttributeValue struct { AttributeValueList []*Item `type:"list"` ComparisonOperator *string `type:"string" enum:"ComparisonOperator"` Exists *bool `type:"boolean"` Value *Item `type:"structure"` // contains filtered or unexported fields }
ExpectedAttributeValue represents a condition to be compared with an attribute value
type GlobalSecondaryIndex ¶
type GlobalSecondaryIndex struct { IndexName *string `min:"3" type:"string" required:"true"` KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` Projection *Projection `type:"structure" required:"true"` ProvisionedThroughput *ProvisionedThroughput `type:"structure"` // contains filtered or unexported fields }
GlobalSecondaryIndex represents the properties of a global secondary index.
type GlobalSecondaryIndexDescription ¶
type GlobalSecondaryIndexDescription struct { Backfilling *bool `type:"boolean"` IndexArn *string `type:"string"` IndexName *string `min:"3" type:"string"` IndexSizeBytes *int64 `type:"long"` IndexStatus *string `type:"string" enum:"IndexStatus"` ItemCount int64 `type:"long"` KeySchema []KeySchemaElement `min:"1" type:"list"` Projection *Projection `type:"structure"` // contains filtered or unexported fields }
GlobalSecondaryIndexDescription represents the properties of a global secondary index.
type GlobalSecondaryIndexUpdate ¶
type GlobalSecondaryIndexUpdate struct { Create *CreateGlobalSecondaryIndexAction `type:"structure"` Delete *DeleteGlobalSecondaryIndexAction `type:"structure"` Update *UpdateGlobalSecondaryIndexAction `type:"structure"` // contains filtered or unexported fields }
GlobalSecondaryIndexUpdate represents the properties of a global secondary index update
type Item ¶
type Item struct { // An attribute of type Binary. For example: // // "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk" // B is automatically base64 encoded/decoded by the SDK. B []byte `type:"blob"` // An attribute of type Boolean. For example: // // "BOOL": true BOOL *bool `type:"boolean"` // An attribute of type Binary Set. For example: // // "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="] BS [][]byte `type:"list"` // An attribute of type List. For example: // // "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}] L []*Item `type:"list"` // An attribute of type Map. For example: // // "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}} M map[string]*Item `type:"map"` // An attribute of type Number. For example: // // "N": "123.45" // // Numbers are sent across the network to DynamoDB as strings, to maximize compatibility // across languages and libraries. However, DynamoDB treats them as number type // attributes for mathematical operations. N *string `type:"string"` // An attribute of type Number Set. For example: // // "NS": ["42.2", "-19", "7.5", "3.14"] // // Numbers are sent across the network to DynamoDB as strings, to maximize compatibility // across languages and libraries. However, DynamoDB treats them as number type // attributes for mathematical operations. NS []*string `type:"list"` // An attribute of type Null. For example: // // "NULL": true NULL *bool `type:"boolean"` // An attribute of type String. For example: // // "S": "Hello" S *string `type:"string"` // An attribute of type String Set. For example: // // "SS": ["Giraffe", "Hippo" ,"Zebra"] SS []*string `type:"list"` // contains filtered or unexported fields }
Item describes the DynamoDB item structure
type KeySchemaElement ¶
type KeySchemaElement struct { AttributeName string `min:"1" type:"string" required:"true"` KeyType string `type:"string" required:"true" enum:"KeyType"` // contains filtered or unexported fields }
KeySchemaElement represents a single element of a key schema
type LocalSecondaryIndex ¶
type LocalSecondaryIndex struct { IndexName *string `min:"3" type:"string" required:"true"` KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` Projection *Projection `type:"structure" required:"true"` // contains filtered or unexported fields }
LocalSecondaryIndex represents the properties of a local secondary index.
type LocalSecondaryIndexDescription ¶
type LocalSecondaryIndexDescription struct { IndexArn *string `type:"string"` IndexName *string `min:"3" type:"string"` IndexSizeBytes *int64 `type:"long"` ItemCount int64 `type:"long"` KeySchema []KeySchemaElement `min:"1" type:"list"` Projection *Projection `type:"structure"` // contains filtered or unexported fields }
LocalSecondaryIndexDescription represents the properties of a local secondary index.
type Projection ¶
type Projection struct { NonKeyAttributes []*string `min:"1" type:"list"` ProjectionType *string `type:"string" enum:"ProjectionType"` // contains filtered or unexported fields }
Projection represents attributes that are copied (projected) from the table into an index
type ProvisionedThroughput ¶
type ProvisionedThroughput struct { ReadCapacityUnits int64 `min:"1" type:"long" required:"true"` WriteCapacityUnits int64 `min:"1" type:"long" required:"true"` // contains filtered or unexported fields }
ProvisionedThroughput represents the provisioned throughput settings for a specified table or index.
type PutItemInput ¶
type PutItemInput struct { ConditionExpression *string `type:"string"` ConditionalOperator *string `type:"string" enum:"ConditionalOperator"` ExpressionAttributeNames map[string]string `type:"map"` ExpressionAttributeValues map[string]*Item `type:"map"` Item map[string]*Item `type:"map" required:"true"` ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"` ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"` ReturnValues *string `type:"string" enum:"ReturnValue"` TableName *string `min:"3" type:"string" required:"true"` // contains filtered or unexported fields }
PutItemInput represents the input of a PutItem operation.
type RequestFailure ¶
A RequestFailure is an interface to extract request failure information from an Error such as the request ID of the failed request returned by a service. RequestFailures may not always have a requestID value if the request failed prior to reaching the service such as a connection error.
func NewRequestFailure ¶
func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure
NewRequestFailure returns a wrapped error with additional information for request status code, and service requestID.
type TableDescription ¶
type TableDescription struct { GlobalSecondaryIndexes []GlobalSecondaryIndexDescription `type:"list"` GlobalTableVersion string `type:"string"` ItemCount int64 `type:"long"` KeySchema []KeySchemaElement `min:"1" type:"list"` LatestStreamArn string `min:"37" type:"string"` LatestStreamLabel string `type:"string"` LocalSecondaryIndexes []LocalSecondaryIndexDescription `type:"list"` TableArn string `type:"string"` TableID string `type:"string"` TableName string `min:"3" type:"string"` TableSizeBytes int64 `type:"long"` TableStatus string `type:"string" enum:"TableStatus"` // contains filtered or unexported fields }
TableDescription represents the properties of a table.
type UnmarshalError ¶
type UnmarshalError interface { Bytes() []byte // contains filtered or unexported methods }
UnmarshalError provides the interface for the SDK failing to unmarshal data.
type UpdateGlobalSecondaryIndexAction ¶
type UpdateGlobalSecondaryIndexAction struct { IndexName *string `min:"3" type:"string" required:"true"` ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"` // contains filtered or unexported fields }
UpdateGlobalSecondaryIndexAction struct to handle updates in index
type UpdateItemInput ¶
type UpdateItemInput struct { AttributeUpdates map[string]*AttributeValueUpdate `type:"map"` ConditionExpression *string `type:"string"` ConditionalOperator *string `type:"string" enum:"ConditionalOperator"` Expected map[string]*ExpectedAttributeValue `type:"map"` ExpressionAttributeNames map[string]string `type:"map"` ExpressionAttributeValues map[string]*Item `type:"map"` Key map[string]*Item `type:"map" required:"true"` ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"` ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"` ReturnValues *string `type:"string" enum:"ReturnValue"` TableName *string `min:"3" type:"string" required:"true"` UpdateExpression string `type:"string"` ReturnValuesOnConditionCheckFailure *string `type:"string"` // contains filtered or unexported fields }
UpdateItemInput represents the input of an UpdateItem operation.