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