// Sets up a dynamo table with the provided attribute
Sets up a dynamo table with the provided attribute
// Sets up a dynamo table with the provided attribute
func createDynamoTable(ctx context.Context, db dynamodbiface.DynamoDBAPI, table string, schema Schema) error {
	_, err := db.CreateTable(&dynamodb.CreateTableInput{
		TableName:              &table,
		AttributeDefinitions:   schema.Attrs,
		KeySchema:              schema.KeySchema,
		ProvisionedThroughput:  DefaultThroughput,
		GlobalSecondaryIndexes: schema.GSI,
	})
	return err
}
func createDynamoTable ( ctx context . Context , db dynamodbiface . DynamoDBAPI , table string , schema Schema ) error { _ , err := db . CreateTable ( & dynamodb . CreateTableInput { TableName : & table , AttributeDefinitions : schema . Attrs , KeySchema : schema . KeySchema , ProvisionedThroughput : DefaultThroughput , GlobalSecondaryIndexes : schema . GSI , } ) return err }
Sets up a dynamo table with the provided attribute
Sets up a dynamo table with the provided attribute