Semaphore/lib/models/Identity.js
2014-09-11 18:42:13 +01:00

25 lines
440 B
JavaScript

var mongoose = require('mongoose')
var ObjectId = mongoose.Schema.ObjectId;
var schema = mongoose.Schema({
created: {
type: Date,
default: Date.now
},
credential_type: {
type: String,
enum: ['ssh', 'vault', 'git']
},
name: String,
// vault password
password: String,
// private keys for ssh/git
private_key: String,
public_key: String
});
schema.index({
name: 1
});
module.exports = mongoose.model('Identity', schema);