util

package
v0.0.0-...-30b4a77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2016 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package util contains utility functions for Mute.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented is returned if the used functionality is not implemented y

TODO: implement everything and remove.

View Source
var MixAddress string

MixAddress defines the mix address.

TODO: Allow multiple domains.

Functions

func ContainsString

func ContainsString(sa []string, s string) bool

ContainsString returns true, if the the string array sa contains the string s. Otherwise, it returns false.

func Cp

func Cp(srcFile, destFile string) error

Cp copies a srcFile to destFile.

func CreateDirs

func CreateDirs(dirs ...string) error

CreateDirs creates all given directories.

func Fatal

func Fatal(err error)

Fatal prints err to stderr and exits the process with exit code 1.

func MailboxAddress

func MailboxAddress(pubkey *[ed25519.PublicKeySize]byte, server string) []byte

MailboxAddress returns the mailbox address for the given pubkey and server.

func NewNymAddress

func NewNymAddress(
	domain string,
	secret []byte,
	expire int64,
	singleUse bool,
	minDelay, maxDelay int32,
	id string,
	pubkey *[ed25519.PublicKeySize]byte,
	server string,
	caCert []byte,
) (mixaddress, nymaddress string, err error)

NewNymAddress generates a new nym address.

func Readline

func Readline(fp *os.File) ([]byte, error)

Readline reads a single line from the file pointer fp with given name. It closes the file pointer afterwards. Make sure you do not call it multiple times on the same file pointer!

func StopProc

func StopProc(cmd *exec.Cmd) error

StopProc interrupts a process and waits until it exits. On windows, interrupt is not supported, so a kill signal is used instead.

Types

This section is empty.

Directories

Path Synopsis
Package browser defines web browser related helper functions.
Package browser defines web browser related helper functions.
Package bzero defines helper functions to zero sensitive memory.
Package bzero defines helper functions to zero sensitive memory.
Package descriptors defines helper functions for common file descriptors.
Package descriptors defines helper functions for common file descriptors.
Package digits defines helper functions to count the digits of integers.
Package digits defines helper functions to count the digits of integers.
Package fuzzer provides a sequential fuzzer for testing purposes.
Package fuzzer provides a sequential fuzzer for testing purposes.
Package git implements git wrappers.
Package git implements git wrappers.
Package gotool implements wrappers for the Go tool.
Package gotool implements wrappers for the Go tool.
Package home provides utility methods for application specific home directories.
Package home provides utility methods for application specific home directories.
Package interrupt allows to handle interrupts.
Package interrupt allows to handle interrupts.
Package jsonclient contains a JSON-RPC over HTTPS client for Mute.
Package jsonclient contains a JSON-RPC over HTTPS client for Mute.
Package msgs defines some test messages for Mute unit tests.
Package msgs defines some test messages for Mute unit tests.
Package times contains time utility functions for Mute.
Package times contains time utility functions for Mute.
Package wallet defines wallet utility functions.
Package wallet defines wallet utility functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL