Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyConfigFile(options *Options, filePath string) error
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func CheckConfig(options *Options) error
- func ExpandHomeDir(path string) string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type App
- type ContextVars
- type InitMessage
- type Options
Constants ¶
const ( Input = '0' Ping = '1' ResizeTerminal = '2' )
const ( Output = '0' Pong = '1' SetWindowTitle = '2' SetPreferences = '3' SetReconnect = '4' )
Variables ¶
var DefaultOptions = Options{ Address: "", Port: "8080", PermitWrite: false, EnableBasicAuth: false, Credential: "", EnableRandomUrl: false, RandomUrlLength: 8, IndexFile: "", EnableTLS: false, TLSCrtFile: "~/.gotty.crt", TLSKeyFile: "~/.gotty.key", EnableTLSClientAuth: false, TLSCACrtFile: "~/.gotty.ca.crt", TitleFormat: "GoTTY - {{ .Command }} ({{ .Hostname }})", EnableReconnect: false, ReconnectTime: 10, Once: false, Preferences: make(map[string]interface{}), }
var Version = "0.0.11"
Functions ¶
func ApplyConfigFile ¶ added in v0.0.5
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func CheckConfig ¶ added in v0.0.11
func ExpandHomeDir ¶ added in v0.0.6
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type ContextVars ¶ added in v0.0.4
type InitMessage ¶ added in v0.0.11
type Options ¶ added in v0.0.3
type Options struct { Address string `hcl:"address"` Port string `hcl:"port"` PermitWrite bool `hcl:"permit_write"` EnableBasicAuth bool `hcl:"enable_basic_auth"` Credential string `hcl:"credential"` EnableRandomUrl bool `hcl:"enable_random_url"` RandomUrlLength int `hcl:"random_url_length"` IndexFile string `hcl:"index_file"` EnableTLS bool `hcl:"enable_tls"` TLSCrtFile string `hcl:"tls_crt_file"` TLSKeyFile string `hcl:"tls_key_file"` EnableTLSClientAuth bool `hcl:"enable_tls_client_auth"` TLSCACrtFile string `hcl:"tls_ca_crt_file"` TitleFormat string `hcl:"title_format"` EnableReconnect bool `hcl:"enable_reconnect"` ReconnectTime int `hcl:"reconnect_time"` Once bool `hcl:"once"` PermitArguments bool `hcl:"permit_arguments"` Preferences map[string]interface{} `hcl:"preferences"` }