graphql-engine/cli/assets/assets.go

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