mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
76ceb707f4
This PR builds console static assets into the server docker image at `/srv/console-assets`. When env var `HASURA_GRAPHQL_CONSOLE_ASSETS_DIR=/srv/console-assets` or flag `--console-assets-dir=/srv/console-assets` is set on the server, the files in this directory are served at `/console/assets/*`. The console html template will have a variable called `cdnAssets: false` when this flag is set and it loads assets from server itself instead of CDN. The assets are moved to a new bucket with a new naming scheme: ``` graphql-engine-cdn.hasura.io/console/assets/ /common/{} /versioned/<version/{} /channel/<channel>/<version>/{} ``` Console served by CLI will still load assets from CDN - will fix that in the next release.
290 lines
16 KiB
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\xac\x56\xdf\x6f\xdb\x36\x10\x7e\xcf\x5f\x71\xe0\x30\xf4\x61\x13\xe9\x76\x05\x56\xc8\x56\x80\x62\xc5\xb0\x61\x1b\x50\xa0\xcd\x5e\x03\x86\x3a\x49\x97\x52\xa4\xc6\xa3\x9d\xb8\x86\xff\xf7\x41\xbf\x65\x27\x4b\x8a\x21\xf0\x0b\x79\x3f\xf8\xf1\xfb\xee\x78\xf2\xa6\x8a\xb5\x05\xab\x5d\x99\x09\x74\xc9\x96\xc5\xe5\x05\xc0\xa6\x42\x9d\xb7\x0b\x80\x8d\x25\xf7\x05\x02\xda\x4c\x90\xf1\x4e\x40\xdc\x37\x98\x09\xaa\x75\x89\x8a\x77\xe5\x0f\xf7\xb5\x15\x50\x05\x2c\x32\x51\xc5\xd8\x70\xaa\x54\x19\x74\x53\xfd\x63\x13\x74\x25\x39\x4c\x4c\xee\x64\xa5\x79\x1b\xb4\x24\xaf\xa8\x2e\x55\xbf\xbb\x6e\x0f\xbc\x2e\x03\xa2\x93\xbc\x2b\x05\xa8\x01\x92\x4d\xa0\x26\xf6\x1b\x80\x3b\x72\xb9\xbf\x93\xd7\xd7\xe8\x76\x90\xc1\x61\x30\x03\xe8\x86\x7e\xf3\x1c\x53\x38\x1c\xe4\xb0\x3e\x1e\x7f\x5c\xba\x3f\xfa\x10\x53\x10\xbd\xbf\xdd\x1c\x8f\x62\x0e\x30\x96\xfe\xc6\xc0\xe4\x5d\x77\xc4\xbc\x5d\x9e\x92\xeb\xa8\xdf\x37\x74\x15\x6c\x17\x34\x6f\x1f\x09\x5a\x9e\x76\x6a\x5a\x06\x1f\x0e\x09\x50\x01\xad\x24\xef\x8d\x41\xe6\x3f\x70\x0f\xc7\xe3\x7c\xef\xd1\xd8\x13\xcb\x6b\x72\x9f\xd0\x04\x8c\xa7\x87\x00\x5a\xc6\x93\xbc\x39\xf2\xb9\x4c\x97\x43\xb2\xc8\xdc\x06\xfb\x31\x60\x41\xf7\x29\x08\xb5\x14\xc8\x3b\xf6\x16\xff\xf2\x39\xa6\x20\x8c\xa5\x53\xf1\xae\xae\x7e\xff\x30\x2a\xd7\xae\x97\x28\xe8\xf4\x8d\xc5\xcf\x68\xb1\xc6\x18\x7a\x2a\x67\xb6\xe9\x02\xc7\x75\x5f\x76\x35\xd7\x7d\xa3\xc6\x0e\xdc\xdc\xf8\x7c\x3f\xf6\x45\xdc\x5b\xec\xd7\xb2\xd6\xe4\x7e\xf1\x2e\xa2\x8b\x53\x4b\xe4\xc4\x8d\xd5\xfb\x14\x5e\x39\xef\xf0\xd5\x7a\x30\xfb\x46\x1b\x8a\xfb\x14\x56\xa3\x25\x06\xed\x98\x62\x57\xab\xc1\x0b\xf2\xcd\x8a\xc1\x92\x43\x1d\xfa\xb0\xe3\x03\x20\xc9\x95\xbf\x7b\x04\xed\xc6\x7a\xf3\xe5\x21\xdc\xeb\xff\x01\xb7\x51\x03\xc9\x7e\x97\xd3\x0e\x28\xcf\x84\xf5\x3a\x27\x57\x8a\xf1\x4d\x74\x0e\x63\x35\x73\x26\x1a\x5d\x62\x32\x06\x40\x97\x9e\x89\x21\xae\x26\x97\x54\x48\x65\x15\x53\x78\xbd\x5a\xed\xaa\xf5\xf4\xa8\xf2\x58\x75\xb6\xef\xd7\xe7\x7c\x0a\x8b\xf7\xa3\x51\x5b\x2a\x5d\x42\x11\x6b\x4e\xc1\xa0\x8b\x18\x46\x57\xe1\x5d\x4c\x0a\x5d\x93\xdd\xa7\xc0\xda\x71\xc2\x18\xa8\x18\xdd\xb7\x5b\x8e\x54\xec\x13\xd3\x6b\x77\x9e\x3d\x51\x69\xeb\xda\x68\x37\xb2\x39\x67\x30\xe0\x30\x7d\xc5\x14\xde\x60\xbd\x9e\xec\xb5\x0e\x25\xb9\x24\xfa\x26\x85\xe4\xa7\xa5\xc7\x78\xeb\x43\x0a\xdf\xbd\x7b\xdb\xfe\x66\xfb\x02\xf3\xcf\x5e\x2f\x29\xe5\xa8\xa8\x6a\x6f\x31\xe9\xab\x72\xda\x0d\x5d\xb7\x58\x8e\xe5\x18\x38\x89\xf1\xd2\x8b\x1e\x11\x97\xcb\x84\x79\x78\x76\xac\xb8\x42\x8c\xe7\xd3\xd2\xe4\xee\x96\xa5\xb1\x7e\x9b\x17\x56\x07\x94\xc6\xd7\x4a\xdf\xea\x7b\x65\xe9\x86\x55\x47\x5f\xdf\x21\xfb\x1a\xd5\x5b\xf9\xb3\x5c\x29\xc3\xa7\x66\x59\x93\x93\x86\x59\xa8\xa1\x6f\x0e\x87\x6e\xc2\x18\x4b\x9f\xa2\x8e\x64\x3e\x50\x68\x27\xc5\xf3\x77\x52\xdc\xc5\xab\x96\x50\x77\x22\x98\x4a\x07\xc6\x98\x89\xab\xcf\xbf\x26\xef\xc4\xe9\x88\x06\x0e\x66\x4e\xda\xa1\xcb\x7d\x90\xb7\x0f\xb3\x2e\x97\x6f\xfb\x3f\xb2\x3b\xc8\xa7\x73\x2f\xce\x26\xdf\xb7\x6b\xfc\xe4\x17\x69\x18\x73\x4a\x33\x63\x64\xd5\x8e\xce\x6e\x35\xcd\xee\x49\x0e\x59\x7e\xfd\x26\x45\x5e\x08\x76\x12\xf4\x31\xdc\xa7\x34\x7d\x49\xda\xcf\xa2\x5f\xcc\x1f\x95\xbe\x26\x1b\xd5\xcf\xec\x8d\x6a\xff\x5c\x5c\x5e\xfc\x1b\x00\x00\xff\xff\xef\xcb\xc9\x79\x64\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: 2148, mode: os.FileMode(420), modTime: time.Unix(1557983725, 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(1556605415, 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\xdf\x6f\xdb\x36\x10\x7e\xcf\x5f\x71\xe0\x30\xf4\x61\x13\xe9\x76\x05\x56\xc8\x56\x80\x62\xc5\xb0\x61\x1b\x50\xa0\xcd\x5e\x03\x86\x3a\x49\x97\x52\xa4\xc6\xa3\x9d\xb8\x86\xff\xf7\x41\xbf\x65\x27\x4b\x8a\x21\xf0\x0b\x79\x3f\xf8\xf1\xfb\xee\x78\xf2\xa6\x8a\xb5\x05\xab\x5d\x99\x09\x74\xc9\x96\xc5\xe5\x05\xc0\xa6\x42\x9d\xb7\x0b\x80\x8d\x25\xf7\x05\x02\xda\x4c\x90\xf1\x4e\x40\xdc\x37\x98\x09\xaa\x75\x89\x8a\x77\xe5\x0f\xf7\xb5\x15\x50\x05\x2c\x32\x51\xc5\xd8\x70\xaa\x54\x19\x74\x53\xfd\x63\x13\x74\x25\x39\x4c\x4c\xee\x64\xa5\x79\x1b\xb4\x24\xaf\xa8\x2e\x55\xbf\xbb\x6e\x0f\xbc\x2e\x03\xa2\x93\xbc\x2b\x05\xa8\x01\x92\x4d\xa0\x26\xf6\x1b\x80\x3b\x72\xb9\xbf\x93\xd7\xd7\xe8\x76\x90\xc1\x61\x30\x03\xe8\x86\x7e\xf3\x1c\x53\x38\x1c\xe4\xb0\x3e\x1e\x7f\x5c\xba\x3f\xfa\x10\x53\x10\xbd\xbf\xdd\x1c\x8f\x62\x0e\x30\x96\xfe\xc6\xc0\xe4\x5d\x77\xc4\xbc\x5d\x9e\x92\xeb\xa8\xdf\x37\x74\x15\x6c\x17\x34\x6f\x1f\x09\x5a\x9e\x76\x6a\x5a\x06\x1f\x0e\x09\x50\x01\xad\x24\xef\x8d\x41\xe6\x3f\x70\x0f\xc7\xe3\x7c\xef\xd1\xd8\x13\xcb\x6b\x72\x9f\xd0\x04\x8c\xa7\x87\x00\x5a\xc6\x93\xbc\x39\xf2\xb9\x4c\x97\x43\xb2\xc8\xdc\x06\xfb\x31\x60\x41\xf7\x29\x08\xb5\x14\xc8\x3b\xf6\x16\xff\xf2\x39\xa6\x20\x8c\xa5\x53\xf1\xae\xae\x7e\xff\x30\x2a\xd7\xae\x97\x28\xe8\xf4\x8d\xc5\xcf\x68\xb1\xc6\x18\x7a\x2a\x67\xb6\xe9\x02\xc7\x75\x5f\x76\x35\xd7\x7d\xa3\xc6\x0e\xdc\xdc\xf8\x7c\x3f\xf6\x45\xdc\x5b\xec\xd7\xb2\xd6\xe4\x7e\xf1\x2e\xa2\x8b\x53\x4b\xe4\xc4\x8d\xd5\xfb\x14\x5e\x39\xef\xf0\xd5\x7a\x30\xfb\x46\x1b\x8a\xfb\x14\x56\xa3\x25\x06\xed\x98\x62\x57\xab\xc1\x0b\xf2\xcd\x8a\xc1\x92\x43\x1d\xfa\xb0\xe3\x03\x20\xc9\x95\xbf\x7b\x04\xed\xc6\x7a\xf3\xe5\x21\xdc\xeb\xff\x01\xb7\x51\x03\xc9\x7e\x97\xd3\x0e\x28\xcf\x84\xf5\x3a\x27\x57\x8a\xf1\x4d\x74\x0e\x63\x35\x73\x26\x1a\x5d\x62\x32\x06\x40\x97\x9e\x89\x21\xae\x26\x97\x54\x48\x65\x15\x53\x78\xbd\x5a\xed\xaa\xf5\xf4\xa8\xf2\x58\x75\xb6\xef\xd7\xe7\x7c\x0a\x8b\xf7\xa3\x51\x5b\x2a\x5d\x42\x11\x6b\x4e\xc1\xa0\x8b\x18\x46\x57\xe1\x5d\x4c\x0a\x5d\x93\xdd\xa7\xc0\xda\x71\xc2\x18\xa8\x18\xdd\xb7\x5b\x8e\x54\xec\x13\xd3\x6b\x77\x9e\x3d\x51\x69\xeb\xda\x68\x37\xb2\x39\x67\x30\xe0\x30\x7d\xc5\x14\xde\x60\xbd\x9e\xec\xb5\x0e\x25\xb9\x24\xfa\x26\x85\xe4\xa7\xa5\xc7\x78\xeb\x43\x0a\xdf\xbd\x7b\xdb\xfe\x66\xfb\x02\xf3\xcf\x5e\x2f\x29\xe5\xa8\xa8\x6a\x6f\x31\xe9\xab\x72\xda\x0d\x5d\xb7\x58\x8e\xe5\x18\x38\x89\xf1\xd2\x8b\x1e\x11\x97\xcb\x84\x79\x78\x76\xac\xb8\x42\x8c\xe7\xd3\xd2\xe4\xee\x96\xa5\xb1\x7e\x9b\x17\x56\x07\x94\xc6\xd7\x4a\xdf\xea\x7b\x65\xe9\x86\x55\x47\x5f\xdf\x21\xfb\x1a\xd5\x5b\xf9\xb3\x5c\x29\xc3\xa7\x66\x59\x93\x93\x86\x59\xa8\xa1\x6f\x0e\x87\x6e\xc2\x18\x4b\x9f\xa2\x8e\x64\x3e\x50\x68\x27\xc5\xf3\x77\x52\xdc\xc5\xab\x96\x50\x77\x22\x98\x4a\x07\xc6\x98\x89\xab\xcf\xbf\x26\xef\xc4\xe9\x88\x06\x0e\x66\x4e\xda\xa1\xcb\x7d\x90\xb7\x0f\xb3\x2e\x97\x6f\xfb\x3f\xb2\x3b\xc8\xa7\x73\x2f\xce\x26\xdf\xb7\x6b\xfc\xe4\x17\x69\x18\x73\x4a\x33\x63\x64\xd5\x8e\xce\x6e\x35\xcd\xee\x49\x0e\x59\x7e\xfd\x26\x45\x5e\x08\x76\x12\xf4\x31\xdc\xa7\x34\x7d\x49\xda\xcf\xa2\x5f\xcc\x1f\x95\xbe\x26\x1b\xd5\xcf\xec\x8d\x6a\xff\x5c\x5c\x5e\xfc\x1b\x00\x00\xff\xff\xef\xcb\xc9\x79\x64\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: 2148, mode: os.FileMode(420), modTime: time.Unix(1557983499, 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, "/")...)...)
|
|
}
|
|
|