MCPcopy
hub / github.com/perkeep/perkeep / ServerPublicKeyBlobRef

Method ServerPublicKeyBlobRef

pkg/client/client.go:564–573  ·  view source on GitHub ↗

ServerPublicKeyBlobRef returns the server's public key blobRef If the server isn't running a sign handler, the error will be ErrNoSigning.

()

Source from the content-addressed store, hash-verified

562// ServerPublicKeyBlobRef returns the server's public key blobRef
563// If the server isn't running a sign handler, the error will be ErrNoSigning.
564func (c *Client) ServerPublicKeyBlobRef() (blob.Ref, error) {
565 if err := c.condDiscovery(); err != nil {
566 return blob.Ref{}, err
567 }
568
569 if !c.serverPublicKeyBlobRef.Valid() {
570 return blob.Ref{}, ErrNoSigning
571 }
572 return c.serverPublicKeyBlobRef, nil
573}
574
575// SearchRoot returns the server's search handler.
576// If the server isn't running an index and search handler, the error

Callers 1

discoMethod · 0.80

Calls 2

condDiscoveryMethod · 0.95
ValidMethod · 0.45

Tested by

no test coverage detected