MCPcopy Create free account
hub / github.com/gogs/gogs / ListPublicKeys

Function ListPublicKeys

internal/database/ssh_key.go:461–464  ·  view source on GitHub ↗

ListPublicKeys returns a list of public keys belongs to given user.

(uid int64)

Source from the content-addressed store, hash-verified

459
460// ListPublicKeys returns a list of public keys belongs to given user.
461func ListPublicKeys(uid int64) ([]*PublicKey, error) {
462 keys := make([]*PublicKey, 0, 5)
463 return keys, x.Where("owner_id = ?", uid).Find(&keys)
464}
465
466// UpdatePublicKey updates given public key.
467func UpdatePublicKey(key *PublicKey) error {

Callers 4

ShowSSHKeysFunction · 0.92
SettingsSSHKeysFunction · 0.92
SettingsSSHKeysPostFunction · 0.92
listPublicKeysFunction · 0.92

Calls 2

WhereMethod · 0.80
FindMethod · 0.65

Tested by

no test coverage detected