261 lines
		
	
	
		
			2.5 MiB
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			261 lines
		
	
	
		
			2.5 MiB
		
	
	
	
		
			Go
		
	
	
	
	
	
|   | // Code generated by go-bindata. | ||
|  | // sources: | ||
|  | // assets/public/bundle.js | ||
|  | // assets/public/dashboard.html | ||
|  | // DO NOT EDIT! | ||
|  | 
 | ||
|  | package dashboard | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"bytes" | ||
|  | 	"compress/gzip" | ||
|  | 	"fmt" | ||
|  | 	"io" | ||
|  | 	"io/ioutil" | ||
|  | 	"os" | ||
|  | 	"path/filepath" | ||
|  | 	"strings" | ||
|  | 	"time" | ||
|  | ) | ||
|  | 
 | ||
|  | 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 _publicBundleJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7d\x57\x1b\xb9\x93\x28\xfc\xf7\xf0\x29\x94\xdc\x59\x6c\x27\xc6\x60\x92\xcc\x0b\x0c\x93\x25\x84\x64\xd9\x9b\x84\xdc\xc0\xcc\xdc\x3d\x2c\xd7\x91\xbb\x65\x5b\xa1\xdd\xf2\x74\xb7\x01\xff\x02\xdf\xfd\x39\xaa\xd2\x7b\x77\x1b\x63\x9c\xf9\xed\xec\xb3\xe4\x9c\xd8\x96\x4a\xa5\x52\xa9\x54\x7a\x2b\x55\x6d\x3e\x81\xbf\x4d\xd2\x1c\x4c\xd3\xa8\xe0\x22\x6d\x8e\x45\x3c\x4d\x58\xde\x22\x5f\xc9\xe6\x26\xb9\x62\xfd\x09\x8d\x2e\x5e\x09\x51\xe4\x45\x46\x27\x6b\xa6\xc4\x77\x9b\x9b\xe4\x74\xc4\x08\xc2\x93\x88\x46\x23\xe6\xe4\x5e\xd2\x8c\xf0\x34\x2f\x68\x92\xb0\xf8\x3d\xe2\x24\x7b\xe4\xeb\xed\xae\x01\x2a\xe3\xca\xd8\x9f\x53\x9e\x31\xa2\x89\x71\x20\x74\x12\xe9\xf5\x14\x4d\x3d\x05\xdd\xeb\x29\x9a\x8f\xe2\x16\xf9\x5a\x85\x5d\xa2\x3f\x18\xb1\xe8\x82\xf0\x81\xa6\x97\xe7\x84\xa7\x25\xaa\xbf\xe3\x83\x66\x48\xf5\x99\xc6\x7e\xee\xa2\x27\xdf\x7d\xf7\x5d\xc6\x8a\x69\x96\x96\x9a\x69\x0b\x74\xd8\xf5\x44\x64\x45\xbe\xeb\x16\xbb\x0d\x29\xcb\x18\x2d\x18\xa1\x24\x65\x57\x9a\xba\x26\x4d\x63\x32\x99\x16\x84\x17\x84\xa7\x85\x20\xc5\x48\xb1\xb8\xe5\x96\x96\x4c\x56\x25\xf6\xe6\x90\x21\xf9\xee\x11\xce\x77\x88\xce\x6c\x7b\x19\xc9\x0e\x19\xd0\x24\x67\x7e\xaa\x6a\xc5\x0e\xf9\xea\xd1\x5e\xdd\x95\xb2\x49\x87\xd7\x2c\x9a\x16\x0c\xa8\x56\xf4\x55\x74\xe9\x77\xe3\x12\xbf\x22\x9a\x24\xaa\x37\x35\xef\xda\x0a\x83\xfe\xb4\xe9\x15\x92\xd0\xaa\x25\xe9\x4d\x42\x87\x2e\x3d\x34\x27\x89\xa0\x31\x8b\xcb\x04\x75\x12\xb2\x47\x8a\x6c\xca\x6a\x91\x7d\xc2\x8e\x97\xe8\x14\x35\x44\x0c\x1c\xec\x2e\xb8\x12\x12\x9f\x78\x57\x20\x6e\xcb\xb5\xf8\x23\x43\x96\xc9\x5d\x66\xe6\x44\xf4\xbf\xb0\xa8\x20\x4d\xcb\x02\x95\xd3\xeb\xb9\x02\x52\xc1\xa1\xce\x98\xec\x69\x34\x75\x43\xb1\x54\x61\x69\x9c\x54\x21\x8e\x2a\x64\xb0\xae\x86\x98\x0d\x78\xca\xc8\x90\x15\x05\xcb\x8c\x6c\x90\x81\xc8\xc8\x88\x66\x63\x91\xce\x34\x63\xef\xa8\x34\x26\x7b\xa6\x78\xd3\x48\x46\x4a\xc7\xac\xad\xb0\x07\x83\x96\x0f\x9a\x8f\xaa\x10\x09\xbf\x74\x2b\x1c\xeb\xc7\xc0\xf1\x0e\x12\xfe\x31\x13\x13\x96\x15\xb3\xb0\x46\xbf\xc8\x77\x91\x48\x07\x7c\x38\xcd\x68\x3f\x61\x95\x03\xeb\x3b\x96\x4e\xc7\x4c\xe5\x4b\x89\x0b\xb2\x87\xac\xd8\x51\xcd\xf0\x32\x6e\x5b\xb5\x1a\xa5\x56\xbf\x0e\x59\xf1\x9a\x0d\xe8\x34\x29\x0e\x81\x68\x9f\xeb\x91\x18\x4f\x68\xc1\xfb\x3c\xe1\xc5\x8c\x5c\xf1\x62\x44\x52\x91\x6e\xe8\xce\x50\x02\x73\x47\x67\xa4\x6e\x67\x60\x91\x80\x8d\x52\x61\xa9\x4e\xd7\x52\x48\xd6\xd7\xf5\xe0\xe8\xf5\x58\x8e\x82\x43\x5e\x7a\xed\x35\xa4\xda\x46\x34\xe5\x04\xe5\x8d\xad\xb3\x46\x8c\x59\x8d\xf3\x5d\x72\x4b\x76\x6a\x31\x60\x15\xc8\x85\xbc\x8c\x67\x97\xdc\x7a\xdc\xad\x14\xbb\x26\xb6\xa2\x4d\x1a\xb4\x61\x24\x6d\xb7\x62\xdc\x63\xd6\xee\x22\x3d\xa4\x44\x6c\x92\x89\x42\x14\xb3\x09\xeb\x8c\x68\x7e\x7c\x95\x6a\x61\x03\xe5\x78\x47\x0f\x08\xb7\x07\x50\x49\xb4\xc9\x44\x21\x70\x5a\xba\x48\x55\xe5\xf2\x1e\x67\x7c\xda\x2d\x31\x93\x69\x3f\xe1\x51\x6f\x42\x8b\x51\xaf\x77\x07\xb9\x13\xb2\x47\x1e\x3f\xae\xc3\xf9\x4e\xd0\x98\xb0\xb4\xc8\x66\x46\x69\xa7\xb1\x6e\x41\x59\x3d\xa8\x8c\xaa\xf5\x41\x55\xdd\x72\x35\xf2\x7c\x6b\xdb\xed\xb4\x5b\xa3\x3b\x1f\xfe\xe7\xb4\xa5\x79\xb6\xb6\xf9\x84\x6c\x11\x95\x56\x5e\x6c\xb5\xc9\xdc\x39\x8d\x7c\x5d\x93\x08\xfe\x38\x7c\xf5\x71\xff\xe0\x7f\x93\xdf\xf7\x3f\x91\xa3\x0f\xff\x7e\x78\x70\x7a\x74\xfc\x81\x3c\xd9\xb4\xd8\x26\x99\x88\x58\x2e\x97\x6e\x9b\x4f\x9e\xac\x91\x27\xe4\x40\x4c\x66\x19\x1f\x8e\x0a\xd2\x8c\x5a\x64\x7b\xab\xfb\x6c\x63\x92\xb1\x9c\xa5\x45\x9b\xbc\xa1\x11\xeb\x0b\x71\xd1\x26\x47\x69\xd4\x59\x23\x50\xe0\x74\xc4\x73\x92\x8b\x69\x16\x31\x12\x89\x18\x96\x49\x09\x8f\x58\x9a\xb3\x98\x4c\xd3\x98\x65\x30\x2b\xbc\x3f\x3a\xd5\xc9\x64\x20\xa6\x69\x2c\xd7\x52\xc5\x88\x49\x14\xef\x8e\x0e\x0e\x3f\x9c\x1c\x92\x01\x97\xab\x2c\x9c\x24\x33\x21\x0a\x12\xf3\x8c\x45\x85\xc8\x66\x38\x57\xda\x8a\x8a\x8c\x31\x49\xc0\xe6\xda\x1a\x1f\x10\xdd\x8a\x0e\x4b\x2f\x3b\x1f\x8e\x5f\x1f\xf6\x0e\x3f\xfc\x4e\x1e\xed\xed\x91\xc6\x24\x13\xf1\x14\x9a\xda\x90\x4c\x21\x44\xaa\x93\x4f\x87\xfb\x07\xa7\xbd\xc3\x77\x87\xef\x0f\x3f\x9c\xf6\x4e\xff\xe3\xe3\x21\xd9\x23\x4d\x29\xd4\x62\x40\x4e\x66\xe3\xbe\x48\xc8\x9e\x2c\xad\xd9\xd4\x20\xeb\xeb\x6b\x84\x10\x95\xd9\x91\xea\xaf\x94\xd2\x6c\x64\x8c\x46\ | ||
|  | 
 | ||
|  | func publicBundleJsBytes() ([]byte, error) { | ||
|  | 	return bindataRead( | ||
|  | 		_publicBundleJs, | ||
|  | 		"public/bundle.js", | ||
|  | 	) | ||
|  | } | ||
|  | 
 | ||
|  | func publicBundleJs() (*asset, error) { | ||
|  | 	bytes, err := publicBundleJsBytes() | ||
|  | 	if err != nil { | ||
|  | 		return nil, err | ||
|  | 	} | ||
|  | 
 | ||
|  | 	info := bindataFileInfo{name: "public/bundle.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} | ||
|  | 	a := &asset{bytes: bytes, info: info} | ||
|  | 	return a, nil | ||
|  | } | ||
|  | 
 | ||
|  | var _publicDashboardHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x52\x4d\x8b\xdb\x30\x10\xbd\xe7\x57\xcc\x0e\x14\x5a\xa8\xd6\xd9\x5b\x49\x2d\x43\xd9\xa4\xa5\xa7\x94\x92\x85\xf6\x28\x5b\xb3\xd6\x34\xfa\x70\xa5\xb1\xb7\xf9\xf7\xc5\xce\x2e\x09\xfd\x38\x8d\x86\xf7\xde\xf0\x34\x6f\xea\x9b\xed\xfe\xfe\xf0\xfd\xcb\x0e\x9c\x04\xdf\xac\xea\xb9\x80\x37\xb1\xd7\x48\x11\xa1\xc8\xc9\x93\x46\x47\xdc\x3b\xd9\xc0\xdd\x7a\xfd\x0a\x9b\x15\x00\x40\xed\xc8\xd8\xf3\x73\x69\x03\x89\x81\xce\x99\x5c\x48\x34\x3e\x1c\x3e\xaa\x77\xf8\x27\xec\x44\x06\x45\x3f\x47\x9e\x34\x7e\x53\x0f\x1f\xd4\x7d\x0a\x83\x11\x6e\x3d\x21\x74\x29\x0a\x45\xd1\xf8\x79\xa7\xc9\xf6\xf4\x97\x3a\x9a\x40\x1a\x27\xa6\xa7\x21\x65\xb9\x12\x3c\xb1\x15\xa7\x2d\x4d\xdc\x91\x5a\x9a\xb7\xc0\x91\x85\x8d\x57\xa5\x33\x9e\xf4\x1d\x36\xab\xcb\x34\x61\xf1\xd4\x7c\x4a\xb0\x13\x47\x99\xc6\x00\x5b\x53\x5c\x9b\x4c\xb6\x75\x75\x06\x2f\x64\xcf\xf1\x08\x99\xbc\xc6\xe2\x52\x96\x6e\x14\xe0\x2e\x45\x04\x39\x0d\xa4\x91\x83\xe9\xa9\xe2\x2e\x21\xb8\x4c\x8f\x1a\xe7\x3f\x96\x4d\x55\xd1\xf3\xec\xdb\x94\xfb\xea\xd1\x4c\xb3\xe8\x76\xe6\x55\xd7\x56\x6e\x94\x82\xc3\x7e\xbb\x87\xd7\xc7\x31\x1f\x53\xe0\xc2\x6f\x36\xf0\x95\x64\xcc\x11\x24\x81\x38\x02\xfa\x25\x94\xa3\xf1\xe0\xb9\xcd\x26\x33\x95\x19\x29\x03\x91\x85\x71\x58\x28\xed\x18\xad\xe7\xd8\x83\x1d\xf3\x52\x68\x22\x9f\x86\x40\x51\x40\xa9\xe7\xc0\xaa\x4b\x62\x75\x9b\xec\xe9\x5f\xe1\xbe\x87\x60\x72\xcf\x71\x03\xeb\xeb\xfd\x5b\x9e\x80\xad\x46\xfb\xb2\xa7\xff\x5c\x46\x5d\x59\x9e\xae\x74\xa5\xcb\x3c\x08\x94\xdc\x69\x5c\x3c\xd2\xed\x8f\x32\xd3\xce\xc0\x8b\xb1\xd9\x4d\xb3\xaa\xab\xf3\x0d\xfe\x0e\x00\x00\xff\xff\x58\x5e\xc8\x63\x94\x02\x00\x00") | ||
|  | 
 | ||
|  | func publicDashboardHtmlBytes() ([]byte, error) { | ||
|  | 	return bindataRead( | ||
|  | 		_publicDashboardHtml, | ||
|  | 		"public/dashboard.html", | ||
|  | 	) | ||
|  | } | ||
|  | 
 | ||
|  | func publicDashboardHtml() (*asset, error) { | ||
|  | 	bytes, err := publicDashboardHtmlBytes() | ||
|  | 	if err != nil { | ||
|  | 		return nil, err | ||
|  | 	} | ||
|  | 
 | ||
|  | 	info := bindataFileInfo{name: "public/dashboard.html", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 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){ | ||
|  | 	"public/bundle.js":      publicBundleJs, | ||
|  | 	"public/dashboard.html": publicDashboardHtml, | ||
|  | } | ||
|  | 
 | ||
|  | // 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{ | ||
|  | 	"public": {nil, map[string]*bintree{ | ||
|  | 		"bundle.js":      {publicBundleJs, map[string]*bintree{}}, | ||
|  | 		"dashboard.html": {publicDashboardHtml, 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, "/")...)...) | ||
|  | } |