func (d *Table) DeleteItem(p Persistable) (*dynamodb.DeleteItemOutput, error) {
	req := dynamodb.DeleteItemInput{
		Key:       d.keyAttributeMap(p),
		TableName: aws.String(d.tableName),
	}
	return d.client.DeleteItem(&req)
}
DeleteItem deletes the item identified by the provided hash and (optional) range key.
package gonamo
import (
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/dynamodb"
)
const (
	errTableDoesntExist string = "ResourceNotFoundException"
	maxBatchWriteLen int = 25
)
type Table struct {
	client *dynamodb.DynamoDB
	tableName           string
	defaultProvisioning int64
	key keyProvider
}
func NewTable(tableName string, k keyProvider, opts *Options) (*Table, error) {
	sess, err := session.NewSession()
	if err != nil {
		return nil, err
	}
	if opts == nil {
		opts = defaultOptions()
	}
	t := Table{
		client: dynamodb.New(sess, &aws.Config{
			Region:   AwsStringOrNil(opts.Region),
			Endpoint: AwsStringOrNil(opts.Endpoint),
		}),
		tableName:           tableName,
		defaultProvisioning: opts.DefaultProvisioning,
		key: k,
	}
	return &t, nil
}
func (d *Table) CreateTableIfNecessary() (bool, error) {
	if _, err := d.Describe(); err == nil {  
		return false, nil
	} else if err.(awserr.Error).Code() != errTableDoesntExist {  
		return false, err
	}
	return true, d.createTable()
}
func (d *Table) Describe() (*dynamodb.DescribeTableOutput, error) {
	return d.client.DescribeTable(&dynamodb.DescribeTableInput{
		TableName: aws.String(d.tableName),
	})
}
func (d *Table) Find(hashValue, rangeValue interface{}) (map[string]interface{}, error) {
	req := dynamodb.GetItemInput{
		Key: map[string]*dynamodb.AttributeValue{
			d.key.hashName(): AttributeValue(d.key.hashType(), hashValue),
		},
		TableName: aws.String(d.tableName),
	}
	if d.key.hasRange() {
		req.Key[d.key.rangeName()] = AttributeValue(d.key.rangeType(), rangeValue)
	}
	res, err := d.client.GetItem(&req)
	if err != nil {
		return nil, err
	}
	return flattenAttributeMap(res.Item), nil
}
func (d *Table) FindAllByHash(hashValue interface{}) ([]map[string]interface{}, error) {
	req := dynamodb.QueryInput{
		KeyConditions: map[string]*dynamodb.Condition{
			d.key.hashName(): {
				ComparisonOperator: aws.String("EQ"),
				AttributeValueList: []*dynamodb.AttributeValue{
					AttributeValue(d.key.hashType(), hashValue),
				},
			},
		},
		TableName: aws.String(d.tableName),
	}
	res, err := d.client.Query(&req)
	if err != nil {
		return nil, err
	}
	return flattenAttributeMaps(res.Items), nil
}
func (d *Table) PutItem(item AttributeMap) (*dynamodb.PutItemOutput, error) {
	req := dynamodb.PutItemInput{
		Item:      item,
		TableName: aws.String(d.tableName),
	}
	return d.client.PutItem(&req)
}