mirror of https://github.com/docker/docs.git
Add documentation for FindKeyByID function
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
e7e9ef4a0d
commit
c82440258f
|
@ -7,6 +7,9 @@ import (
|
|||
pb "github.com/docker/notary/proto"
|
||||
)
|
||||
|
||||
// FindKeyByID looks for the key with the given ID in each of the
|
||||
// signing services in sigServices. It returns the first matching key it finds,
|
||||
// or ErrInvalidKeyID if the key is not found in any of the signing services.
|
||||
func FindKeyByID(sigServices signer.SigningServiceIndex, keyID *pb.KeyID) (*pb.PublicKey, signer.SigningService, error) {
|
||||
for _, service := range sigServices {
|
||||
key, err := service.KeyInfo(keyID)
|
||||
|
|
Loading…
Reference in New Issue