Members

result

note, this is the most minimal stub/mock of request possible

Source:

Methods

accessor(aws, table, key, value) → {function}

Parameters:
Name Type Description
aws AwsWrapper
table string
key string
value *
Source:
Throws:
TypeError
Returns:
Type
function

accessor(dbs, table, key, valueopt) → {promiseToAccessTable}

Parameters:
Name Type Attributes Description
dbs Object
table string
key string
value string <optional>
Source:
Returns:
Type
promiseToAccessTable

bindAws(aws) → {Object}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:

this API bound to

Type
Object

bindAws(aws) → {Object}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:

this API bound to

Type
Object

bindAws(aws) → {Object.<function()>}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:
Type
Object.<function()>

bindDb(dbs) → {Object}

Binds all functions' first parameters to a given object

Parameters:
Name Type Description
dbs Object
Source:
Throws:
TypeError
Returns:
Type
Object

buildImageName(projectId) → {string}

Parameters:
Name Type Description
projectId string
Source:
Returns:
Type
string

checkAndWrite(aws, table, key, value) → {promiseToCheckAndWrite}

Returns a function that promises to check if a table exists, create it if it doesn't, and finally, write to it

Parameters:
Name Type Description
aws AwsWrapper
table string
key string
value *
Source:
Throws:
TypeError
Returns:
Type
promiseToCheckAndWrite

checkIfTableExists(aws, table) → {promiseToCheckIfTableExists}

Returns a promise returning function that checks if a table exists

Parameters:
Name Type Description
aws AwsWrapper
table string
Source:
Throws:
TypeError
Returns:
Type
promiseToCheckIfTableExists

cleanEndPoint(endPoint) → {string}

Parameters:
Name Type Description
endPoint string
Source:
Returns:
Type
string

create(aws) → {function}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:
Type
function

create(aws) → {function}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:
Type
function

create(aws, table) → {promiseToCreate}

Returns a function that promises to create a hash table

Parameters:
Name Type Description
aws AwsWrapper
table string
Source:
Throws:
TypeError
Returns:
Type
promiseToCreate

create(dbs, table) → {promiseToCreate}

Parameters:
Name Type Description
dbs Object
table string
Source:
Returns:
Type
promiseToCreate

createAwsFile(region, vpcId, route53Id, registryId, ttl) → {Object}

Parameters:
Name Type Description
region string
vpcId string
route53Id string
registryId string
ttl number
Source:
Returns:
Type
Object

decodeToken(data) → {Object}

Parameters:
Name Type Description
data string

(base64 data)

Source:
Returns:
Type
Object

decrypt() → {Promise}

Source:
Returns:
Type
Promise

describe(aws) → {function}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:
Type
function

describe(aws) → {function}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:
Type
function

destroy(aws, vpcId) → {function}

Parameters:
Name Type Description
aws AwsWrapper
vpcId string
Source:
Throws:
TypeError
Returns:
Type
function

destroy(aws, routeTableId) → {function}

Parameters:
Name Type Description
aws AwsWrapper
routeTableId string
Source:
Throws:
TypeError
Returns:
Type
function

destroy(aws, table) → {promiseToDestroy}

Parameters:
Name Type Description
aws AwsWrapper
table string
Source:
Throws:
TypeError
Returns:
Type
promiseToDestroy

destroy(dbs, table) → {promiseToDestroy}

Parameters:
Name Type Description
dbs Object
table string
Source:
Returns:
Type
promiseToDestroy

dockerBuild(imageName) → {Promise}

Parameters:
Name Type Description
imageName string
Source:
Returns:
Type
Promise

dockerPush(fullImageName) → {Promise}

Parameters:
Name Type Description
fullImageName string
Source:
Returns:
Type
Promise

dockerTag(endPoint, imageName) → {Promise}

Parameters:
Name Type Description
endPoint string
imageName string
Source:
Returns:
Type
Promise

find(db, id) → {Promise.<*>}

Resolves a record if it exists, rejects otherwise

Parameters:
Name Type Description
db function
id string
Source:
Returns:
Type
Promise.<*>

findDefault(aws) → {function}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:
Type
function

findVpc(list)

finds the first clusternator tagged VPC

Parameters:
Name Type Description
list Object

(see AWS docs) http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html

Source:

getAppDef(key, host, repo, pr, image, deployment)

Parameters:
Name Type Description
key string
host string
repo string
pr string
image string
deployment string
Source:

getCredentials(privatePath, region) → {string}

Parameters:
Name Type Description
privatePath string
region string
Source:
Returns:
Type
string

getECSContainerInstanceUserData(clusterName, sshKeysopt) → {string}

Parameters:
Name Type Attributes Description
clusterName string
sshKeys Array.<string> <optional>
Source:
Throws:
TypeError
Returns:
Type
string

getToken(creds, registryId) → {Promise}

Parameters:
Name Type Description
creds Object
registryId string
Source:
Returns:
Type
Promise

hashTable(aws, table) → {function}

Returns a function that will get/set

Parameters:
Name Type Description
aws AwsWrapper
table string
Source:
Returns:
Type
function

hashTable(dbs, table) → {function}

Returns a function that will get/set

Parameters:
Name Type Description
dbs Object
table string
Source:
Returns:
Type
function

isObject(v) → {boolean}

Parameters:
Name Type Description
v *
Source:
Returns:
Type
boolean

key(dbs, table, id) → {function}

Returns a function that will get/set on the table/id provided.

Parameters:
Name Type Description
dbs Object
table string
id string
Source:
Returns:
Type
function

key(aws, table, id) → {function}

Returns a function that will get/set on the table/id provided.

Parameters:
Name Type Description
aws AwsWrapper
table string
id string
Source:
Returns:
Type
function

list(aws) → {function}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:
Type
function

list(dbs) → {promiseToList}

Parameters:
Name Type Description
dbs Object
Source:
Returns:
Type
promiseToList

list() → {Promise.<string>}

Source:
Returns:
Type
Promise.<string>

list(aws) → {function}

Parameters:
Name Type Description
aws AwsWrapper
Source:
Returns:
Type
function

listAllTables(aws, lastNameopt) → {promiseToListTables}

Parameters:
Name Type Attributes Description
aws AwsWrapper
lastName string <optional>
Source:
Returns:
Type
promiseToListTables

loadUserPublicKeys(keyPath) → {Q.Promise.<Array.<string>>}

Loads all the contents of a given path, it assumes they're public keys

Parameters:
Name Type Description
keyPath string
Source:
Returns:
Type
Q.Promise.<Array.<string>>

login(data) → {Promise.<{token: string, proxyEndpoint: string}>}

Parameters:
Name Type Description
data Object
Source:
Returns:
Type
Promise.<{token: string, proxyEndpoint: string}>

logObject(obj, prefixopt)

Parameters:
Name Type Attributes Description
obj *
prefix string <optional>
Source:

logTuple(k, v, prefixopt)

Parameters:
Name Type Attributes Description
k string
v *
prefix string <optional>
Source:

main(projectId, key, image) → {Promise}

Parameters:
Name Type Description
projectId string
key string
image string
Source:
Returns:
Type
Promise

makeDdbItem(key, value) → {Object}

Parameters:
Name Type Description
key string
value *
Source:
Returns:
Type
Object

makeReadKey(key) → {Object}

Parameters:
Name Type Description
key string
Source:
Returns:
Type
Object

mapDescribeToRouteTableIds(descriptions) → {Array}

Parameters:
Name Type Description
descriptions Array
Source:
Returns:
Type
Array

mapDescription(el) → {string}

Parameters:
Name Type Description
el Object
Source:
Returns:
Type
string

processSSHKeys(keys) → {Array.<string>}

Parameters:
Name Type Description
keys Array.<string>
Source:
Throws:
TypeError
Returns:
Type
Array.<string>

projectInit(defaults) → {Array}

Parameters:
Name Type Description
defaults Object
Source:
Returns:
Type
Array

read(aws, table, key) → {promiseToGetItem}

Returns a function that promises to read a given key

Parameters:
Name Type Description
aws AwsWrapper
table string
key string
Source:
Throws:
TypeError
Returns:
Type
promiseToGetItem

remove(aws, table, key) → {promiseToRemove}

Parameters:
Name Type Description
aws AwsWrapper
table string
key string
Source:
Throws:
TypeError
Returns:
Type
promiseToRemove

remove(dbs, table, key) → {promiseToRemove}

Removes a key from a table

Parameters:
Name Type Description
dbs Object
table string
key string
Source:
Throws:
TypeError
Returns:
Type
promiseToRemove

safeReq(path, label) → {string}

Parameters:
Name Type Description
path string
label string
Source:
Returns:

exits

Type
string

saltHash(input) → {Promise.<string>}

Parameters:
Name Type Description
input string
Source:
Returns:
Type
Promise.<string>

spawnOutput(command, args) → {Promise}

Parameters:
Name Type Description
command string
args Array
Source:
Returns:
Type
Promise

stringArrayToNewLineBase64(arr) → {string}

Parameters:
Name Type Description
arr Array.<string>
Source:
Throws:
TypeError
Returns:
Type
string

wipePrivate(privatePath) → {Promise}

Parameters:
Name Type Description
privatePath string
Source:
Returns:
Type
Promise

write(aws, table, key, value) → {writeToAws}

Parameters:
Name Type Description
aws AwsWrapper
table string
key string
value *
Source:
Throws:
TypeError
Returns:
Type
writeToAws