graphql-engine/cli/assets/assets.go
Shahidh K Muhammed 776c550654
[cli] add docs and build tools (#3)
Includes version command and makefile integration along with docs command
2018-06-28 11:10:18 +05:30

238 lines
8.1 KiB
Go

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