Documentation ¶
Index ¶
- Variables
- func FollowHandleStream(callback func(*NewFollower)) network.StreamHandler
- func HandleStream(callback func(*EncryptedMessage)) network.StreamHandler
- func NewMessage(from ic.PrivKey, nonce uint64, to string, content string)
- type EncryptedMessage
- func (m *EncryptedMessage) Decrypt(privRSAKey []byte) (*Message, error)
- func (*EncryptedMessage) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptedMessage) GetEncryptedKey() []byte
- func (x *EncryptedMessage) GetMessage() []byte
- func (x *EncryptedMessage) GetReciever() []byte
- func (*EncryptedMessage) ProtoMessage()
- func (x *EncryptedMessage) ProtoReflect() protoreflect.Message
- func (x *EncryptedMessage) Reset()
- func (x *EncryptedMessage) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (m *Message) Encrypt(pubRSAKey []byte) (*EncryptedMessage, error)
- func (x *Message) GetAddress() *domain.Address
- func (x *Message) GetContent() []byte
- func (x *Message) GetReciever() []byte
- func (x *Message) GetSignature() []byte
- func (x *Message) GetTime() []byte
- func (x *Message) GetTopic() []byte
- func (x *Message) GetTopicID() []byte
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (m *Message) Sign(privateAddress *domain.PrivateAddress) error
- func (x *Message) String() string
- func (m *Message) Verify() (bool, error)
- type NewFollower
- func (*NewFollower) Descriptor() ([]byte, []int)deprecated
- func (x *NewFollower) GetName() []byte
- func (x *NewFollower) GetNonce() []byte
- func (x *NewFollower) GetPubKey() []byte
- func (x *NewFollower) GetReciever() []byte
- func (x *NewFollower) GetSignature() []byte
- func (*NewFollower) ProtoMessage()
- func (x *NewFollower) ProtoReflect() protoreflect.Message
- func (x *NewFollower) Reset()
- func (x *NewFollower) String() string
- type StoredMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var File_follow_proto protoreflect.FileDescriptor
View Source
var File_message_proto protoreflect.FileDescriptor
View Source
var FollowID = protocol.ID("/follow/1.0.0")
FollowID ...
View Source
var ID = protocol.ID("/msgSwap/1.0.0")
ID ...
Functions ¶
func FollowHandleStream ¶
func FollowHandleStream(callback func(*NewFollower)) network.StreamHandler
FollowHandleStream ...
func HandleStream ¶
func HandleStream(callback func(*EncryptedMessage)) network.StreamHandler
HandleStream ...
Types ¶
type EncryptedMessage ¶
type EncryptedMessage struct { Reciever []byte `protobuf:"bytes,1,opt,name=reciever,proto3" json:"reciever,omitempty"` EncryptedKey []byte `protobuf:"bytes,2,opt,name=encryptedKey,proto3" json:"encryptedKey,omitempty"` Message []byte `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EncryptedMessage) Decrypt ¶
func (m *EncryptedMessage) Decrypt(privRSAKey []byte) (*Message, error)
Decrypt ...
func (*EncryptedMessage) Descriptor
deprecated
func (*EncryptedMessage) Descriptor() ([]byte, []int)
Deprecated: Use EncryptedMessage.ProtoReflect.Descriptor instead.
func (*EncryptedMessage) GetEncryptedKey ¶
func (x *EncryptedMessage) GetEncryptedKey() []byte
func (*EncryptedMessage) GetMessage ¶
func (x *EncryptedMessage) GetMessage() []byte
func (*EncryptedMessage) GetReciever ¶
func (x *EncryptedMessage) GetReciever() []byte
func (*EncryptedMessage) ProtoMessage ¶
func (*EncryptedMessage) ProtoMessage()
func (*EncryptedMessage) ProtoReflect ¶
func (x *EncryptedMessage) ProtoReflect() protoreflect.Message
func (*EncryptedMessage) Reset ¶
func (x *EncryptedMessage) Reset()
func (*EncryptedMessage) String ¶
func (x *EncryptedMessage) String() string
type Message ¶
type Message struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Topic []byte `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` TopicID []byte `protobuf:"bytes,3,opt,name=topicID,proto3" json:"topicID,omitempty"` Time []byte `protobuf:"bytes,4,opt,name=time,proto3" json:"time,omitempty"` Reciever []byte `protobuf:"bytes,5,opt,name=reciever,proto3" json:"reciever,omitempty"` Address *domain.Address `protobuf:"bytes,10,opt,name=address,proto3" json:"address,omitempty"` Signature []byte `protobuf:"bytes,9,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) Encrypt ¶
func (m *Message) Encrypt(pubRSAKey []byte) (*EncryptedMessage, error)
Encrypt ...
func (*Message) GetAddress ¶
func (*Message) GetContent ¶
func (*Message) GetReciever ¶
func (*Message) GetSignature ¶
func (*Message) GetTopicID ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type NewFollower ¶
type NewFollower struct { Reciever []byte `protobuf:"bytes,1,opt,name=reciever,proto3" json:"reciever,omitempty"` Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` PubKey []byte `protobuf:"bytes,4,opt,name=pubKey,proto3" json:"pubKey,omitempty"` Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
func (*NewFollower) Descriptor
deprecated
func (*NewFollower) Descriptor() ([]byte, []int)
Deprecated: Use NewFollower.ProtoReflect.Descriptor instead.
func (*NewFollower) GetName ¶
func (x *NewFollower) GetName() []byte
func (*NewFollower) GetNonce ¶
func (x *NewFollower) GetNonce() []byte
func (*NewFollower) GetPubKey ¶
func (x *NewFollower) GetPubKey() []byte
func (*NewFollower) GetReciever ¶
func (x *NewFollower) GetReciever() []byte
func (*NewFollower) GetSignature ¶
func (x *NewFollower) GetSignature() []byte
func (*NewFollower) ProtoMessage ¶
func (*NewFollower) ProtoMessage()
func (*NewFollower) ProtoReflect ¶
func (x *NewFollower) ProtoReflect() protoreflect.Message
func (*NewFollower) Reset ¶
func (x *NewFollower) Reset()
func (*NewFollower) String ¶
func (x *NewFollower) String() string
Click to show internal directories.
Click to hide internal directories.