ssh array complete

This commit is contained in:
Drew Ansbacher
2021-09-20 10:03:50 -06:00
committed by Aiden McClelland
parent 7320abf317
commit 926c74a1b1
4 changed files with 27 additions and 36 deletions

View File

@@ -832,28 +832,26 @@ export module Mock {
},
}
export const SshKeys: RR.GetSSHKeysRes = {
'28:d2:7e:78:61:b4:bf:g2:de:24:15:96:4e:d4:15:53': {
export const SshKeys: RR.GetSSHKeysRes = [
{
'created-at': new Date().toISOString(),
alg: 'ed25519',
hostname: 'Matt Key',
hash: 'VeryLongHashOfSSHKey1',
hash: '28:d2:7e:78:61:b4:bf:g2:de:24:15:96:4e:d4:15:53',
},
'12:f8:7e:78:61:b4:bf:e2:de:24:15:96:4e:d4:72:53': {
{
'created-at': new Date().toISOString(),
alg: 'ed25519',
hostname: 'Aiden Key',
hash: 'VeryLongHashOfSSHKey2',
hash: '12:f8:7e:78:61:b4:bf:e2:de:24:15:96:4e:d4:72:53',
},
}
]
export const SshKey: RR.AddSSHKeyRes = {
'44:44:7e:78:61:b4:bf:g2:de:24:15:96:4e:d4:15:53': {
'created-at': new Date().toISOString(),
alg: 'ed25519',
hostname: 'Lucy Key',
hash: 'VeryLongHashOfSSHKey3',
},
'created-at': new Date().toISOString(),
alg: 'ed25519',
hostname: 'Lucy Key',
hash: '44:44:7e:78:61:b4:bf:g2:de:24:15:96:4e:d4:15:53',
}
export const Wifi: RR.GetWifiRes = {

View File

@@ -108,10 +108,10 @@ export module RR {
// ssh
export type GetSSHKeysReq = { } // ssh.list
export type GetSSHKeysRes = SSHKeys
export type GetSSHKeysRes = SSHKey[]
export type AddSSHKeyReq = { key: string } // ssh.add
export type AddSSHKeyRes = SSHKeys
export type AddSSHKeyRes = SSHKey
export type DeleteSSHKeyReq = { hash: string } // ssh.delete
export type DeleteSSHKeyRes = null
@@ -312,11 +312,7 @@ export interface ServerSpecs {
[key: string]: string | number
}
export interface SSHKeys {
[hash: string]: SSHKeyEntry
}
export interface SSHKeyEntry {
export interface SSHKey {
'created-at': string
alg: string
hostname: string