MCPcopy
hub / github.com/perkeep/perkeep / SignJSON

Method SignJSON

pkg/schema/sign.go:111–116  ·  view source on GitHub ↗

SignJSON signs the provided json at the optional time t. If t is the zero Time, the current time is used.

(ctx context.Context, json string, t time.Time)

Source from the content-addressed store, hash-verified

109// SignJSON signs the provided json at the optional time t.
110// If t is the zero Time, the current time is used.
111func (s *Signer) SignJSON(ctx context.Context, json string, t time.Time) (string, error) {
112 sr := s.baseSigReq
113 sr.UnsignedJSON = json
114 sr.SignatureTime = t
115 return sr.Sign(ctx)
116}
117
118type memoryBlobFetcher map[blob.Ref]func() (size uint32, rc io.ReadCloser)
119

Callers 1

SignAtMethod · 0.80

Calls 1

SignMethod · 0.45

Tested by

no test coverage detected