mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-21 07:49:34 +01:00
25 lines
440 B
JavaScript
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); |