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

Method GetKeyFromID

kontrol/keypair.go:109–121  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

107}
108
109func (m *MemKeyPairStorage) GetKeyFromID(id string) (*KeyPair, error) {
110 v, err := m.id.Get(id)
111 if err != nil {
112 return nil, err
113 }
114
115 keyPair, ok := v.(*KeyPair)
116 if !ok {
117 return nil, fmt.Errorf("MemKeyPairStorage: GetKeyFromID value is malformed %+v", v)
118 }
119
120 return keyPair, nil
121}
122
123func (m *MemKeyPairStorage) GetKeyFromPublic(public string) (*KeyPair, error) {
124 v, err := m.public.Get(public)

Callers 1

DeleteKeyMethod · 0.95

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected