graphql-engine/cli/assets/assets.go
2019-05-29 10:03:29 +05:30

290 lines
16 KiB
Go

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