pkg/schema: expose signer and signature information on claims

This will allow consumers of pkg/schema to do things like verify the
signature on claims.

Fixes #1167

Change-Id: Iec76e382e18d91f82694412bc855ac5be82df825
This commit is contained in:
Stephen Searles 2018-05-13 23:03:13 -04:00
parent 89ee36e9ec
commit 350b369030
1 changed files with 6 additions and 0 deletions

View File

@ -222,6 +222,12 @@ func (c Claim) Attribute() string { return c.b.ss.Attribute }
// Value returns the "value" field, if set.
func (c Claim) Value() string { return c.b.ss.Value }
// Signer returns the ref of the blob containing the signing key that signed the claim.
func (c Claim) Signer() blob.Ref { return c.b.ss.Signer }
// Signature returns the claim's signature.
func (c Claim) Signature() string { return c.b.ss.Sig }
// ModifiedPermanode returns the claim's "permaNode" field, if it's
// a claim that modifies a permanode. Otherwise a zero blob.Ref is
// returned.