mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/49 Reviewed By: alexsn Differential Revision: D17735758 fbshipit-source-id: d4b80631e56870690cc54912528c9950f4e48ccc
270 lines
16 KiB
Go
270 lines
16 KiB
Go
// Package internal Code generated by go-bindata. (@generated) DO NOT EDIT.
|
|
// sources:
|
|
// template/main.tmpl
|
|
// schema.go
|
|
package internal
|
|
|
|
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
|
|
}
|
|
|
|
// Name return file name
|
|
func (fi bindataFileInfo) Name() string {
|
|
return fi.name
|
|
}
|
|
|
|
// Size return file size
|
|
func (fi bindataFileInfo) Size() int64 {
|
|
return fi.size
|
|
}
|
|
|
|
// Mode return file mode
|
|
func (fi bindataFileInfo) Mode() os.FileMode {
|
|
return fi.mode
|
|
}
|
|
|
|
// ModTime return file modify time
|
|
func (fi bindataFileInfo) ModTime() time.Time {
|
|
return fi.modTime
|
|
}
|
|
|
|
// IsDir return file whether a directory
|
|
func (fi bindataFileInfo) IsDir() bool {
|
|
return fi.mode&os.ModeDir != 0
|
|
}
|
|
|
|
// Sys return file is sys mode
|
|
func (fi bindataFileInfo) Sys() interface{} {
|
|
return nil
|
|
}
|
|
|
|
var _templateMainTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x51\x5d\x6b\xdb\x30\x14\x7d\xb6\x7e\xc5\x99\xe9\xa8\x5d\x52\xa5\xed\xdb\x06\x79\x28\x6d\x06\x19\x5b\x3b\x48\x61\x0f\x5d\x29\x8a\x7d\x9d\x88\x3a\x92\x77\xa5\x94\x05\xa1\xff\x3e\x24\x27\x61\x7b\xb2\xa5\x73\xee\xf9\xd0\x0d\x61\x7a\x21\xee\xec\xb0\x67\xbd\xde\x78\xdc\x5c\x5d\x7f\xba\x1c\x98\x1c\x19\x8f\x2f\xaa\xa1\x95\xb5\x6f\x58\x98\x46\xe2\xb6\xef\x91\x49\x0e\x09\xe7\x77\x6a\xa5\x78\xda\x68\x07\x67\x77\xdc\x10\x1a\xdb\x12\xb4\x43\xaf\x1b\x32\x8e\x5a\xec\x4c\x4b\x0c\xbf\x21\xdc\x0e\xaa\xd9\x10\x6e\xe4\xd5\x11\x45\x67\x77\xa6\x15\xda\x64\xfc\xdb\xe2\x6e\xfe\xb0\x9c\xa3\xd3\x3d\xe1\x70\xc7\xd6\x7a\xb4\x9a\xa9\xf1\x96\xf7\xb0\x1d\xfc\x3f\x66\x9e\x89\xa4\xb8\x98\xc6\x28\x44\x08\x68\xa9\xd3\x86\x50\x6e\x95\x36\x25\x62\x14\xd3\x29\xee\x52\x9e\x35\x19\x62\xe5\xa9\xc5\x6a\x8f\x73\x32\xbe\x39\x5d\x9d\x4b\xdc\x3f\xe2\xe1\xf1\x09\xf3\xfb\xc5\x93\x14\x83\x6a\xde\xd4\x9a\x90\x34\x84\xd0\xdb\xc1\xb2\x47\x25\x8a\xd2\xba\x52\x14\xe5\x6a\xef\x29\xfd\x84\x00\x4f\xdb\xa1\x57\x9e\x50\x8e\x2c\x97\x2d\x33\x34\xb0\x36\xbe\x43\xf9\xf1\x77\x09\xf9\xe3\xa0\x18\xa3\xa8\x73\xcc\xb3\x95\x72\x84\xcf\x33\xe4\xef\x11\x4f\xb3\xef\x8a\xe1\x9a\x0d\x6d\x95\xc3\x0c\xcf\x2f\x64\xbc\x5c\x18\x4f\xdc\xa9\x86\x42\x96\x66\x65\xd6\x84\xb3\xd7\x09\xce\x8c\xda\x66\x19\xf9\xa0\xb6\xe4\x92\x7e\x51\x84\x70\x79\xd0\x8f\x51\xa6\xc3\x29\x8a\x0b\xb1\x3c\xcc\xc4\x38\xc9\x5a\x64\x5a\x5c\xc6\x28\xa2\x10\xdd\xce\x34\xb9\x73\x55\x23\x88\x22\x05\xe9\xb5\x21\x87\xe7\x97\xe7\x97\x54\x5a\x14\x9d\x65\xbc\x4e\x0e\xf9\x92\xef\x18\xe5\x98\x37\x88\xa2\x58\x4d\x40\xcc\x09\xfb\xae\xd8\x6d\x54\xbf\xcc\x60\x35\x72\x6a\x51\x14\xba\xcb\x8c\x0f\x33\x18\xdd\xe7\x99\xa2\x53\xba\xaf\x88\x39\xc1\xa9\xc2\xe8\x3b\x83\x1a\x06\x32\x6d\x95\x8f\x13\xac\x6a\x91\x50\xeb\xe4\xd2\xb7\x76\xe7\xe5\x4f\xd6\x9e\xaa\xbc\x0f\xf9\xd5\x6a\x73\x24\x8e\x71\xab\xf2\x97\x29\xeb\xba\x3e\x75\x3b\xba\x24\x7b\xcb\xb9\xe4\xa8\x45\xcc\xa3\xd6\xd2\xb3\x36\xeb\xc4\x91\xf3\xc4\xa9\xea\x3a\x73\xe6\x7f\xb4\xaf\xae\xb3\xd2\x7f\x5b\x1f\x4b\x8d\x4b\x3f\x3c\x66\x8c\xe2\x6f\x00\x00\x00\xff\xff\xe4\x6e\x0c\x4d\x4b\x03\x00\x00")
|
|
|
|
func templateMainTmplBytes() ([]byte, error) {
|
|
return bindataRead(
|
|
_templateMainTmpl,
|
|
"template/main.tmpl",
|
|
)
|
|
}
|
|
|
|
func templateMainTmpl() (*asset, error) {
|
|
bytes, err := templateMainTmplBytes()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info := bindataFileInfo{name: "template/main.tmpl", size: 843, mode: os.FileMode(420), modTime: time.Unix(1567330508, 0)}
|
|
a := &asset{bytes: bytes, info: info}
|
|
return a, nil
|
|
}
|
|
|
|
var _schemaGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\xdd\x6f\xe3\x38\x0e\x7f\x8e\xff\x0a\x4e\x80\x19\xd8\x45\xd6\x99\x5b\x1c\x0e\x38\x0f\xf2\xb0\x98\xed\x02\xbd\xbd\xf9\xc0\x4e\xef\x5e\x8a\xa2\xeb\xd8\x54\xa2\xa9\x2d\x7b\x24\xa5\xd3\x6e\xd1\xff\x7d\x41\x4a\xf2\x47\x9c\x74\xe7\x63\xdb\x97\x5a\x14\x49\x91\x3f\x52\x24\x95\xe5\x12\x5e\x37\xed\x9d\x96\x9b\xad\x85\x1f\x5f\xfe\xe3\xdf\x3f\xb4\x1a\x0d\x2a\x0b\xbf\xe4\x05\xae\x9b\xe6\x1a\xce\x54\x91\xc2\x4f\x55\x05\xcc\x64\x80\xf6\xf5\x0d\x96\x69\xb4\x5c\xc2\xf9\x56\x1a\x30\xcd\x4e\x17\x08\x45\x53\x22\x48\x03\x95\x2c\x50\x19\x2c\x61\xa7\x4a\xd4\x60\xb7\x08\x3f\xb5\x79\xb1\x45\xf8\x31\x7d\x19\x76\x41\x34\x3b\x55\x92\x0a\xa9\x98\xe5\xbf\x67\xaf\x4f\xdf\x7e\x38\x05\x21\x2b\x0c\x34\xdd\x34\x16\x4a\xa9\xb1\xb0\x8d\xbe\x83\x46\x80\x1d\x9c\x67\x35\x62\x1a\x45\x6d\x5e\x5c\xe7\x1b\x84\xaa\xc9\xcb\x28\x92\x75\xdb\x68\x0b\x71\x34\x9b\xa3\x2a\x9a\x52\xaa\xcd\xf2\xa3\x69\xd4\x3c\x9a\xcd\x45\x6d\xe9\x9f\x46\x51\x61\x61\xe7\x51\x34\x9b\x6f\xa4\xdd\xee\xd6\x69\xd1\xd4\x4b\xe1\x1d\x96\xaa\xd8\xad\x73\xdb\xe8\x25\x2a\xbb\x34\xc5\x16\xeb\x7c\x89\xe5\x06\xbf\x48\x60\xfe\x15\x4a\x85\xc4\xaa\x9c\x47\x49\x44\x30\x7c\x60\x1a\x68\xf4\x01\x30\x90\x2b\x40\x65\x53\xbf\x61\xb7\xb9\x85\xcf\xb9\x61\x3f\xb1\x04\xa1\x9b\x1a\x72\x28\x9a\xba\xad\x24\x81\x6d\x50\x83\xc7\x22\x8d\xec\x5d\x8b\x41\xa5\xb1\x7a\x57\x58\xb8\x8f\x66\x6f\xf3\x1a\x21\xfc\x19\xab\xa5\xda\x74\xcb\xdf\x09\xa5\x6c\xae\xf2\x1a\x17\x4d\x2d\x2d\xd6\xad\xbd\x9b\xff\x1e\xcd\x5e\x37\x4a\xc8\xc0\x47\x06\x0d\x08\x5e\xa8\x60\xca\x58\xec\xb4\xdc\xa0\x09\xca\x2f\x2e\x4f\x68\xbd\x77\x16\x81\x6a\xc6\x52\xbf\x10\x24\xa6\x97\xe2\xf5\x58\x8a\x51\xdb\x13\x3b\x53\x25\xde\x86\xe3\x2e\x2e\x4f\x78\x3d\x16\x93\x8e\x65\x2c\xf7\x81\xa1\xf1\x87\x5e\x5c\x9e\x0c\xd6\x41\xce\xa1\x77\x75\xe0\xd4\x07\x8e\xdb\xfb\xc6\x48\x2b\x1b\x05\x25\x9a\x42\xcb\x35\x1a\xc8\x81\xb9\xa1\x0d\x5b\x3e\x9d\x5d\xd8\x7d\x70\x3a\xb9\x3e\x3c\x03\xab\xa5\xb2\x00\xcb\xa5\x57\xc4\xb6\x07\x2d\x8e\x54\x49\x63\xd3\x68\xf6\x46\xde\x62\x79\xa6\x48\x64\xdd\x34\x15\xf0\x7d\x2a\x65\x91\x5b\x34\x20\xc5\x40\x80\x52\xa7\x26\xee\x1f\xa4\x72\x82\x52\x9d\x79\xbd\xee\xac\x9a\x48\xe3\xb3\x1c\xc9\x9d\xe5\xdc\x75\xd8\x4c\xb3\xd4\xd1\xbf\x21\x49\x9d\xe0\x91\x1c\xdd\x4f\xd2\xe3\x59\x7a\xa6\x44\xd3\xb3\x9d\xb0\xcf\xe9\xf9\x5d\x8b\xbc\xe1\xc5\xe8\xc0\xb1\xd8\x79\x3e\x50\x7e\xec\x34\x9b\xef\xe5\xf6\x07\xf9\xc7\xc0\xc6\x13\xa9\xec\xbf\xfe\x39\x91\x32\xf2\x8f\xbd\xc3\x4e\xd5\xae\xee\xae\x04\x5c\x5c\x8e\x8f\x0b\x97\x82\x98\xc6\x72\xff\x53\xf2\xd3\xae\x3b\x90\xe3\x0c\x93\xe3\x76\xcc\x34\x16\x7c\x2b\xab\x2a\x5f\x57\xf8\xa8\xa0\xf2\x4c\x63\xd1\x77\x2d\x25\x67\x5e\x3d\x2a\xda\x78\xa6\xb1\xe8\xcf\x28\xf2\x5d\x65\x1f\x37\xb7\x74\x4c\x7b\x8e\xb6\x65\x6e\x31\xc8\x1f\x73\x94\x99\xae\x0e\x2a\x38\xab\xeb\x9d\xed\x3c\x3e\xa2\x40\x06\xa6\xb1\xec\xff\xf3\x4a\x96\x54\xa2\x39\x44\x7c\x29\xa6\xb2\x37\x1d\xd3\x7e\x21\x69\x74\xbe\xc1\x5f\xf1\xee\x91\x3c\x32\x8e\xe9\xea\x1a\xef\xc6\xd2\x5d\x2d\x70\xf9\x34\x5e\x06\xe9\x50\x4d\x0e\xd4\xa0\x61\xd9\xda\xbb\x9a\xb7\x16\x35\x85\xd1\x5f\x30\x57\x0b\x4a\x14\x52\x61\x79\xb0\x2e\x0d\x75\xf5\xb7\xb2\xbb\x27\xde\xb5\x63\x37\xa3\xbb\xbd\x63\xbe\xe9\x7d\xa5\xab\x79\x48\xe1\xe4\x86\xbe\x6e\xea\x9a\xe6\x91\x3d\xc6\xc2\x91\xf7\x70\xbc\xde\xbc\xcf\xed\x76\x9f\xb7\xbd\xde\x5c\xb5\xb9\xdd\xee\xdd\xc6\x7a\x8d\x25\x15\x29\x9f\x26\xe1\xfe\x79\xf2\x01\x98\xb9\x85\x4d\x4b\x1f\x93\xbf\xa1\xf2\xb1\xdc\x81\xc2\xf7\xb7\x41\xf7\xa5\x41\xfb\x0d\x85\x3b\x7c\xcc\xa7\x51\x5c\x4d\x4f\xff\x0d\x85\x4f\x53\xd7\xd1\x7b\xe6\x23\x45\x6b\x0c\xef\xa1\x32\x75\xa6\x6e\x50\x1b\xdc\x67\x95\x8e\xbc\x7f\xfc\xa7\x9d\xd4\x93\xa8\x69\x4f\x3e\x10\x35\xd7\xe4\xa6\x61\x73\xf4\x6f\x88\x9b\x13\xec\x03\xe7\x3d\xed\xaa\xcd\x23\x9e\xfa\xa1\xa8\x2b\xfd\x7f\x39\x08\xed\x73\x1e\x1d\x43\xde\xe2\x67\x8e\x47\xa1\x91\x7b\x7f\xae\x82\x47\xa4\xdc\xb9\xc5\x5f\x6e\x4c\x69\x6d\xa3\xd3\x48\xec\x54\x11\x24\x63\x2c\xe1\x84\x38\xd2\x9f\x3b\x8e\xc4\x07\xf9\x3e\x9a\x29\x84\x6c\x05\x2f\x68\x79\x1f\xcd\x28\xb5\x32\x97\x06\x58\xa6\xe7\xf9\x66\x41\xb4\xbb\x16\xb3\x8e\x46\xd9\x18\xcd\x38\xab\x3b\x22\x2d\x88\xe8\x10\xcb\x1c\xd1\x2d\x88\xec\xf3\x20\x63\xb2\x5f\x10\x3d\xc4\x3c\x23\x7a\x58\xb8\x0d\xe1\xf5\xf3\x86\xf0\xfa\x1f\xa2\x99\x14\xa0\x51\x90\xc9\x6e\xe7\x15\x2f\x9f\xad\x40\xc9\x8a\xdc\x99\x29\x24\x32\xac\x3a\xf7\x35\x8a\x84\x45\x35\xda\x9d\x56\xa0\xb0\x47\xd6\x55\xc3\x29\xb4\xae\x9a\x3e\x8e\x2d\xcb\xc6\xa2\x0c\x33\xc9\x10\xdd\xd8\xcd\xb7\x0b\x40\xad\x69\x7d\x1f\xcd\x0c\x1b\xfd\x82\xe9\xf7\x23\xfc\xf8\x4f\xf4\x20\xd2\x60\x33\xde\x21\xca\x62\x14\x9c\xb0\xe3\x23\xc4\x03\x48\x36\xdc\x60\xca\x38\x24\x61\xab\x8f\x4b\x18\x23\xb2\xde\x86\x30\x33\x44\xb3\x6e\x52\xe8\x77\x03\x85\xad\x0c\xcd\x36\xeb\xac\xec\xda\x6f\x34\x1b\xf4\xcd\xcc\x6f\xf7\x14\xda\xef\x9b\x32\xef\x57\xa8\x62\x51\xa6\x3d\x35\x21\x26\x3f\x30\x64\xbd\xed\x61\x84\x70\x01\x67\xff\x86\xa3\x45\xc6\xfe\x8d\x86\x8d\x8e\xd3\x25\x8f\x11\x8c\x26\xac\xfa\x8c\x09\x79\x21\xab\x05\x88\xda\xa6\xa7\x14\x33\x11\xcf\x6b\x69\x0c\xdd\x50\xae\x0d\x92\x84\x44\xa3\x7d\x6a\x3c\xff\x34\x5f\x90\x2e\x8a\x59\xd2\xe9\xa6\xe9\x31\x5b\x01\x8f\x8d\xe4\x0e\x8d\x93\xc9\x2b\x47\x7f\xb6\x82\x97\x7c\x9c\x11\x4c\x87\x15\xbc\xa0\x8d\x61\x6a\x1a\xb1\x20\x33\x7c\x7e\xbe\xc9\xb5\xd9\xe6\x95\x7f\xec\xf1\xa3\x17\xb9\xad\x0f\x1e\x8f\x52\x59\xd4\xf4\x16\xa5\xaf\x06\x72\xf8\xcf\x87\x77\x6f\x49\x98\xcb\x5f\x91\x2b\x58\x53\xf6\x92\x68\xe9\x58\x48\x81\x17\x6e\xd6\x1f\xb1\xb0\xfe\x9f\x4f\xec\xd1\xa1\xb1\x09\x67\x53\x55\xf5\x27\x25\x10\xaf\xe1\xe2\x72\x7d\x67\x91\xf3\x7b\x98\xe3\x9c\xe2\x4e\x96\x5c\x75\x0f\xca\x2c\xcc\x21\x6e\x19\x27\xc3\xf2\x41\x8f\x1a\x8d\x85\x8d\xfd\xe3\x9d\xeb\xcb\x3b\xe1\x4f\x4e\x12\x46\x98\x45\x1c\xc6\x74\x60\xb6\x02\x93\xd2\x4d\x75\xb5\x34\xf0\xbe\xe2\xcd\x67\x87\x03\x8b\x5a\xb3\x0a\x57\x91\x3b\x35\xb9\x40\x2e\xdd\x41\x47\x77\xc6\x11\x35\xc3\xfc\xf0\xe0\x3c\xff\x94\xc1\xf3\x1b\x4a\x07\x77\x83\x49\xdc\xa5\x04\xa5\xcb\xd5\x02\x38\x27\x74\xae\x36\xc8\xc5\xc4\xb8\x2c\x48\x5d\xcb\x58\x41\xde\xb6\xa8\xca\xd8\x13\x16\x7d\xd9\x1e\x54\x94\x38\x49\x7c\x96\xf9\xc7\xee\xd0\x01\xff\x46\x7e\x4a\x17\x64\x79\xdb\x3b\xe1\x6d\x60\xc5\x7e\x43\x96\xb7\x23\x6b\xd9\xc1\xf0\x76\x1f\xb8\x78\x16\xcc\x7f\xc1\x5f\xa4\xc1\xb5\xce\x0c\x58\x87\x83\x80\xa8\x2e\xb4\x19\x53\xdd\x37\x93\x43\x35\x23\x72\x5f\xc7\x1e\x46\x05\x9e\x1a\x6a\xea\xf3\x38\x36\x89\xbf\x4d\x7d\xbe\xf0\xa7\xf1\x17\xd9\x36\x3e\x3b\x7d\xb5\x1f\x66\xba\xbf\x12\xb1\x81\x13\x97\xd3\x09\x4c\xb2\x6e\xff\x6e\xf0\x65\x20\x68\xf8\x85\x3d\x8a\x13\xbf\xcc\xbf\x20\x4a\x5f\x1d\x20\xb9\x80\x7a\x10\x1f\xf7\xb6\x27\x85\x7e\xa8\x18\x1a\xe1\x8d\xaf\x6f\x29\x46\x53\x13\xbe\xde\x06\x32\x82\xad\xf8\xb8\x00\xd1\x1b\xe1\x8e\x76\x3a\xa9\xac\x79\x13\xfa\xbe\x39\xce\x6e\x62\x3b\x60\xcd\x37\x98\xc3\xf6\x50\x91\xed\x1e\x5b\x2b\x78\x11\xbe\x9d\x52\xce\x3d\xdf\x54\x3e\x72\x5a\x85\x9f\x5b\x98\x68\xb5\xcb\xaa\xd9\xe0\xb7\x94\x0c\xe4\xa2\x57\xee\x33\x72\x98\xd9\x3e\x47\xc1\x08\x8f\x09\xc5\xe6\x28\xfc\x4f\x93\x04\x87\xe1\xff\x32\xf4\xff\xb6\x54\x38\x86\x7c\x80\x91\x79\xfe\x0a\xc0\xc1\xb4\xd6\xb5\xc3\x1e\x3e\xf8\xac\xf3\xd6\x0c\x5f\xb8\x9e\x9e\xab\xd2\x65\x7f\x20\xd4\x68\xb7\x4d\x09\x9f\xa5\xdd\x82\xc6\xa2\xb9\x41\x4d\x37\x1e\x95\xd9\x69\x04\xd5\x40\x9b\x2b\x59\x18\x7a\x2f\xd7\xae\x60\x48\xb5\xf1\xd7\x7e\x10\x2e\x51\xf6\x8d\xf6\x1e\x3c\x31\x81\x8b\xcb\xfe\x07\xb2\x87\x04\x62\x11\x46\xfb\x8e\xbc\xdf\x20\x4b\x14\xa8\x81\xd4\xc7\x89\xab\x9f\x02\x6e\x38\x6a\xce\xb8\x38\x79\x05\x37\xa3\x20\x90\xfc\x6a\x14\x83\xe7\xe7\xc1\x3b\x67\xbc\x0f\x85\x28\x17\x70\xc3\x17\x40\x04\x6c\x09\x3b\x97\x8b\x54\x91\x43\x38\xcb\x34\x38\xb0\xd8\x43\xd7\x75\xa4\x09\xb8\x8e\xfc\xbd\x50\x0e\xdb\xec\x64\xa0\x70\x7d\xd1\x01\x47\x8c\x4f\x81\xdb\xc8\x9b\x11\x74\x0e\x36\xf4\xfd\xf8\x20\x6a\x43\xe1\x29\x70\xa1\xd3\x4d\xa0\x0b\x1b\xdf\x0b\xde\xb8\xc5\x4f\xe0\x0b\x1d\xd9\x01\xc8\xcc\x4f\x88\x60\x70\xea\x00\x86\xb2\x6b\xf9\x8f\xa1\x18\xbc\x99\xe0\xc8\xf5\x76\x8a\xa2\x23\x7f\x2f\x86\xc3\xf6\x3b\x41\xd0\xf5\x4c\x87\xdf\x9b\xbe\x73\x3f\x09\x7e\xce\x9d\x03\xe8\x39\x23\x1e\xc7\xce\x79\xd1\x23\xc7\xee\x75\x43\xb4\x85\xe1\x18\x9d\x8c\x56\x64\x15\x35\x0a\x9b\xfe\x2a\x55\x19\x27\xf4\x04\x0a\xfb\xef\x2d\xcf\x2c\x33\x0b\x2b\xb0\xe9\x69\x85\x75\x3c\xaa\xc2\x36\x7a\x88\xfe\x0c\x00\x00\xff\xff\xd7\x50\x09\x8a\x52\x1c\x00\x00")
|
|
|
|
func schemaGoBytes() ([]byte, error) {
|
|
return bindataRead(
|
|
_schemaGo,
|
|
"schema.go",
|
|
)
|
|
}
|
|
|
|
func schemaGo() (*asset, error) {
|
|
bytes, err := schemaGoBytes()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info := bindataFileInfo{name: "schema.go", size: 7250, mode: os.FileMode(420), modTime: time.Unix(1570093680, 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){
|
|
"template/main.tmpl": templateMainTmpl,
|
|
"schema.go": schemaGo,
|
|
}
|
|
|
|
// 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{
|
|
"schema.go": &bintree{schemaGo, map[string]*bintree{}},
|
|
"template": &bintree{nil, map[string]*bintree{
|
|
"main.tmpl": &bintree{templateMainTmpl, 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, "/")...)...)
|
|
}
|