Documentation ¶
Index ¶
- func Delete(rlog log.Ext1FieldLogger, tx *sqlx.Tx, myid mtid.MTID, keyHash string) error
- func GetAllSSHInfo(rlog log.Ext1FieldLogger, tx *sqlx.Tx, myid mtid.MTID) (info []api.SSHKeyInfo, err error)
- func Insert(rlog log.Ext1FieldLogger, tx *sqlx.Tx, data SSHInfoIn) error
- func UsedKey(rlog log.Ext1FieldLogger, tx *sqlx.Tx, keyFP, userHash string) error
- type SSHInfo
- type SSHInfoIn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllSSHInfo ¶
func GetAllSSHInfo(rlog log.Ext1FieldLogger, tx *sqlx.Tx, myid mtid.MTID) (info []api.SSHKeyInfo, err error)
GetAllSSHInfo returns the SSHInfo for all ssh keys for a given user
Types ¶
type SSHInfo ¶
type SSHInfo struct { KeyID string `db:"key_id"` Name db.NullString `db:"name"` KeyFingerprint string `db:"ssh_key_fp"` UserHash string `db:"ssh_user_hash"` Created time.Time `db:"created"` LastUsed sql.NullTime `db:"last_used"` Enabled db.BitBool `db:"enabled"` EncryptedMT string `db:"MT_crypt"` }
SSHInfo is a type holding the information stored in the database related to an ssh key
func GetSSHInfo ¶
func GetSSHInfo(rlog log.Ext1FieldLogger, tx *sqlx.Tx, keyFP, userHash string) (info SSHInfo, err error)
GetSSHInfo returns the SSHInfo stored in the database for the passed key and user hashes.
Click to show internal directories.
Click to hide internal directories.