common

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2016 License: MIT Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPort = 21991
View Source
var Done = make(chan bool, 1)

Make this true if you want to quit

View Source
var ProgramDir string

Where the default program directory is

Functions

func CopyFile

func CopyFile(src, dst string) (err error)

NOTE: I *NEVER* copy from stack overflow XXX: Link for me later: http://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file-in-golang CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.

func DoesUserExist

func DoesUserExist(username string) (bool, error)

Check if user exists TODO: Protect against usernames like "/" or " ", that could just go to keybase.io

Types

type CreateConnFunc

type CreateConnFunc func(string)

Create Connection Function from UI type

type Message

type Message struct {
	Username  string
	Decrypted bool
	Err       error
	Message   string
	Fullname  string
	ToUsers   []string
	ChatName  string
}

Decrypted Message struct

func NewMessage

func NewMessage() *Message

Create a new message with defaults

type SendMessageFunc

type SendMessageFunc func(Message)

Send Message Function from UI type

Jump to

Keyboard shortcuts

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