repbin: Index | Files

package client

import ""

Package client implements the repbin client library.


Package Files

decrypt.go doc.go encrypt.go genkey.go getindex.go keymgt.go peerlist.go postget.go stm.go types.go utils.go


const PeerUpdateDuration = 259200

PeerUPdateDuration is the maximum time to wait until peer updates are forced

const Version = "0.0.2 very alpha"

Version of client functions


var (
    // ErrNoPeers is returned if the client could not find new peers
    ErrNoPeers = errors.New("client: No peers")
    // ErrNoConfig is returned when no config file could be named
    ErrNoConfig = errors.New("client: No config file")

func CmdDecrypt Uses

func CmdDecrypt() int

CmdDecrypt implements decryption functions

func CmdEncrypt Uses

func CmdEncrypt() int

CmdEncrypt encrypts data.

func CmdGenKey Uses

func CmdGenKey() int

CmdGenKey generates a long-term public key

func CmdGenTempKey Uses

func CmdGenTempKey() int

CmdGenTempKey generates a temporary key for a given private key

func CmdGet Uses

func CmdGet() int

CmdGet gets a file

func CmdIndex Uses

func CmdIndex() int

CmdIndex returns the index for a private key

func CmdPeerList Uses

func CmdPeerList() int

CmdPeerList fetches the peerlist and returns a new configfile

func CmdPost Uses

func CmdPost() int

CmdPost posts a message

func CmdSTM Uses

func CmdSTM() int

CmdSTM does an STM run to specific server and from specific stmdir

func CmdShowConfig Uses

func CmdShowConfig() int

CmdShowConfig prints current config to stdout

func KeyCallBack Uses

func KeyCallBack(keyMgtFd int) (*os.File, func(*message.Curve25519Key) *message.Curve25519Key)

KeyCallBack implements a callback function to request keys from file-descriptor

func UserConfigFile Uses

func UserConfigFile() string

UserConfigFile returns the path to the user's config file, or an empty string on error

func WriteConfigFile Uses

func WriteConfigFile(conf ConfigVariables) error

WriteConfigFile writes the user's config file

type ConfigVariables Uses

type ConfigVariables struct {
    BodyLength    int
    PadToLength   int
    MinHashCash   byte
    PrivateKey    string
    KeyDir        string   // directory for signKeys
    SocksServer   string   // url of socks server (if any)
    PeerUpdate    int64    // when did we update the peers last?
    BootStrapPeer string   // What peer to bootstrap from
    PasteServers  []string // urls of pastebins

ConfigVariables are settings read from config file

var GlobalConfigVar ConfigVariables


func LoadConfigFile Uses

func LoadConfigFile(file string) (conf ConfigVariables, err error)

LoadConfigFile loads configuration from a file

type Options Uses

type Options struct {
    KEYVERB bool // switch on key verbosity
    Verbose bool // switch on verbosity
    Appdata bool // switch on appdata output

    Sync   bool // key is synced
    Hidden bool // key is hidden

    Privkey string // private key

    Signkey string // signature key file
    Signdir string // signature directory

    Configfile string // load configuration from file

    Infile  string // read input data from file
    Outfile string // write output data to file
    Stmdir  string // STM dir
    Outdir  string // output directory for batch index download

    Senderkey    string // public key for recipient
    Recipientkey string // public key for recipient
    Embedkey     bool   // embed a new/fresh public key
    Notrace      bool   // embed keys do not depend on private key
    Anonymous    bool   // disable private key and previous signerkeys
    Repost       bool   // create a repost message (will not be posted)
    Mindelay     int    // minimum repost delay
    Maxdelay     int    // maximum repost delay

    Keymgt int // key management file descriptor

    Start int // start position for index fetch
    Count int // maximum number of index entries to fetch

    Socksserver string // socks server to use
    Server      string // server to use

    MessageType int // message type of message

Options are options used in the client

var OptionsVar Options

OptionsVar .

Package client imports 19 packages (graph) and is imported by 1 packages. Updated 2016-07-20. Refresh now. Tools for package owners.