bindings: Index | Files

package client

import ""

Package client provides a mixnet client library


Package Files

client.go key.go session.go

type KatzenClient Uses

type KatzenClient struct {
    // contains filtered or unexported fields

KatzenClient is katzenpost object

func NewKatzenClient Uses

func NewKatzenClient(pkiAddress, pkiKey string, logConfig *LogConfig) (*KatzenClient, error)

NewClient configures the pki to be used

func (*KatzenClient) NewSession Uses

func (c *KatzenClient) NewSession(user string, provider string, linkPrivKey *Key) (*Session, error)

NewSession stablishes a session with provider using key

type Key Uses

type Key struct {
    // contains filtered or unexported fields

Key keeps the key public and private data

func GenKey Uses

func GenKey() (*Key, error)

GenKey creates a new ecdh key

func KeyFromBase64 Uses

func KeyFromBase64(keyStr string) (*Key, error)

StringToKey builds a Key from a string

type LogConfig Uses

type LogConfig struct {
    File    string
    Level   string
    Enabled bool

LogConfig keeps the configuration of the loger

type MessageConsumer Uses

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 Uses

type Session struct {
    // contains filtered or unexported fields

Session holds the client session

func (*Session) Connect Uses

func (s *Session) Connect(identityPrivKey *Key, messageConsumer MessageConsumer) error

Connect connects the client to the Provider

func (*Session) Get Uses

func (s *Session) Get(identity string) (*ecdh.PublicKey, error)

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) Send Uses

func (s *Session) Send(recipient, provider string, msg string) error

Send into the mix network

func (*Session) SendUnreliable Uses

func (s *Session) SendUnreliable(recipient, provider string, msg string) error

SendUnreliable into the mix network

func (*Session) Shutdown Uses

func (s *Session) Shutdown()

Shutdown the session

type StorageStub Uses

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 Uses

func (s *StorageStub) GetBlocks(*[block.MessageIDLength]byte) ([][]byte, error)

GetBlocks returns a slice of blocks

func (*StorageStub) PutBlock Uses

func (s *StorageStub) PutBlock(*[block.MessageIDLength]byte, []byte) error

PutBlock puts a block into storage

Package client imports 12 packages (graph). Updated 2018-07-31. Refresh now. Tools for package owners.