mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
* entc/hooks: initial work for mutations and hooks * ent/schema: adding policy to schema * ent: change op string to uint * entc: move entschema to runtime and enable smooth transition * entc/privacy: adding privacy template * all: goimports * intg/hooks: mutation client/tx and basic schema tests * ent/privacy: adding more verbose decisions * entc/gen: edge-ids getter and additional tests * all: regen assets * entc/gen: fix client hookd propagation * intg: add deletion example * intg/privacy: remove old entschema package * typed privacy * ent/privacy: hooks shouldn't be called on privacy deny * entc/gen: fix schema hooks invocation order * remove read policy from public api * update circleci go orb Co-authored-by: Ariel Mashraki <ariel@mashraki.co.il>
270 lines
18 KiB
Go
270 lines
18 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\x5f\x6b\xdb\x3e\x14\x7d\xb6\x3e\xc5\xf9\x99\xfe\xa8\xdd\xa5\x4a\xdb\xb7\x0d\xf2\x50\xda\x0c\x32\xb6\x76\x90\xc2\x1e\xba\x52\x14\xfb\x3a\x11\x75\x24\xef\x4a\x29\x0b\x42\xdf\x7d\x48\x4e\xc2\xf6\x64\x4b\xe7\xdc\xf3\x47\x37\x84\xe9\x85\xb8\xb3\xc3\x9e\xf5\x7a\xe3\x71\x73\x75\xfd\xf1\x72\x60\x72\x64\x3c\x3e\xab\x86\x56\xd6\xbe\x61\x61\x1a\x89\xdb\xbe\x47\x26\x39\x24\x9c\xdf\xa9\x95\xe2\x69\xa3\x1d\x9c\xdd\x71\x43\x68\x6c\x4b\xd0\x0e\xbd\x6e\xc8\x38\x6a\xb1\x33\x2d\x31\xfc\x86\x70\x3b\xa8\x66\x43\xb8\x91\x57\x47\x14\x9d\xdd\x99\x56\x68\x93\xf1\xaf\x8b\xbb\xf9\xc3\x72\x8e\x4e\xf7\x84\xc3\x1d\x5b\xeb\xd1\x6a\xa6\xc6\x5b\xde\xc3\x76\xf0\x7f\x99\x79\x26\x92\xe2\x62\x1a\xa3\x10\x21\xa0\xa5\x4e\x1b\x42\xb9\x55\xda\x94\x88\x51\x4c\xa7\xb8\x4b\x79\xd6\x64\x88\x95\xa7\x16\xab\x3d\xce\xc9\xf8\xe6\x74\x75\x2e\x71\xff\x88\x87\xc7\x27\xcc\xef\x17\x4f\x52\x0c\xaa\x79\x53\x6b\x42\xd2\x10\x42\x6f\x07\xcb\x1e\x95\x28\x4a\xeb\x4a\x51\x94\xab\xbd\xa7\xf4\x13\x02\x3c\x6d\x87\x5e\x79\x42\x39\xb2\x5c\xb6\xcc\xd0\xc0\xda\xf8\x0e\xe5\xff\xbf\x4a\xc8\xef\x07\xc5\x18\x45\x9d\x63\x9e\xad\x94\x23\x7c\x9a\x21\x7f\x8f\x78\x9a\x7d\x57\x0c\xd7\x6c\x68\xab\x1c\x66\x78\x7e\x21\xe3\xe5\xc2\x78\xe2\x4e\x35\x14\xb2\x34\x2b\xb3\x26\x9c\xbd\x4e\x70\x66\xd4\x36\xcb\xc8\x07\xb5\x25\x97\xf4\x8b\x22\x84\xcb\x83\x7e\x8c\x32\x1d\x4e\x51\x5c\x88\xe5\x61\x26\xc6\x49\xd6\x22\xd3\xe2\x32\x46\x11\x85\xe8\x76\xa6\xc9\x9d\xab\x1a\x41\x14\x29\x48\xaf\x0d\x39\x3c\xbf\x3c\xbf\xa4\xd2\xa2\xe8\x2c\xe3\x75\x72\xc8\x97\x7c\xc7\x28\xc7\xbc\x41\x14\xc5\x6a\x02\x62\x4e\xd8\x37\xc5\x6e\xa3\xfa\x65\x06\xab\x91\x53\x8b\xa2\xd0\x5d\x66\xfc\x37\x83\xd1\x7d\x9e\x29\x3a\xa5\xfb\x8a\x98\x13\x9c\x2a\x8c\xbe\x33\xa8\x61\x20\xd3\x56\xf9\x38\xc1\xaa\x16\x09\xb5\x4e\x2e\x7d\x6b\x77\x5e\xfe\x60\xed\xa9\xca\xfb\x90\x5f\xac\x36\x47\xe2\x18\xb7\x2a\x7f\x9a\xb2\xae\xeb\x53\xb7\xa3\x4b\xb2\xb7\x9c\x4b\x8e\x5a\xc4\x3c\x6a\x2d\x3d\x6b\xb3\x4e\x1c\x39\x4f\x9c\xaa\xfe\x90\x45\x32\x71\xfe\x5b\xfb\xea\x3a\xcb\xfd\xb3\xfa\xb1\xd9\xb8\xf9\xc3\x8b\xc6\x28\xfe\x04\x00\x00\xff\xff\x95\x06\x0f\xa4\x50\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: 848, 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\x59\x5f\x6f\xdb\x46\x12\x7f\x16\x3f\xc5\xd8\x40\x0c\x32\x50\xa9\xb4\x28\x8a\x3b\xe5\x74\x40\xd1\x3a\x38\x5d\xaf\x4e\xd0\xc4\x7d\x09\x82\x94\x22\x97\xd2\xc6\xe4\x92\xe1\x2e\x6d\xab\xae\xbf\xfb\x61\x66\x76\xc9\xa5\x28\x29\x6e\x12\xe7\x25\xe2\xec\xfc\xfd\xed\xec\xcc\xec\x7a\x36\x83\x9f\xaa\x7a\xdb\xc8\xf5\xc6\xc0\x77\xcf\xbe\xfd\xe7\x37\x75\x23\xb4\x50\x06\x5e\x24\xa9\x58\x55\xd5\x15\x2c\x55\x1a\xc3\x8f\x45\x01\xc4\xa4\x01\xd7\x9b\x6b\x91\xc5\xc1\x6c\x06\x6f\x36\x52\x83\xae\xda\x26\x15\x90\x56\x99\x00\xa9\xa1\x90\xa9\x50\x5a\x64\xd0\xaa\x4c\x34\x60\x36\x02\x7e\xac\x93\x74\x23\xe0\xbb\xf8\x99\x5b\x85\xbc\x6a\x55\x86\x2a\xa4\x22\x96\xff\x2d\x7f\x3a\xbf\x78\x7d\x0e\xb9\x2c\x84\xa3\x35\x55\x65\x20\x93\x8d\x48\x4d\xd5\x6c\xa1\xca\xc1\x78\xf6\x4c\x23\x44\x1c\x04\x75\x92\x5e\x25\x6b\x01\x45\x95\x64\x41\x20\xcb\xba\x6a\x0c\x84\xc1\xe4\x54\xa8\xb4\xca\xa4\x5a\xcf\x3e\xe8\x4a\x9d\x06\x93\xd3\xbc\x34\xf8\x5f\x23\xf2\x42\xa4\xe6\x34\x08\x26\xa7\x6b\x69\x36\xed\x2a\x4e\xab\x72\x96\xdb\x80\xa5\x4a\xdb\x55\x62\xaa\x66\x26\x14\xf1\x7f\x8a\x67\xa6\xd3\x8d\x28\x93\x99\xc8\xd6\xe2\xef\xf0\xe7\x52\x14\xd9\x69\x10\x05\x88\xc2\x6b\xa2\x41\x23\x2c\xfe\x1a\x12\x05\x42\x99\xd8\x2e\x98\x4d\x62\xe0\x26\xd1\x14\xa6\xc8\x20\x6f\xaa\x12\x12\x48\xab\xb2\x2e\x24\x62\xad\x45\x03\x16\x8a\x38\x30\xdb\x5a\x38\x95\xda\x34\x6d\x6a\xe0\x2e\x98\x5c\x24\xa5\x00\x00\xa4\x48\xb5\xc6\x5f\xf0\x07\x62\x33\x3f\x55\x49\x29\xa6\x55\x29\x8d\x28\x6b\xb3\x3d\xfd\x23\x98\xfc\x54\xa9\x5c\xae\x81\x5c\xb0\xbf\x2d\x6f\x4a\x5f\x43\xee\xf3\x6c\x2d\x34\x00\xbc\x7d\xf7\x14\x7f\x7a\x9a\x11\x14\x3d\x64\x7e\x81\x71\x6b\x62\xa6\x9f\x3d\x33\x21\xb2\xc3\xbd\x54\x99\xb8\x15\x1a\xb9\xe9\x67\xcf\x2d\x79\x65\xc8\xfe\x9f\xaa\xba\x42\x4f\xa4\x32\x60\xff\x59\xf6\x0d\xae\x0c\x99\x5f\x55\x85\x4c\xb7\x00\xab\xaa\x2a\x86\xcc\x35\xad\x0c\xb8\xef\x69\x9f\x5e\x55\x5a\x1a\x59\x29\xc8\x84\x4e\x1b\xb9\x12\x1a\x12\x20\xbf\xa1\x76\x4b\x36\x7b\x79\x9b\xed\x66\x74\x72\xfd\x76\xb8\x70\x9c\xb7\xb3\x19\x30\x1e\x14\x98\xd3\xc2\xba\x0b\xa9\x4d\x1c\x4c\x7e\x95\xb7\x22\x5b\x2a\x14\x21\x9f\x67\x33\x58\xaa\x4c\xa6\x89\x11\x1a\x64\xee\x09\x60\xaa\x94\xc8\xfd\x8d\x54\x2c\x28\xd5\xd2\xea\x65\x5b\x44\x1a\xda\x2a\x89\xc4\xb6\x38\x5c\x76\x68\x9c\x95\x4c\xff\x8c\xa4\x64\xc1\x71\x4e\xf2\x3f\x2f\x33\x8f\xa7\xe7\x52\xe5\x55\xcf\xf6\x94\x62\x8e\xdf\x6c\x6b\x41\x0b\x56\x0c\x0d\x0e\xc5\xde\x24\x9e\xf2\x43\xd6\x4c\xb2\x93\xdd\xaf\xe5\x9f\x9e\x8f\x4f\xa5\x32\x3f\x7c\x3f\x92\xd2\xf2\xcf\x1d\x63\xe7\xaa\x2d\x75\xc7\xf6\xf6\xdd\xd0\x9c\x3b\x1f\xc8\x34\x94\xbb\x54\xf2\x63\xdb\x19\xf4\x72\xd3\x97\x6b\x89\x69\x28\x78\x21\x8b\x22\x59\x15\xe2\xa8\xa0\xb2\x4c\x43\xd1\x97\x35\x26\x67\x52\x1c\x15\xad\x2c\xd3\x50\xf4\x67\x91\x27\x6d\x61\x8e\xbb\x9b\x31\xd3\x5e\xc9\xdf\x93\x02\xc3\x95\xca\x88\x06\x0b\xe6\xdd\xfd\x1e\xc9\xf7\xd7\xc8\xb5\x03\x54\x9d\x25\x46\x38\xfb\x87\x80\x22\xa6\xf7\x7b\x1d\x58\x96\x65\x6b\x3a\xc4\x0e\x28\x90\x8e\x69\x28\xfb\x7b\x52\xc8\x0c\x4b\x3a\x6d\xb1\x57\x6e\x7c\xd9\xeb\x8e\x69\x27\xa3\x4c\xd5\x24\x6b\xf1\x8b\xd8\x1e\xc9\x43\xcd\x4c\xef\xaf\xc4\x76\xb7\x6c\xd9\x5a\xc2\xf9\x38\xfc\xec\x2b\x18\x53\x77\x0c\x0b\x85\xe4\xeb\xa3\x11\x6b\xc7\xb4\xa7\xfe\x51\x79\x1f\xd7\x03\x22\x7f\x46\x39\x20\xb9\x3d\xd5\xc0\x42\x72\xf0\xfc\xe3\x51\xdf\xc3\x78\xe4\xc4\xef\x30\xee\x9e\xf1\xdf\x44\xce\xc6\x87\x7c\x8d\xc8\xdf\x8f\xad\xff\x26\x72\x8b\x3d\x77\xbb\x9e\xf9\xc0\x49\xb6\x40\x1f\x39\xbb\x4b\x75\x2d\x1a\x2d\x76\x59\x25\x93\x77\xcd\x7f\x6c\x65\x23\xb2\x1d\xde\xc6\x92\xf7\xec\x1a\x57\xfe\xf1\xb6\x31\xfd\x33\xf6\x8d\x05\xfb\x8d\xf3\x6a\x56\x97\x54\x47\xa2\x75\xf3\x82\x5f\x17\x3f\x3d\x30\xec\xe1\xde\x37\x31\x78\x87\xab\x3b\x59\x9f\x38\x52\x8c\xd2\x85\xb8\xa1\xfd\x4c\x1b\x41\x0d\x35\x51\x0e\x11\x74\x8a\x61\xa1\x5f\xdc\xfb\x6b\x53\x35\x71\x90\xb7\x2a\x75\x92\xa1\xc8\xe0\x29\x72\xc4\x3f\x77\x1c\x91\x4d\x92\xbb\x60\xa2\x04\xcc\x17\x70\x86\x9f\x77\xc1\x04\x53\x73\xce\x18\x88\x2c\x7e\x93\xac\xa7\x48\xdb\xd6\x62\xde\xd1\x30\x9b\x83\x09\x9d\x8a\x8e\x88\x1f\x48\x64\xc4\xe7\x4c\xe4\x0f\x24\xdb\x3c\x9a\x13\xd9\x7e\x20\xdd\xe5\xcc\x1c\xe9\xee\x83\x17\x72\xab\x9f\x16\x72\xab\xff\x3e\x98\xc8\x1c\x1a\x91\xa3\xcb\xbc\xf2\x9c\x3e\x4f\x16\xa0\x64\x81\xe1\x4c\x94\x40\x32\x2c\xba\xf0\x1b\x91\x47\x24\xda\x08\xd3\x36\x0a\x94\xe8\x91\xe5\xc6\x3f\x86\x96\xc7\x95\xe3\xd8\x92\x6c\x98\x67\xae\xd1\xfb\xe8\x86\x3c\x44\x4e\x41\x34\x0d\x7e\xdf\x05\x13\x4d\x4e\x9f\x11\xfd\x6e\x80\x1f\xfd\xcb\x7b\x10\x71\x5a\x18\xae\x20\x65\x3a\xd8\x1c\xb7\x62\x77\x88\xba\xfa\xdc\x5f\x20\xca\x70\x4b\xdc\x52\xbf\x2f\xae\x37\xcf\x7b\x1f\x5c\x23\x0e\x26\x5d\xfb\xed\x57\x1d\x05\x57\x6d\x87\x9b\xf7\x7a\x5d\xcf\xe3\xcd\x20\xdb\x7e\x2f\x9c\x93\xed\x41\x77\xec\x39\xbb\xa6\x37\xef\x62\xee\x3a\x5c\x30\xf1\x4e\xcf\xdc\x2e\xf7\x14\x5c\xef\xfb\x1e\xad\x17\x42\x85\x79\x16\xf7\xd4\x88\x94\xb8\x0e\xd2\xd9\xe8\x28\x5d\x6e\xe9\x9c\xc0\x86\x45\x9f\x50\x2e\x6d\x64\x31\x85\xbc\x34\xf1\x39\x6e\x69\x1e\x9e\x96\x52\x6b\x3c\xc7\x54\x7a\x24\x0a\xe5\x55\x63\x33\xe7\xc9\xc7\xd3\x29\xea\xc2\x2d\x8d\x3a\xdd\x38\xb1\xcd\x17\x40\xa3\x1a\xfa\x87\x23\x5c\xf4\x9c\xe9\x27\x0b\x78\x46\xe6\x74\x4e\x74\x58\xc0\x19\x2e\x90\x30\x16\x4b\x9e\xa3\xed\xc4\x00\x34\x78\x40\x9a\x28\x58\x09\xa0\x3b\xa5\xc8\xc0\x54\xc4\xb3\x16\x4a\x34\x09\xe5\x2a\x4a\xbe\xa8\x1a\x10\xb7\x49\x59\x17\x62\x0a\xaa\x32\x78\x35\x68\x55\x4a\xcd\xb9\x90\x57\x02\x8c\x2c\x45\x7c\x51\xdd\xc4\xe4\xe5\x7b\x4a\x5a\xf4\x13\xab\x53\xfc\x6b\xd2\xe8\x4d\x52\x84\xfd\xfe\x46\xcf\x89\xc1\x43\x48\xe7\xf1\x60\x6a\x5a\x78\xd9\xe0\x82\xb7\x59\x4c\xe5\x03\x65\xfb\xe1\xf8\xf2\x72\xf9\x33\x9c\x9d\x8d\x33\x88\x74\x9b\x6d\x8d\xbe\xd8\xeb\x31\x09\xbc\xcc\x7d\x6f\x82\x09\xaa\x37\xdb\x3a\xfe\x45\xaa\x2c\x8c\x50\xd8\x71\xbf\xc0\xa3\xfa\xd7\x5f\xb4\x7a\xd1\x96\x4b\xc5\xcb\xcf\x3c\xda\xcb\xd6\x30\xf1\x5b\x47\x44\xca\xb3\x28\x7e\x4d\x55\x9a\xd7\x9c\xf3\x1d\x0d\x3d\x3b\x98\x18\xe2\xb6\x16\xa9\xe1\xbc\x08\x11\xea\x30\x82\x27\x3a\xa2\xf4\x68\x5b\x99\x0d\x37\xf1\x74\x3a\x52\x8f\x31\xdd\xfb\x25\x4b\xe7\x53\x34\x63\xeb\x96\xdd\x12\x7b\x93\xe6\xcd\xa7\x8d\xf7\x6e\xe6\xdd\xdc\x8a\xbf\x2a\x48\xe0\xbf\xaf\x5f\x5e\xa0\x30\xb5\x55\x9b\x37\x99\xe0\xbc\x21\x16\x54\x60\x85\xab\xd5\x07\x0c\x80\xff\xb3\x05\x6f\x60\x34\xd4\xce\x36\x76\x6b\x6b\x29\x82\x70\x05\x6f\xdf\xad\xb6\x46\x70\x0a\x79\xb5\x8f\x4a\x1f\xcb\x22\x74\x7c\x77\x9f\xbb\xcb\x28\x7f\x86\x91\xdf\x56\xa4\xe2\x27\x96\x70\x67\xe7\x59\x24\x8a\xe8\x68\x91\x08\xe7\x97\xcd\x59\x1d\x63\x05\xe7\xde\xec\x78\x39\x5f\x4f\x3e\x7d\xa2\x6d\x54\x4f\x3e\xce\xe1\xc9\x35\x1e\x60\x2e\xc9\x28\xce\x87\x98\xc7\x80\xce\x56\x92\x0b\x9a\x19\x9c\xa1\xce\x91\xaf\x61\x0b\xb3\x05\xcf\x22\x65\x7f\xa2\xd6\x82\x3a\x91\xe6\x03\x17\xf3\xac\xb2\x80\xa4\xae\x85\xca\x42\x4b\x98\xf6\x3d\xdf\x6b\x47\x61\x14\xd9\x1a\x64\xdf\x26\xfc\x00\xec\x4b\xc6\x63\x86\x20\xb3\xdb\x3e\x08\xeb\x03\x29\xb6\x0b\x32\xbb\x1d\x78\x4b\x01\xba\x17\x16\x2f\xc4\xa5\x73\xff\x8c\x7e\xd1\x19\xa4\xb0\x6d\x0f\x42\x3d\x0c\x03\xae\x70\x0e\xcc\xbb\x15\xfe\xa6\x25\xbf\x25\xe2\x52\xdf\x10\x07\x8d\x06\x97\x86\x6d\xe6\x3e\xda\x9b\x6e\xf4\xbc\xf3\xf5\xb3\x6d\xd7\x0c\x3f\x0c\x7d\x7d\x3b\x56\x70\x50\xee\x75\x64\x8b\xcd\xa5\x2a\x07\xe5\x86\x6b\x86\xe6\x46\x23\xaf\x85\x82\x55\x9b\xe7\xa2\x01\xaa\x32\x76\x7c\x72\x8f\x4c\x54\x39\x76\x34\x84\xab\x36\xb7\x65\x02\xe7\x24\x26\x4e\x0f\x15\x8b\x01\x0c\xe4\x61\xa7\x0e\x15\x4d\x41\x1f\x07\x42\x34\x8d\x9f\x8a\x79\x9f\x88\xda\x66\x04\x67\x62\x67\x23\x8f\x6d\x75\xd6\xe1\x58\xf3\x58\xf5\x4e\x9d\xf6\xcb\x74\x5f\x88\xe8\xa7\xb6\xa3\x81\xa9\x2c\x3c\x76\xbc\xf4\x4b\xa8\x45\x2c\xd4\x60\x71\x89\x60\x54\xce\x76\x8b\x2e\x01\x87\xde\xd1\x3b\xd9\xe0\x6c\xd3\x63\xda\x03\x4e\xb6\x0f\x92\x9c\x42\xe9\x1d\x57\x7e\x7c\x43\x5e\x7b\xa9\xf1\xf5\x5b\xbf\xca\xdb\xa8\x87\x70\x0f\x5a\x1d\x50\x64\xe0\xc3\x60\x17\xf2\x7e\x0f\x26\xd8\xe5\xac\xf6\x7e\xbc\x1e\xd6\x31\x64\xdb\x63\x68\x68\x89\x4c\xe1\x50\xd2\xbd\x41\x2c\xe0\xcc\xfd\x66\x7e\x2a\x20\xb6\x6c\x7c\xa0\x83\xef\x5e\x31\x89\x68\x1a\x5b\x0e\xbc\x27\xca\x39\xc8\x69\xaf\xdc\x25\x8f\x57\x9e\x6c\x81\x01\x9d\xf7\xfd\xfb\x30\x68\x7f\x7b\x57\xf6\x83\xf6\x30\xcc\x1e\xb2\x37\x87\xf0\x72\xc1\x13\xcf\xa7\xc2\xf6\x6e\x59\x7c\x0e\xf6\xe6\xb3\x5f\x2f\x0f\xa6\x33\xbf\x8c\xfb\xc8\x0d\xca\xec\x03\x80\xd3\x31\xbf\xbb\x2f\xe8\x3e\x40\xfa\xa2\x07\xf9\x37\x28\xb4\x07\x1d\xb4\xaf\xf1\xbe\x87\xc3\x0a\xfd\x20\x17\xed\x6b\xff\x02\x58\x9d\xe5\xdd\xef\x66\x0e\x7c\xad\x8c\xa0\xaf\x51\xbd\x3f\x32\x87\x93\x6e\x10\xc7\x61\xf6\x84\xef\x32\x38\xe5\x8a\x46\xa6\x76\x6c\xf5\x14\xa3\x07\x6a\x0a\xd5\x15\x17\x3e\x7f\x86\x8f\xc3\xbc\xa8\x12\xf3\xc3\xf7\x1c\xc5\x49\x75\xe5\x0b\xfb\xed\xa5\x55\x3c\xef\x8a\x9d\xb9\x96\xe7\xdf\xee\x4a\x34\xe7\x3b\x91\x7f\x25\xd2\x37\xd2\xa4\x1b\x30\x6c\xbd\xbb\x1d\x3c\x47\x4b\x69\xa2\x05\x18\xf8\xb7\x7f\x51\x58\x2a\xf3\x0f\xbc\x28\x18\xf8\xd7\x0e\xf9\x87\xef\xe7\x58\x5d\x76\x6f\x21\x7c\xd1\x52\xd1\x7e\x75\x97\x72\xbf\xbe\x4b\x79\x50\x61\xdb\x6b\x1c\x65\xfa\x6c\xe6\x1d\x6f\xb8\x69\x92\x5a\xfb\x7f\x70\xb1\xf4\x44\x65\x5c\x53\x1d\xa1\x14\x66\x53\x65\x70\x23\xcd\x06\x1a\x91\x56\xd7\xdc\x4a\x85\xd2\x6d\x23\x40\x55\x50\x27\x4a\xa6\x1a\xa4\x02\xdb\xf7\xa4\x5a\xdb\x3e\xe1\x95\x93\x3c\xf3\x9e\xaa\xc1\x12\x23\x78\xfb\xae\xff\xbb\xc8\x7d\x04\xa1\xad\x1c\x1e\x79\x77\x54\xcf\x04\x36\x73\x7b\x6b\xb1\xad\xf1\x9a\x6f\x60\xe4\x1c\x76\xc5\xeb\x41\x25\xa1\xcb\xe0\x20\x25\x9e\xbc\x71\xd1\xb1\xf3\x76\xf0\xc8\xb3\x29\x5c\x53\x09\xcf\x5d\x15\xa1\x2c\xa4\x5a\x19\xf6\x47\x33\xcf\x62\x17\xc0\x74\x07\x5d\x1e\x7b\x47\xe0\x32\xf9\x4b\xa1\xf4\x67\xf9\xd1\xd5\x86\x87\x6f\x06\x0e\x19\x1f\x03\xb7\x41\x34\x03\xe8\x18\x36\x61\x87\xfe\xbd\xa8\xf9\xc2\x63\xe0\xdc\x38\x3d\x82\xce\x2d\x7c\x29\x78\xc3\x7b\xc4\x08\x3e\xd9\xfd\xc1\xb4\x7b\xe1\x7d\x44\x04\x5d\x50\x7b\x30\x94\xdd\xbd\xe2\x18\x8a\x2e\x9a\x11\x8e\xfc\xf7\xc9\x11\x8a\x4c\xfe\x52\x0c\xfd\x79\x6d\x84\x20\x4f\x62\x8c\xdf\xaf\xfd\xa8\xf7\x28\xf8\x71\x38\x7b\xd0\x63\x27\x8e\x63\xc7\x51\x8c\x90\xe3\x5e\x3c\x42\x8e\xc9\x5f\x8a\xdc\xb1\x89\x82\x3b\xbf\x45\x0e\x19\x1f\x11\x38\x8e\x66\x0f\x70\x1b\x3b\x89\x1c\x03\x8e\x83\x18\x01\x67\x27\x84\x11\x72\x96\xfe\xa5\xd0\x1d\x1d\x76\x42\x3b\x95\x20\xf9\x95\x37\xef\x3c\x0a\x78\x36\xa0\x3d\xe8\xd5\x6e\x48\x3a\x06\x9f\x0d\xa4\xc7\x8f\x42\xec\xde\x91\xcc\xe0\x0d\x31\x1a\x7c\xa1\x63\x38\xa9\x18\xf7\x86\xb8\xe8\xdf\x10\x5f\x99\x86\x1f\x22\x61\x01\x26\x3e\x2f\x44\x19\x0e\xda\xbf\x09\xee\x83\xff\x07\x00\x00\xff\xff\x45\x50\x40\xa6\xb1\x24\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: 9393, 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, "/")...)...)
|
|
}
|