Files
ent/entc/load/bindata.go
Ariel Mashraki 2128fc2ca1 ent/index: add indexes api
Reviewed By: alexsn

Differential Revision: D16757699

fbshipit-source-id: 6a0027b1f855721f1415b8c72b5b1be8bc2ce902
2019-08-12 06:44:40 -07:00

259 lines
12 KiB
Go

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