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