Commit Graph

14 Commits

Author SHA1 Message Date
Yusef Napora
ae3bc7bdfb cleanup DefaultRecord code a bit
- removes unused error return from blankRecordForPayloadType
- just references instead of copying in DefaultRecord.UnmarshalRecord
  I figure this is likely safe, since we'll be unmarshalling from the
  payload of an Envelope, which shouldn't get altered after it's
  created.
2020-01-17 16:52:59 -05:00
Yusef Napora
a26c845a76 use a DefaultRecord for unregistered PayloadTypes
instead of returning an error if we don't have a registered
Record for a given PayloadType, we can have a catch-all
DefaultRecord type that just preserves the original payload
as a []byte
2020-01-17 16:43:55 -05:00
Yusef Napora
3c208b0d26 Revert "return buffer to pool before early return"
8d8da386f2

misread this - unsigned will be nil if there's an
error, so it was right the way it was
2020-01-17 15:43:33 -05:00
Yusef Napora
7ee4611788 store reflect.Type when registering Record 2020-01-17 10:48:37 -05:00
Yusef Napora
972454490a doc comments 2020-01-17 10:42:26 -05:00
Yusef Napora
cf0122ad8c cache unmarshalled Record payload inside Envelope 2020-01-17 10:42:26 -05:00
Yusef Napora
39d8cbc758 doc comments 2020-01-17 10:42:26 -05:00
Yusef Napora
8d8da386f2 return buffer to pool before early return 2020-01-17 10:42:26 -05:00
Yusef Napora
77a03aaf83 rename SignedEnvelope -> Envelope, unmarshal payload in ConsumeEnvelope 2020-01-17 10:42:26 -05:00
Yusef Napora
8dc249ddde use Record type for envelope payloads 2020-01-17 10:42:26 -05:00
Yusef Napora
ce6885c21e add Seq field to envelope signature 2020-01-17 10:42:26 -05:00
Yusef Napora
5f6b601ac9 hoist Seq from PeerRecord to SignedEnvelope 2020-01-17 10:42:26 -05:00
Raúl Kripalani
bb547efe8c move protobuf files; adjust imports everywhere. 2020-01-17 10:42:26 -05:00
Raúl Kripalani
123324dc1b move envelope to record package. 2020-01-17 10:42:26 -05:00