bitcoin-atm
bitcoin atm for pyc inc.
git clone https://9o.is/git/bitcoin-atm.git
DDB.scala
(655B)
1 package inc.pyc.chimera
2 package ddb
3
4 import awscala._
5 import dynamodbv2._
6 import akka.actor.Actor
7 import com.typesafe.config._
8 import System._
9
10 private[ddb] trait DDB {
11 this: Actor =>
12
13 val settings = Settings(system)
14 import settings._
15
16 /** AWS Region where DynamoDB Table is located. */
17 implicit val region: Region = Region.US_EAST_1
18
19 /** DynamoDB client instance */
20 implicit val dynamoDB: DynamoDB = DynamoDB(awsAccess, awsSecret)
21
22 /** DynamoDB table */
23 lazy val table: Table = dynamoDB.table(getClass().getSimpleName()).get
24 }
25
26
27 /**
28 * A bunch of items returned by DynamoDB.
29 */
30 case class DDBItems(items: Seq[Item])