Add documentation for FindKeyByID function

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann 2015-07-14 14:06:52 -07:00
parent e7e9ef4a0d
commit c82440258f
1 changed files with 3 additions and 0 deletions

View File

@ -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)