protobuf

package
v0.26.0-alpha.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2019 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	// Identity key
	Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	// Installation id
	SignedPreKeys map[string]*SignedPreKey `` /* 190-byte string literal not displayed */
	// Prekey signature
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// When the bundle was created locally
	Timestamp            int64    `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

X3DH prekey bundle

func (*Bundle) Descriptor

func (*Bundle) Descriptor() ([]byte, []int)

func (*Bundle) GetIdentity

func (m *Bundle) GetIdentity() []byte

func (*Bundle) GetSignature

func (m *Bundle) GetSignature() []byte

func (*Bundle) GetSignedPreKeys

func (m *Bundle) GetSignedPreKeys() map[string]*SignedPreKey

func (*Bundle) GetTimestamp

func (m *Bundle) GetTimestamp() int64

func (*Bundle) ProtoMessage

func (*Bundle) ProtoMessage()

func (*Bundle) Reset

func (m *Bundle) Reset()

func (*Bundle) String

func (m *Bundle) String() string

func (*Bundle) XXX_DiscardUnknown

func (m *Bundle) XXX_DiscardUnknown()

func (*Bundle) XXX_Marshal

func (m *Bundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bundle) XXX_Merge

func (m *Bundle) XXX_Merge(src proto.Message)

func (*Bundle) XXX_Size

func (m *Bundle) XXX_Size() int

func (*Bundle) XXX_Unmarshal

func (m *Bundle) XXX_Unmarshal(b []byte) error

type BundleContainer

type BundleContainer struct {
	// X3DH prekey bundle
	Bundle *Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"`
	// Private signed prekey
	PrivateSignedPreKey  []byte   `protobuf:"bytes,2,opt,name=private_signed_pre_key,json=privateSignedPreKey,proto3" json:"private_signed_pre_key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BundleContainer) Descriptor

func (*BundleContainer) Descriptor() ([]byte, []int)

func (*BundleContainer) GetBundle

func (m *BundleContainer) GetBundle() *Bundle

func (*BundleContainer) GetPrivateSignedPreKey

func (m *BundleContainer) GetPrivateSignedPreKey() []byte

func (*BundleContainer) ProtoMessage

func (*BundleContainer) ProtoMessage()

func (*BundleContainer) Reset

func (m *BundleContainer) Reset()

func (*BundleContainer) String

func (m *BundleContainer) String() string

func (*BundleContainer) XXX_DiscardUnknown

func (m *BundleContainer) XXX_DiscardUnknown()

func (*BundleContainer) XXX_Marshal

func (m *BundleContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BundleContainer) XXX_Merge

func (m *BundleContainer) XXX_Merge(src proto.Message)

func (*BundleContainer) XXX_Size

func (m *BundleContainer) XXX_Size() int

func (*BundleContainer) XXX_Unmarshal

func (m *BundleContainer) XXX_Unmarshal(b []byte) error

type DHHeader

type DHHeader struct {
	// Compressed ephemeral public key
	Key                  []byte   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DHHeader) Descriptor

func (*DHHeader) Descriptor() ([]byte, []int)

func (*DHHeader) GetKey

func (m *DHHeader) GetKey() []byte

func (*DHHeader) ProtoMessage

func (*DHHeader) ProtoMessage()

func (*DHHeader) Reset

func (m *DHHeader) Reset()

func (*DHHeader) String

func (m *DHHeader) String() string

func (*DHHeader) XXX_DiscardUnknown

func (m *DHHeader) XXX_DiscardUnknown()

func (*DHHeader) XXX_Marshal

func (m *DHHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DHHeader) XXX_Merge

func (m *DHHeader) XXX_Merge(src proto.Message)

func (*DHHeader) XXX_Size

func (m *DHHeader) XXX_Size() int

func (*DHHeader) XXX_Unmarshal

func (m *DHHeader) XXX_Unmarshal(b []byte) error

type DRHeader

type DRHeader struct {
	// Current ratchet public key
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Number of the message in the sending chain
	N uint32 `protobuf:"varint,2,opt,name=n,proto3" json:"n,omitempty"`
	// Length of the previous sending chain
	Pn uint32 `protobuf:"varint,3,opt,name=pn,proto3" json:"pn,omitempty"`
	// Bundle ID
	Id                   []byte   `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DRHeader) Descriptor

func (*DRHeader) Descriptor() ([]byte, []int)

func (*DRHeader) GetId

func (m *DRHeader) GetId() []byte

func (*DRHeader) GetKey

func (m *DRHeader) GetKey() []byte

func (*DRHeader) GetN

func (m *DRHeader) GetN() uint32

func (*DRHeader) GetPn

func (m *DRHeader) GetPn() uint32

func (*DRHeader) ProtoMessage

func (*DRHeader) ProtoMessage()

func (*DRHeader) Reset

func (m *DRHeader) Reset()

func (*DRHeader) String

func (m *DRHeader) String() string

func (*DRHeader) XXX_DiscardUnknown

func (m *DRHeader) XXX_DiscardUnknown()

func (*DRHeader) XXX_Marshal

func (m *DRHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DRHeader) XXX_Merge

func (m *DRHeader) XXX_Merge(src proto.Message)

func (*DRHeader) XXX_Size

func (m *DRHeader) XXX_Size() int

func (*DRHeader) XXX_Unmarshal

func (m *DRHeader) XXX_Unmarshal(b []byte) error

type DirectMessageProtocol

type DirectMessageProtocol struct {
	X3DHHeader *X3DHHeader `protobuf:"bytes,1,opt,name=X3DH_header,json=X3DHHeader,proto3" json:"X3DH_header,omitempty"`
	DRHeader   *DRHeader   `protobuf:"bytes,2,opt,name=DR_header,json=DRHeader,proto3" json:"DR_header,omitempty"`
	DHHeader   *DHHeader   `protobuf:"bytes,101,opt,name=DH_header,json=DHHeader,proto3" json:"DH_header,omitempty"`
	// Encrypted payload
	Payload              []byte   `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Direct message value

func (*DirectMessageProtocol) Descriptor

func (*DirectMessageProtocol) Descriptor() ([]byte, []int)

func (*DirectMessageProtocol) GetDHHeader

func (m *DirectMessageProtocol) GetDHHeader() *DHHeader

func (*DirectMessageProtocol) GetDRHeader

func (m *DirectMessageProtocol) GetDRHeader() *DRHeader

func (*DirectMessageProtocol) GetPayload

func (m *DirectMessageProtocol) GetPayload() []byte

func (*DirectMessageProtocol) GetX3DHHeader

func (m *DirectMessageProtocol) GetX3DHHeader() *X3DHHeader

func (*DirectMessageProtocol) ProtoMessage

func (*DirectMessageProtocol) ProtoMessage()

func (*DirectMessageProtocol) Reset

func (m *DirectMessageProtocol) Reset()

func (*DirectMessageProtocol) String

func (m *DirectMessageProtocol) String() string

func (*DirectMessageProtocol) XXX_DiscardUnknown

func (m *DirectMessageProtocol) XXX_DiscardUnknown()

func (*DirectMessageProtocol) XXX_Marshal

func (m *DirectMessageProtocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DirectMessageProtocol) XXX_Merge

func (m *DirectMessageProtocol) XXX_Merge(src proto.Message)

func (*DirectMessageProtocol) XXX_Size

func (m *DirectMessageProtocol) XXX_Size() int

func (*DirectMessageProtocol) XXX_Unmarshal

func (m *DirectMessageProtocol) XXX_Unmarshal(b []byte) error

type ProtocolMessage

type ProtocolMessage struct {
	// An optional bundle is exchanged with each message
	Bundle *Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"`
	// The device id of the sender
	InstallationId string `protobuf:"bytes,2,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"`
	// List of bundles
	Bundles []*Bundle `protobuf:"bytes,3,rep,name=bundles,proto3" json:"bundles,omitempty"`
	// One to one message, encrypted, indexed by installation_id
	DirectMessage map[string]*DirectMessageProtocol `` /* 190-byte string literal not displayed */
	// Public chats, not encrypted
	PublicMessage        []byte   `protobuf:"bytes,102,opt,name=public_message,json=publicMessage,proto3" json:"public_message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Top-level protocol message

func (*ProtocolMessage) Descriptor

func (*ProtocolMessage) Descriptor() ([]byte, []int)

func (*ProtocolMessage) GetBundle

func (m *ProtocolMessage) GetBundle() *Bundle

func (*ProtocolMessage) GetBundles

func (m *ProtocolMessage) GetBundles() []*Bundle

func (*ProtocolMessage) GetDirectMessage

func (m *ProtocolMessage) GetDirectMessage() map[string]*DirectMessageProtocol

func (*ProtocolMessage) GetInstallationId

func (m *ProtocolMessage) GetInstallationId() string

func (*ProtocolMessage) GetPublicMessage

func (m *ProtocolMessage) GetPublicMessage() []byte

func (*ProtocolMessage) ProtoMessage

func (*ProtocolMessage) ProtoMessage()

func (*ProtocolMessage) Reset

func (m *ProtocolMessage) Reset()

func (*ProtocolMessage) String

func (m *ProtocolMessage) String() string

func (*ProtocolMessage) XXX_DiscardUnknown

func (m *ProtocolMessage) XXX_DiscardUnknown()

func (*ProtocolMessage) XXX_Marshal

func (m *ProtocolMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProtocolMessage) XXX_Merge

func (m *ProtocolMessage) XXX_Merge(src proto.Message)

func (*ProtocolMessage) XXX_Size

func (m *ProtocolMessage) XXX_Size() int

func (*ProtocolMessage) XXX_Unmarshal

func (m *ProtocolMessage) XXX_Unmarshal(b []byte) error

type SignedPreKey

type SignedPreKey struct {
	SignedPreKey         []byte   `protobuf:"bytes,1,opt,name=signed_pre_key,json=signedPreKey,proto3" json:"signed_pre_key,omitempty"`
	Version              uint32   `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	ProtocolVersion      uint32   `protobuf:"varint,3,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SignedPreKey) Descriptor

func (*SignedPreKey) Descriptor() ([]byte, []int)

func (*SignedPreKey) GetProtocolVersion

func (m *SignedPreKey) GetProtocolVersion() uint32

func (*SignedPreKey) GetSignedPreKey

func (m *SignedPreKey) GetSignedPreKey() []byte

func (*SignedPreKey) GetVersion

func (m *SignedPreKey) GetVersion() uint32

func (*SignedPreKey) ProtoMessage

func (*SignedPreKey) ProtoMessage()

func (*SignedPreKey) Reset

func (m *SignedPreKey) Reset()

func (*SignedPreKey) String

func (m *SignedPreKey) String() string

func (*SignedPreKey) XXX_DiscardUnknown

func (m *SignedPreKey) XXX_DiscardUnknown()

func (*SignedPreKey) XXX_Marshal

func (m *SignedPreKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignedPreKey) XXX_Merge

func (m *SignedPreKey) XXX_Merge(src proto.Message)

func (*SignedPreKey) XXX_Size

func (m *SignedPreKey) XXX_Size() int

func (*SignedPreKey) XXX_Unmarshal

func (m *SignedPreKey) XXX_Unmarshal(b []byte) error

type X3DHHeader

type X3DHHeader struct {
	// Ephemeral key used
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Used bundle's signed prekey
	Id                   []byte   `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*X3DHHeader) Descriptor

func (*X3DHHeader) Descriptor() ([]byte, []int)

func (*X3DHHeader) GetId

func (m *X3DHHeader) GetId() []byte

func (*X3DHHeader) GetKey

func (m *X3DHHeader) GetKey() []byte

func (*X3DHHeader) ProtoMessage

func (*X3DHHeader) ProtoMessage()

func (*X3DHHeader) Reset

func (m *X3DHHeader) Reset()

func (*X3DHHeader) String

func (m *X3DHHeader) String() string

func (*X3DHHeader) XXX_DiscardUnknown

func (m *X3DHHeader) XXX_DiscardUnknown()

func (*X3DHHeader) XXX_Marshal

func (m *X3DHHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*X3DHHeader) XXX_Merge

func (m *X3DHHeader) XXX_Merge(src proto.Message)

func (*X3DHHeader) XXX_Size

func (m *X3DHHeader) XXX_Size() int

func (*X3DHHeader) XXX_Unmarshal

func (m *X3DHHeader) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL