Versions in this module Expand all Collapse all v0 v0.1.0 Dec 6, 2015 Changes in this version + var ErrInvalidLengthAttached = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthDetached = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthPayload = fmt.Errorf("proto: negative length found during unmarshaling") + func Marshal(p Payload) ([]byte, error) + type Attached struct + Data []byte + Nonce []byte + func NewAttached() (*Attached, error) + func (*Attached) ProtoMessage() + func (m *Attached) Marshal() (data []byte, err error) + func (m *Attached) MarshalTo(data []byte) (int, error) + func (m *Attached) Reset() + func (m *Attached) Size() (n int) + func (m *Attached) String() string + func (m *Attached) Unmarshal(data []byte) error + func (p *Attached) Digest() ([]byte, error) + func (p *Attached) Lock(r io.Reader, db material.DB) ([]byte, error) + func (p *Attached) Unlock(w io.Writer, ks []byte, db material.DB) error + type Detached struct + Nonce []byte + func NewDetached() (*Detached, error) + func (*Detached) ProtoMessage() + func (m *Detached) Marshal() (data []byte, err error) + func (m *Detached) MarshalTo(data []byte) (int, error) + func (m *Detached) Reset() + func (m *Detached) Size() (n int) + func (m *Detached) String() string + func (m *Detached) Unmarshal(data []byte) error + func (p *Detached) Digest() ([]byte, error) + func (p *Detached) Lock(r io.Reader, db material.DB) ([]byte, error) + func (p *Detached) Unlock(w io.Writer, ks []byte, db material.DB) error + type Envelope struct + Attached *Attached + Detached *Detached + func Wrap(p Payload) (*Envelope, error) + func (*Envelope) ProtoMessage() + func (e *Envelope) Payload() (Payload, error) + func (m *Envelope) GetAttached() *Attached + func (m *Envelope) GetDetached() *Detached + func (m *Envelope) Marshal() (data []byte, err error) + func (m *Envelope) MarshalTo(data []byte) (int, error) + func (m *Envelope) Reset() + func (m *Envelope) Size() (n int) + func (m *Envelope) String() string + func (m *Envelope) Unmarshal(data []byte) error + func (this *Envelope) GetValue() interface{} + func (this *Envelope) SetValue(value interface{}) bool + type Payload interface + Digest func() ([]byte, error) + Lock func(io.Reader, material.DB) ([]byte, error) + Marshal func() ([]byte, error) + Unlock func(io.Writer, []byte, material.DB) error + Unmarshal func([]byte) error + func Unmarshal(data []byte) (Payload, error)