gotty/app/resource.go

287 lines
529 KiB
Go
Raw Normal View History

2015-08-16 09:47:23 +00:00
// Code generated by go-bindata.
// sources:
// bindata/gotty.js
// bindata/hterm.js
// bindata/index.html
// DO NOT EDIT!
package app
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"strings"
"os"
"time"
"io/ioutil"
"path/filepath"
)
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
var buf bytes.Buffer
_, err = io.Copy(&buf, gz)
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
if clErr != nil {
return nil, err
}
return buf.Bytes(), nil
}
type asset struct {
bytes []byte
info os.FileInfo
}
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
}
func (fi bindataFileInfo) Name() string {
return fi.name
}
func (fi bindataFileInfo) Size() int64 {
return fi.size
}
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}
func (fi bindataFileInfo) IsDir() bool {
return false
}
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _bindataGottyJs = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x53\x4d\x8f\xd3\x30\x10\xbd\xf7\x57\x58\xbe\x34\x11\x95\x97\xbd\x70\x48\x55\x71\x40\x70\x00\x04\x12\x2d\x70\x40\x08\xb9\xf1\xb4\x8d\x36\xf5\x44\xf6\x64\xa3\x82\xf2\xdf\x19\xbb\x49\x9b\x7e\xc2\x1c\x22\x67\xe6\xbd\xe7\x37\xf6\x38\x59\xd5\x36\xa7\x02\x6d\x92\x8a\x3f\x23\xc1\xf1\xac\x9d\xd8\x10\x55\xfe\xad\xd5\xcb\x12\x8c\x98\x89\xa6\xb0\x06\x1b\x55\x62\xae\x03\x54\x55\x0e\x09\x73\x2c\xc5\x6c\x26\x64\xc4\x66\x72\x7a\x20\xd7\x8e\x0b\x22\x39\xd1\x78\x2d\xc6\x8d\xf7\xd9\xc3\xc3\x58\x64\x61\x19\x56\xa9\x78\x71\xa1\xbc\x41\x4f\x57\xd2\x95\xa6\x8d\xd5\x5b\xe0\x12\x93\xc7\xc7\xbd\x7a\x27\x9e\x77\xfc\x21\xd7\x48\xb4\x93\x3f\x8f\xe5\x26\xe4\x2d\x34\xe2\x3b\x2c\xe7\x98\x3f\x01\x25\xec\x6e\x72\xa4\xa5\xd3\xd1\x01\x4c\xe0\xb6\xfc\x1b\xff\x1b\xaf\xd0\x62\x05\x96\xf9\x87\x13\x82\x67\xb0\xd4\x1f\x53\x88\x4d\xa0\x28\x03\x2b\x5d\x97\x34\x27\x74\x7a\x0d\xdd\x86\x65\xb1\x54\x5d\x46\x7d\xe4\x36\xca\x24\x1d\x1d\x78\x81\xd6\xe1\xf6\x12\x0b\xfe\x14\x36\x80\xa6\xa7\x28\x76\xd1\xd7\xbe\x80\x36\xbb\xa1\x9d\xa1\x93\xbe\x87\x02\x19\x11\x89\x05\xaa\xaa\xf6\x9b\x13\xc5\x10\x9c\x47\xfb\x6d\xf1\x01\x76\x9e\x1c\x3e\xc1\x50\x91\x33\xe7\xa2\xdd\x61\x78\xb0\x26\x91\x2f\x25\x5f\x40\x00\x4d\x4f\x30\xed\xe5\x16\x01\x3f\x27\x57\xd8\x35\xeb\x9f\x6f\x79\xcd\xd1\xb1\x4b\x5f\xfc\x3e\x31\xc5\xd7\x54\x6f\xad\x9f\x08\x87\x8d\xbf\x67\xef\xa2\x10\x42\x3e\x06\xcf\xef\xe7\x9f\x3f\x29\x1f\xfd\x14\xab\xdd\x75\x64\x88\x4b\xf1\x61\x84\x09\xcc\x84\x74\xd1\xe2\x2f\xea\x1c\xcb\xc9\x5d\x92\x76\xeb\x7a\xcb\x73\xe3\xb3\x7f\xa8\x87\xe8\x7a\xcd\xfa\xc5\x7d\xe9\x10\xe1\x50\xb2\xf8\xbd\x8f\x6d\x6f\x97\xdb\xab\x95\xf4\x22\x9b\xde\xbd\xf4\xfd\xd0\x59\x4f\xba\x2c\xf9\xa6\x97\xa8\x9d\x49\x06\x83\xd2\x9e\x4f\xb6\x81\x9c\x9f\x07\x41\x62\x30\x8f\x27\xa4\x96\x68\x76\x1d\xa3\x47\xc7\x77\xb8\x05\xef\xf7\x2f\xeb\xf6\x53\xec\x67\xbe\x71\x05\xc1\xd7\xc5\xbb\xc7\x57\x7b\x8c\x32\x9a\x74\x2f\x3a\xd0\xcc\x4b\xf4\xff\xa7\x58\xf1\xd4\x50\x22\xdf\xa0\xb5\x10\xa1\x22\x72\x8d\x92\x83\xee\x22\xb8\xb6\x37\xfa\x6f\x47\x6d\xca\xef\xff\x6f\x00\x00\x00\xff\xff\xcd\x99\x0a\x1e\x6c\x05\x00\x00")
func bindataGottyJsBytes() ([]byte, error) {
return bindataRead(
_bindataGottyJs,
"bindata/gotty.js",
)
}
func bindataGottyJs() (*asset, error) {
bytes, err := bindataGottyJsBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bindata/gotty.js", size: 1388, mode: os.FileMode(436), modTime: time.Unix(1439724159, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bindataHtermJs = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xec\x7d\xfb\x7f\xdb\xc6\x91\xf8\xef\xfe\x2b\x10\x35\x57\x92\x36\x45\x91\x7a\xcb\x8e\x92\x63\x2c\x2b\xe7\xfb\x38\x4e\xbe\xb6\x73\xbd\xfb\xd8\xae\x0f\x24\x97\x12\x62\x12\x60\x01\x50\x12\x9b\xe8\xfe\xf6\xef\x3c\xf6\x31\xbb\x00\x48\x3a\x69\x7b\x6d\x2f\x4e\x4c\x93\xc0\x60\x31\x3b\x3b\xef\x9d\xdd\xdd\xdb\x8b\xde\x5c\x27\x45\x34\x4d\x66\x2a\xba\x8d\x8b\xe8\x4a\xa5\x2a\x8f\x4b\x35\x89\x46\xab\x68\x96\x8c\x26\x59\xb9\x37\x4a\xd2\xbd\x71\x96\x8e\xe3\xb2\x57\x5c\xf7\x1e\xc0\x33\xcf\xcb\xe8\x1a\x80\x47\x4a\xa5\xd1\x3c\xce\x3f\x02\x78\xae\xe2\xc9\x6e\x96\xce\x56\xd1\x34\xcb\xa3\x55\xb6\xcc\xa3\x22\x9e\xaa\x72\xd5\x8b\xa2\x57\x71\x79\xad\x72\x7c\xb0\xbc\x8e\xd3\x48\x4d\x92\x32\x82\xff\x27\x49\xae\xc6\xe5\x6c\xd5\x8d\x16\x33\x15\x17\x2a\x9a\x67\x93\x64\xba\x8a\xb2\x54\x45\xd9\x14\x60\x15\x5c\x2b\xa0\xa5\xb1\xc2\x67\x11\xc7\xa2\xd7\x43\x04\xf0\xa7\x46\xee\xc7\x62\x0f\xbe\xf5\x7e\x2c\x2a\xd7\x3e\x8c\xb3\x59\x96\x17\xb5\xb7\xa6\xb5\x57\xe7\xaa\x28\xe2\x2b\xf5\x61\x1e\xa7\xf0\x4f\x5e\x0b\xb3\xc8\xd5\x54\xe5\x2a\x1d\xaf\x07\xcb\x15\x23\x5e\x7b\xb3\x28\xb3\x1c\x9e\x5c\x77\xef\xc3\xf8\x3a\xcf\xe6\xeb\x41\x66\xd9\x38\x9e\xad\x85\x98\xab\x79\x96\xaf\x6a\x41\x4a\x55\x94\x6b\x7b\xb0\x2c\xa7\xa7\xb5\x37\x6e\xc7\xfa\xf2\x75\xa9\xf2\x39\x5e\xa5\x2f\xb5\x17\x3f\x4c\xf3\xd8\xf6\x22\xb8\xf5\x51\xad\x46\x59\x9c\x4f\xd6\xdf\xfd\x00\xdc\x37\x49\xd2\xab\x62\x03\x18\x7c\x99\xc7\x8b\xcd\x40\x8b\xb8\x84\x6b\x69\x3d\x60\xb6\x28\x93\x2c\x6d\x78\xd5\x22\xce\x0b\x4b\xab\xda\x7b\x1f\x92\x89\x4a\xcb\x64\x9a\xa8\xbc\xa9\x8d\x26\xee\x09\xe1\x96\xa3\x62\x39\xaa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xdc\x7b\xf8\xf0\x41\xf4\x30\xfa\x36\x5e\x60\x27\x77\x26\x6a\xa1\xe0\x3d\xe9\x78\xb5\x13\x95\x59\xf4\x76\x87\x7b\xbc\xd3\x8d\x40\x83\xbe\xef\x01\x28\x42\x3f\x8b\xc7\xd7\x91\x03\x45\x52\xc4\xe6\x9d\x29\x08\x6e\x17\xde\xf0\x51\x11\x2e\xbd\x69\x01\x0f\x9b\x66\x10\x12\x3b\xbf\xcc\x67\x44\x1c\x6c\x0c\xda\x81\x56\x26\x05\xe8\x6f\xba\xc7\xed\xe0\xab\xf6\x1e\x60\x03\xf9\x12\x64\x63\xae\x2e\xcc\xeb\x12\x55\x7c\x08\xb0\x7f\x01\xdd\x43\xf4\xa7\xcb\x74\x4c\x92\xc8\x94\x4f\x15\x0c\x0d\xf4\x62\x04\x83\x95\xde\x64\x68\x6e\x26\xcb\x1c\x94\x02\x12\x20\x8f\x73\x40\x3c\x4d\xca\x24\x9e\x25\x7f\x8e\xf1\x31\xaf\x7b\x6a\xa6\xe6\x20\x95\x66\xb8\x10\xf2\x69\x3c\x9b\x8d\xe2\xf1\x47\x78\x7f\x9c\xe7\x31\xf5\x3b\x29\x0b\x35\x9b\x42\xf7\xcb\xdb\x6c\xd7\x3c\x43\x77\x7b\xd4\x94\xbe\xd2\x67\x1a\x15\xc0\x6a\x25\x0d\x33\x20\x31\x51\x20\x76\xc9\x08\xbf\x52\xbf\x6f\xc1\x84\x6a\x03\x46\xaf\x8b\xf2\x6c\x59\xc2\x80\x77\x23\xe0\x8d\xe9\x72\x86\xed\xa1\x91\x9c\xa8\xd1\xf2\xea\x0a\x1e\x03\x13\x69\xda\x1f\x18\xca\x8e\x35\x8e\x96\x16\x8e\x90\x41\x17\xce\xa3\xb7\xef\x1d\x09\x5f\xa9\x71\x96\x4f\x10\x47\x4d\x6f\x31\xbe\x86\x2e\x64\xf2\x99\x9d\x35\x4a\xd1\xed\x35\x98\x72\xb0\xda\xe0\x04\x00\x16\x40\x6b\x75\x07\xba\xaa\xd0\xed\xec\x06\x0d\x45\x3c\xe2\xe3\x6c\xbe\x40\xc7\x01\xef\x42\x1f\xc0\x2b\x80\x76\xd3\x0c\x69\x5d\x22\xa4\x19\xb4\x18\x3a\x31\x9b\xed\x4e\x67\x6a\x72\x05\x17\xcd\xa0\x15\
func bindataHtermJsBytes() ([]byte, error) {
return bindataRead(
_bindataHtermJs,
"bindata/hterm.js",
)
}
func bindataHtermJs() (*asset, error) {
bytes, err := bindataHtermJsBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bindata/hterm.js", size: 522491, mode: os.FileMode(292), modTime: time.Unix(1439718325, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bindataIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x6c\x4f\x4d\xce\xc2\x20\x10\xdd\x7f\xa7\x98\xaf\x89\x5b\xa9\xdb\x76\xec\xd6\x0b\xf4\x02\xb5\x10\x06\x53\x84\xc0\x24\x4a\x8c\x77\x17\x4a\x58\xe9\x6a\xde\x9b\x79\x3f\x19\xfc\x97\x6e\xe5\xe4\x15\x10\xdb\x6d\xfa\xc3\x3a\x00\x90\xd4\x22\x0b\xc8\x90\x0d\x6f\x6a\xba\xb8\x79\x4e\x28\x2a\xa9\x87\xc8\x29\xe3\xab\x93\x09\x5e\xa4\x8c\x26\x1e\xe0\xd4\xf7\x87\x11\x1e\x46\x32\x35\x62\x97\xa0\xcd\x7d\x80\xde\x3f\xc7\x37\x8a\xea\x2a\x1d\xa2\x95\x60\xc9\x68\xa1\x6b\x30\x9e\x21\x86\xf5\xdc\x11\xab\x60\x8f\xb7\xd8\x4d\xd9\xb6\xef\x7f\x88\xb4\x63\x4e\x5f\x22\x14\x35\x33\x97\xec\x2f\x7d\x02\x00\x00\xff\xff\x07\xc0\xd0\x07\xea\x00\x00\x00")
func bindataIndexHtmlBytes() ([]byte, error) {
return bindataRead(
_bindataIndexHtml,
"bindata/index.html",
)
}
func bindataIndexHtml() (*asset, error) {
bytes, err := bindataIndexHtmlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bindata/index.html", size: 234, mode: os.FileMode(436), modTime: time.Unix(1439724493, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
// 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 Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not found", name)
}
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
a, err := Asset(name)
if (err != nil) {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
}
// 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 AssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("AssetInfo %s not found", name)
}
// AssetNames returns the names of the assets.
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
}
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"bindata/gotty.js": bindataGottyJs,
"bindata/hterm.js": bindataHtermJs,
"bindata/index.html": bindataIndexHtml,
}
// 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 AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
cannonicalName := strings.Replace(name, "\\", "/", -1)
pathList := strings.Split(cannonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
}
}
if node.Func != nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}
type bintree struct {
Func func() (*asset, error)
Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
"bindata": &bintree{nil, map[string]*bintree{
"gotty.js": &bintree{bindataGottyJs, map[string]*bintree{
}},
"hterm.js": &bintree{bindataHtermJs, map[string]*bintree{
}},
"index.html": &bintree{bindataIndexHtml, map[string]*bintree{
}},
}},
}}
// RestoreAsset restores an asset under the given directory
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
if err != nil {
return err
}
return nil
}
// RestoreAssets restores an asset under the given directory recursively
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
}
func _filePath(dir, name string) string {
cannonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}