cli

package
v0.0.0-...-d92b2c6 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Daemon = cmd.Sub{
	Name:  "daemon",
	Short: "Run the web server daemon",
	Flags: &DaemonFlags{
		HTTP:    80,
		HTTPS:   443,
		SSLKey:  "/srv/haste-it/server.key",
		SSLCert: "/srv/haste-it/server.crt",
		Min:     100,
		Max:     (1 << 23),
		Worst:   (1 << 31),
	},
	Run: DaemonRun,
}
View Source
var Root = cmd.Root{
	Name:      "haste-it-server",
	Short:     "A small in-memory hastebin clone",
	Version:   "0.1.0",
	Copyright: "© 2017-2021 Bryan T. Meyers <root@datadrake.com>",
}

Functions

func DaemonRun

func DaemonRun(r *cmd.Root, c *cmd.Sub)

Types

type DaemonFlags

type DaemonFlags struct {
	HTTP    uint16 `short:"p" long:"http-port"  desc:"Port for HTTP (Default: 80)"`
	HTTPS   uint16 `short:"s" long:"https-port" desc:"Port for HTTPS (Default: 443)"`
	SSLKey  string `short:"k" long:"ssl-key"    desc:"Key file for SSL Cert (Default: /srv/haste-it/server.key)"`
	SSLCert string `short:"c" long:"ssl-cert"   desc:"SSL Cert (Default: /srv/haste-it/server.key)"`
	Min     int    `short:"m" long:"min-size"   desc:"Minimum file size (Default: 100B)"`
	Max     int    `short:"M" long:"max-size"   desc:"Maximum file size (Default: 16MB)"`
	Worst   int    `short:"w" long:"worst-size" desc:"Worst-case total size of in-memory storage (Default: 4GB)"`
}

Jump to

Keyboard shortcuts

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