Documentation ¶
Overview ¶
Package client provides a mixnet client library
Index ¶
- type KatzenClient
- type Key
- type LogConfig
- type MessageConsumer
- type Session
- func (s *Session) Connect(identityPrivKey *Key, messageConsumer MessageConsumer) error
- func (s *Session) Get(identity string) (*ecdh.PublicKey, error)
- func (s *Session) Send(recipient, provider string, msg string) error
- func (s *Session) SendUnreliable(recipient, provider string, msg string) error
- func (s *Session) Shutdown()
- type StorageStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KatzenClient ¶
type KatzenClient struct {
// contains filtered or unexported fields
}
KatzenClient is katzenpost object
func NewKatzenClient ¶
func NewKatzenClient(pkiAddress, pkiKey string, logConfig *LogConfig) (*KatzenClient, error)
NewClient configures the pki to be used
func (*KatzenClient) NewSession ¶
NewSession stablishes a session with provider using key
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key keeps the key public and private data
func KeyFromBase64 ¶
StringToKey builds a Key from a string
type MessageConsumer ¶
type MessageConsumer interface { ReceivedMessage(senderPubKey *ecdh.PublicKey, message []byte) ReceivedACK(messageID *[block.MessageIDLength]byte, message []byte) }
MessageConsumer is an interface used for processing received messages
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session holds the client session
func (*Session) Connect ¶
func (s *Session) Connect(identityPrivKey *Key, messageConsumer MessageConsumer) error
Connect connects the client to the Provider
func (*Session) Get ¶
Get returns the identity public key for a given identity. This is part of the UserKeyDiscovery interface defined in the client library. XXX fix me
func (*Session) SendUnreliable ¶
SendUnreliable into the mix network
type StorageStub ¶
type StorageStub struct { }
StorageStub implements the Storage interface as defined in the client library. XXX This should be replaced by something useful.
func (*StorageStub) GetBlocks ¶
func (s *StorageStub) GetBlocks(*[block.MessageIDLength]byte) ([][]byte, error)
GetBlocks returns a slice of blocks
func (*StorageStub) PutBlock ¶
func (s *StorageStub) PutBlock(*[block.MessageIDLength]byte, []byte) error
PutBlock puts a block into storage