forked from smugmug/godynamo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
godynamo.go
65 lines (59 loc) · 2.41 KB
/
godynamo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// A dummy package for installers who wish to get all GoDynamo depencies in one "go get" invocation.
package godynamo
import (
"fmt"
"github.com/smugmug/godynamo/conf"
"github.com/smugmug/godynamo/conf_file"
conf_iam "github.com/smugmug/godynamo/conf_iam"
batch_get_item "github.com/smugmug/godynamo/endpoints/batch_get_item"
batch_write_item "github.com/smugmug/godynamo/endpoints/batch_write_item"
create "github.com/smugmug/godynamo/endpoints/create_table"
delete_item "github.com/smugmug/godynamo/endpoints/delete_item"
delete_table "github.com/smugmug/godynamo/endpoints/delete_table"
describe_table "github.com/smugmug/godynamo/endpoints/describe_table"
get_item "github.com/smugmug/godynamo/endpoints/get_item"
list_tables "github.com/smugmug/godynamo/endpoints/list_tables"
put_item "github.com/smugmug/godynamo/endpoints/put_item"
query "github.com/smugmug/godynamo/endpoints/query"
scan "github.com/smugmug/godynamo/endpoints/scan"
update_item "github.com/smugmug/godynamo/endpoints/update_item"
update_table "github.com/smugmug/godynamo/endpoints/update_table"
keepalive "github.com/smugmug/godynamo/keepalive"
"log"
)
// This program serves only to include all of the libraries in GoDynamo so that you can
// just run one instance of 'go get' and get the totality of the library.
func installAll() {
// conf file must be read in before anything else, to initialize permissions etc
conf_file.Read()
conf.Vals.ConfLock.RLock()
if conf.Vals.Initialized == false {
panic("the conf.Vals global conf struct has not been initialized")
}
// launch a background poller to keep conns to aws alive
if conf.Vals.Network.DynamoDB.KeepAlive {
log.Printf("launching background keepalive")
go keepalive.KeepAlive([]string{})
}
// deal with iam, or not
if conf.Vals.UseIAM {
iam_ready_chan := make(chan bool)
go conf_iam.GoIAM(iam_ready_chan)
_ = <-iam_ready_chan
}
conf.Vals.ConfLock.RUnlock()
var get1 get_item.Request
var put1 put_item.Request
var up1 update_item.Request
var upt1 update_table.Request
var del1 delete_item.Request
var delt1 delete_table.Request
var batchw1 batch_write_item.Request
var batchg1 batch_get_item.Request
var create1 create.Request
var query1 query.Request
var scan1 scan.Request
var desc1 describe_table.Request
var list1 list_tables.Request
fmt.Printf("%v%v%v%v%v%v%v%v%v%v%v%v%v", get1, put1, up1, upt1, del1, batchw1, batchg1, create1, delt1, query1, scan1, desc1, list1)
}