Documentation ¶
Index ¶
- func PublicKeyToPartitionedTopic(publicKey *ecdsa.PublicKey) string
- func PublicKeyToPartitionedTopicBytes(publicKey *ecdsa.PublicKey) []byte
- func ToTopic(s string) []byte
- type Chat
- type Filter
- type Service
- func (s *Service) AddAsymmetricFilter(keyAsym *ecdsa.PrivateKey, chatID string, listen bool) (*Filter, error)
- func (s *Service) AddSymmetric(chatID string) (*Filter, error)
- func (s *Service) Get(identity *ecdsa.PublicKey) *Chat
- func (s *Service) Init(chats []*Chat) (map[string]*Chat, error)
- func (s *Service) Load(chat *Chat) (*Chat, error)
- func (s *Service) LoadDiscovery(myKey *ecdsa.PrivateKey) error
- func (s *Service) LoadOneToOne(myKey *ecdsa.PrivateKey, identity string, listen bool) error
- func (s *Service) LoadPublic(chat *Chat) error
- func (s *Service) ProcessNegotiatedSecret(secret *topic.Secret) (*Chat, error)
- func (s *Service) Remove(chat *Chat) error
- func (s *Service) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chat ¶
type Chat struct { // ChatID is the identifier of the chat ChatID string // SymKeyID is the symmetric key id used for symmetric chats SymKeyID string // OneToOne tells us if we need to use asymmetric encryption for this chat OneToOne bool // Listen is whether we are actually listening for messages on this chat, or the filter is only created in order to be able to post on the topic Listen bool // FilterID the whisper filter id generated FilterID string // Identity is the public key of the other recipient for non-public chats Identity string // Topic is the whisper topic Topic []byte }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AddAsymmetricFilter ¶
func (*Service) LoadDiscovery ¶
func (s *Service) LoadDiscovery(myKey *ecdsa.PrivateKey) error
LoadDiscovery adds the discovery filter
func (*Service) LoadOneToOne ¶
LoadOneToOne creates two filters for a given chat, one listening to the contact codes and another on the partitioned topic. We pass a listen parameter to indicated whether we are listening to messages on the partitioned topic
func (*Service) LoadPublic ¶
func (*Service) ProcessNegotiatedSecret ¶
Click to show internal directories.
Click to hide internal directories.