Documentation ¶
Index ¶
- Constants
- Variables
- func CmdDecrypt() int
- func CmdEncrypt() int
- func CmdGenKey() int
- func CmdGenTempKey() int
- func CmdGet() int
- func CmdIndex() int
- func CmdPeerList() int
- func CmdPost() int
- func CmdSTM() int
- func CmdShowConfig() int
- func KeyCallBack(keyMgtFd int) (*os.File, func(*message.Curve25519Key) *message.Curve25519Key)
- func UserConfigFile() string
- func WriteConfigFile(conf ConfigVariables) error
- type ConfigVariables
- type Options
Constants ¶
View Source
const PeerUpdateDuration = 259200
PeerUPdateDuration is the maximum time to wait until peer updates are forced
View Source
const Version = "0.0.1 very alpha"
Version of client functions
Variables ¶
View Source
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") )
Functions ¶
func CmdGenTempKey ¶
func CmdGenTempKey() int
CmdGenTempKey generates a temporary key for a given private key
func CmdPeerList ¶
func CmdPeerList() int
CmdPeerList fetches the peerlist and returns a new configfile
func KeyCallBack ¶
func KeyCallBack(keyMgtFd int) (*os.File, func(*message.Curve25519Key) *message.Curve25519Key)
KeyCallBack implements a callback function to request keys from file-descriptor
func UserConfigFile ¶
func UserConfigFile() string
UserConfigFile returns the path to the user's config file, or an empty string on error
func WriteConfigFile ¶
func WriteConfigFile(conf ConfigVariables) error
WriteConfigFile writes the user's config file
Types ¶
type ConfigVariables ¶
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
GobalconfigVar
func LoadConfigFile ¶
func LoadConfigFile(file string) (conf ConfigVariables, err error)
LoadConfigFile loads configuration from a file
type Options ¶
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 .
Click to show internal directories.
Click to hide internal directories.