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 ¶
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)"`
}
Click to show internal directories.
Click to hide internal directories.