Files
ent/entc/load/bindata.go
Ariel Mashraki f2411742ae ent/field: force optional on nillable field
Reviewed By: alexsn

Differential Revision: D16757719

fbshipit-source-id: 813e10b8b4b1744e7ab68f4513722f66911cdef3
2019-08-11 08:44:39 -07:00

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