MCPcopy Index your code
hub / github.com/koding/kite / KeyPairStorage

Interface KeyPairStorage

kontrol/keypair.go:40–64  ·  view source on GitHub ↗

KeyPairStorage is responsible of managing key pairs

Source from the content-addressed store, hash-verified

38
39// KeyPairStorage is responsible of managing key pairs
40type KeyPairStorage interface {
41 // AddKey adds the given key pair to the storage
42 AddKey(*KeyPair) error
43
44 // DeleteKey deletes the given key pairs from the storage
45 DeleteKey(*KeyPair) error
46
47 // GetKeyFromID retrieves the KeyPair from the given ID
48 GetKeyFromID(id string) (*KeyPair, error)
49
50 // GetKeyFromPublic retrieves the KeyPairs from the given public key.
51 //
52 // If the key is no longer valid and the storage is able to deterime
53 // that it was deleted, the returned error is of *DeletedKeyPairError
54 // type.
55 GetKeyFromPublic(publicKey string) (*KeyPair, error)
56
57 // Is valid checks if the given publicKey is valid or not. It's up to the
58 // implementer how to implement it. A valid public key returns a nil error.
59 //
60 // If the key is no longer valid and the storage is able to deterime
61 // that it was deleted, the returned error is of *DeletedKeyPairError
62 // type.
63 IsValid(publicKey string) error
64}
65
66func NewMemKeyPairStorage() *MemKeyPairStorage {
67 return &MemKeyPairStorage{

Callers 18

AddKeyMethod · 0.65
GetKeyFromIDMethod · 0.65
GetKeyFromPublicMethod · 0.65
AddKeyPairMethod · 0.65
registerSelfMethod · 0.65
DeleteKeyMethod · 0.65
DeleteKeyPairMethod · 0.65
GetKeyFromIDMethod · 0.65
getOrUpdateKeyIDMethod · 0.65
DeleteKeyPairMethod · 0.65
GetKeyFromPublicMethod · 0.65
getOrUpdateKeyPubMethod · 0.65

Implementers 3

MemKeyPairStoragekontrol/keypair.go
CachedStoragekontrol/keypair.go
Postgreskontrol/postgres.go

Calls

no outgoing calls

Tested by

no test coverage detected