mirror of https://github.com/perkeep/perkeep.git
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:
parent
89ee36e9ec
commit
350b369030
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue