sharethis

package module
v0.0.0-...-6545680 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

README

sharethis

Easy file sharing for the mere mortal

TODO

  • Better documentation. :P
  • Logging (probably with log levels too)
  • Per-account bandwidth quotas
  • Admin functionality (use the client to add or remove keys, adjust quotas, etc)
  • Remove hardcoded idiotic values
  • UPnP hole-punching (so that the server does not have to proxy files (as in direct peer-to-peer file sending))

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPrefixFn = func() string {
	hostname, err := os.Hostname()
	if err != nil {
		fmt.Fprintln(os.Stderr, "Could not get hostname with os.Hostname()")
		hostname = "unknown"
	}
	var username string
	userobj, err := user.Current()
	if err != nil {
		fmt.Fprintln(os.Stderr, "Could not get user with user.Current()")
		username = "unknown"
	} else {
		username = userobj.Username
	}
	return fmt.Sprintf("%s@%s", username, hostname)
}

Functions

This section is empty.

Types

type FileReq

type FileReq struct {
	Path       string
	ShareCount uint
	Username   string
	Hostname   string
	ServerConn *ssh.ServerConn

	IsDir bool
	// contains filtered or unexported fields
}

func NewFileReq

func NewFileReq(path, httpport, remotehost string, shareCount uint) *FileReq

func (*FileReq) RebuildUrls

func (fr *FileReq) RebuildUrls()

func (*FileReq) String

func (fr *FileReq) String() string

type NewChannel

type NewChannel struct {
	ssh.NewChannel
	DoZip bool
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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