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