()
| 21 | } |
| 22 | |
| 23 | func (k *KeyPair) Validate() error { |
| 24 | if k.ID == "" { |
| 25 | return errors.New("KeyPair ID field is empty") |
| 26 | } |
| 27 | |
| 28 | if k.Public == "" { |
| 29 | return errors.New("KeyPair Public field is empty") |
| 30 | } |
| 31 | |
| 32 | if k.Private == "" { |
| 33 | return errors.New("KeyPair Private field is empty") |
| 34 | } |
| 35 | |
| 36 | return nil |
| 37 | } |
| 38 | |
| 39 | // KeyPairStorage is responsible of managing key pairs |
| 40 | type KeyPairStorage interface { |
no outgoing calls
no test coverage detected