croc

package
v3.0.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogLevel

func SetLogLevel(level string) (err error)

SetLogLevel determines the log level

Types

type Croc

type Croc struct {
	// Options for all
	Debug bool

	// Options for relay
	ServerPort string
	CurveType  string

	// Options for connecting to server
	TcpPorts         []string
	WebsocketAddress string
	Timeout          time.Duration
	LocalOnly        bool
	NoLocal          bool

	// Options for file transfering
	UseEncryption       bool
	UseCompression      bool
	AllowLocalDiscovery bool
	Yes                 bool
	Stdout              bool
	// contains filtered or unexported fields
}

func Init

func Init() (c *Croc)

Init will initialize the croc relay

func (*Croc) Receive

func (c *Croc) Receive(codePhrase string) (err error)

Receive will receive something through the croc relay

func (*Croc) Relay

func (c *Croc) Relay() error

Relay initiates a relay

func (*Croc) Send

func (c *Croc) Send(fname string, codePhrase string) (err error)

Send will take an existing file or folder and send it through the croc relay

func (*Croc) SetDebug

func (c *Croc) SetDebug(debug bool)

type FileMetaData

type FileMetaData struct {
	Name               string
	Size               int
	Hash               string
	IsDir              bool
	IsEncrypted        bool
	IsCompressed       bool
	DeleteAfterSending bool
}

Jump to

Keyboard shortcuts

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