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

Method GetKeyFromPublic

kontrol/keypair.go:123–135  ·  view source on GitHub ↗
(public string)

Source from the content-addressed store, hash-verified

121}
122
123func (m *MemKeyPairStorage) GetKeyFromPublic(public string) (*KeyPair, error) {
124 v, err := m.public.Get(public)
125 if err != nil {
126 return nil, err
127 }
128
129 keyPair, ok := v.(*KeyPair)
130 if !ok {
131 return nil, fmt.Errorf("MemKeyPairStorage: GetKeyFromPublic value is malformed %+v", v)
132 }
133
134 return keyPair, nil
135}
136
137func (m *MemKeyPairStorage) IsValid(public string) error {
138 _, err := m.GetKeyFromPublic(public)

Callers 1

IsValidMethod · 0.95

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected