Documentation ¶
Index ¶
- Variables
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)deprecated
- func (x *Envelope) GetPayload() []byte
- func (x *Envelope) GetPayloadType() []byte
- func (x *Envelope) GetPublicKey() *pb.PublicKey
- func (x *Envelope) GetSignature() []byte
- func (*Envelope) ProtoMessage()
- func (x *Envelope) ProtoReflect() protoreflect.Message
- func (x *Envelope) Reset()
- func (x *Envelope) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_pb_envelope_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct { // public_key is the public key of the keypair the enclosed payload was // signed with. PublicKey *pb.PublicKey `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // payload_type encodes the type of payload, so that it can be deserialized // deterministically. PayloadType []byte `protobuf:"bytes,2,opt,name=payload_type,json=payloadType,proto3" json:"payload_type,omitempty"` // payload is the actual payload carried inside this envelope. Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // signature is the signature produced by the private key corresponding to // the enclosed public key, over the payload, prefixing a domain string for // additional security. Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
Envelope encloses a signed payload produced by a peer, along with the public key of the keypair it was signed with so that it can be statelessly validated by the receiver.
The payload is prefixed with a byte string that determines the type, so it can be deserialized deterministically. Often, this byte string is a multicodec.
func (*Envelope) Descriptor
deprecated
func (*Envelope) GetPayload ¶
func (*Envelope) GetPayloadType ¶
func (*Envelope) GetPublicKey ¶
func (*Envelope) GetSignature ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) ProtoReflect ¶ added in v0.25.0
func (x *Envelope) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.