status-go/appdatabase/migrations/bindata.go

368 lines
15 KiB
Go

// Code generated by go-bindata. DO NOT EDIT.
// sources:
// 0001_app.down.sql (387B)
// 0001_app.up.sql (2.951kB)
// 0002_tokens.down.sql (19B)
// 0002_tokens.up.sql (248B)
// doc.go (74B)
package migrations
import (
"bytes"
"compress/gzip"
"crypto/sha256"
"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
digest [sha256.Size]byte
}
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 __0001_appDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x8e\xcd\x0e\x82\x40\x0c\x84\xef\x3c\x05\xef\xc1\x49\x03\x07\x13\xa3\xc6\x78\xf0\xd6\xac\x4b\x85\x46\xd8\xae\x6d\xf1\xe7\xed\x4d\x4c\xfc\x59\x85\xeb\x37\x93\x6f\xa6\xdc\xae\x37\xf9\x6e\x36\x5f\x56\xb9\xa2\x19\x85\x46\x8b\xec\x0b\x3a\xef\x79\x08\x96\xc2\x83\xf0\x55\x51\xc6\x21\xb4\xa4\xc6\x72\x4f\xc2\xda\xc5\x98\xd6\x23\x4a\x4f\xaa\xc4\x21\xe5\x26\x2e\xe8\xf1\x4f\xde\xb1\x3f\x8d\x3f\x03\x63\x18\x89\x7b\x47\x9d\xa2\x5c\x7e\x4d\x1f\x0e\x82\xe7\x01\xd5\xa0\x71\xef\x6f\x8b\x55\x59\xed\xa7\x3a\xe0\x5b\x67\x40\x35\x50\x7d\x9b\x72\x1a\x47\xf2\x93\x8b\x4f\xc1\x4b\x29\x2e\x34\xa8\x45\xf6\x08\x00\x00\xff\xff\xef\x20\x3b\x16\x83\x01\x00\x00")
func _0001_appDownSqlBytes() ([]byte, error) {
return bindataRead(
__0001_appDownSql,
"0001_app.down.sql",
)
}
func _0001_appDownSql() (*asset, error) {
bytes, err := _0001_appDownSqlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "0001_app.down.sql", size: 387, mode: os.FileMode(0644), modTime: time.Unix(1574780240, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbc, 0x9c, 0xd2, 0xe1, 0x1d, 0x8, 0x34, 0x6a, 0xc8, 0x37, 0x13, 0xb3, 0x9f, 0x26, 0x23, 0x33, 0xd4, 0x25, 0x8, 0xed, 0x53, 0xe6, 0xd, 0x46, 0xc9, 0xf4, 0x24, 0xf8, 0x1, 0x1f, 0xf5, 0xc8}}
return a, nil
}
var __0001_appUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x56\x4d\x93\xaa\x38\x14\xdd\xf3\x2b\xb2\xb4\xab\xd8\xcc\xfa\xad\x50\xa3\x4d\x0d\x03\x33\x88\xd3\xfd\x56\xa9\x34\x44\x4c\x35\x10\x5e\x12\xdb\xf6\xdf\x4f\xe5\x0b\x50\x01\xbb\xe7\xed\x48\xee\xc9\xf5\x9c\x73\x6f\x6e\x5c\xa5\x30\xc8\x20\xc8\x82\x65\x04\x41\xb8\x01\x71\x92\x01\xf8\x1a\xee\xb2\x1d\x10\x44\x4a\xda\x94\x02\x2c\x3c\x79\x69\x09\xf8\x37\x48\x57\xcf\x41\x0a\xfe\x4e\xc3\xbf\x82\xf4\x27\xf8\x13\xfe\xf4\xbd\x0f\x5c\x9d\x08\x58\x46\xc9\xd2\x7b\x02\x2f\x61\xf6\x9c\xec\x33\x90\x26\x2f\xe1\xfa\x87\xe7\xcd\x24\xc7\x79\xce\x4e\x8d\x54\xc9\x71\x51\x70\x22\xc4\x78\xfe\x33\xae\x2a\x22\xc1\x32\x49\x22\x18\xc4\xbe\x97\x1f\xf1\x60\xa5\x79\x65\xf0\x35\xf3\x3d\x21\x19\xc7\xa5\x5b\xb5\xa7\xb7\x77\x72\xd1\xbc\x7c\xaf\xc5\xf2\x68\xf7\x1b\x5c\x3b\x48\xce\x2a\xc6\xf5\xf7\x34\xf3\x7d\x1c\xfe\xb3\x87\x20\x8c\xd7\xf0\x15\x9c\x1a\xfa\xeb\x44\x90\x61\x84\x1c\xeb\x24\x1e\x68\x31\xb1\x27\xf0\xf2\x0c\x53\xd8\x2d\x7f\xcc\xa5\x53\x82\xc6\x93\xa9\x48\x97\x4a\x2f\xe6\x2d\x7d\xe3\xec\x2c\x08\x57\x96\xd2\x42\x0b\xbb\xb6\xb2\xd3\xae\x0f\xc5\xfb\x28\xf2\x3d\x49\x6b\x22\x24\xae\x5b\xb0\xdf\x6d\xc3\x6d\x0c\xd7\x60\x19\x6e\xc3\x38\xf3\xbd\x02\xb7\xad\x73\x1a\xac\xe1\x26\xd8\x47\x19\x38\xe0\x4a\x10\xdf\x3b\x52\x65\xf7\x25\x6c\x0a\xf2\x09\xf6\xf1\xce\x9c\x0c\xe3\x19\x2b\xe7\x18\x23\x9b\x0f\x2c\x3c\xbb\x85\x9c\x82\x9e\xaa\xc3\x98\xea\x6d\x92\x14\x86\xdb\x58\x29\x5b\xf4\x67\x9e\x40\x0a\x37\x30\x85\xf1\x0a\xf6\xd9\x17\x6a\x3f\x51\x1a\x22\x98\x41\xb0\x0a\x76\xab\x60\x0d\xbd\x07\x6e\x2a\xf9\xca\xca\xde\xb5\x81\x99\xdf\x93\xd9\x12\x5e\x53\x21\x28\x6b\x54\x42\x95\x18\x8d\xd5\xa2\x87\xdd\x46\x86\x62\xbb\xe3\x57\x5a\x35\xdb\x85\xd9\x1e\x97\x3a\x47\x50\x72\xdc\x88\x83\x69\x9d\x86\xc8\x33\xe3\xef\xaa\x00\x5d\x61\x4d\x4b\x0c\x6b\x81\xc5\xb1\xbb\xaf\xfd\xf6\xed\x4d\xee\x23\x6f\xd5\x3b\x9a\x38\x24\x3f\xed\x35\x15\xa4\x29\x08\x1f\x41\x70\x92\x13\xda\x4a\x0b\xab\x58\x69\xbf\xae\xa6\xd2\xb8\x5b\xbd\x1a\xdf\x51\xb8\xee\x91\x8a\xe5\xef\x62\x08\x33\x90\x3b\x0f\x7d\x6f\x95\xc4\xbb\x2c\x0d\x94\x11\xf6\xea\x3a\xdb\x50\x4b\xb8\xbb\xc2\xfa\xdb\xa6\x73\xf7\x7d\xa1\x72\xfa\x16\xe0\xf7\xbf\xf5\xf4\xa8\x07\x0d\xbb\xdf\x2c\x4a\x73\xaa\xdf\x08\xbf\x87\x0f\xae\xfe\x74\x4a\x82\x0b\x3d\x03\xba\x01\xb0\x09\xa2\xdd\xa8\x19\x9a\xeb\xa8\xfa\x5b\x73\x27\x0f\x1b\xa6\x8f\x72\x18\xd4\x43\xef\xdc\x1c\x45\x92\xa1\xef\xf9\x38\xdf\xc5\x53\x76\x8a\x4b\x93\x03\x3d\x38\x67\xfa\xcf\x72\x9f\xef\x40\x07\xfa\x52\x0f\xd6\xb8\x6d\x69\x53\xa2\x03\xe3\xc8\x4a\xee\x14\x8f\x3a\xe9\xda\xb0\xa7\xf3\x9d\x8e\xac\x31\xad\x04\xe1\x1f\x66\x56\x00\x00\x00\x2d\xc6\x1f\x6e\x15\xd3\x53\xee\xde\x46\x15\x9a\x36\x59\x45\x5b\x2c\xc4\x99\xf1\x2e\xb5\xd9\x3d\x54\x84\xc8\xbb\x13\xdf\x9b\xc5\xbd\x00\xc4\xc9\xaf\x13\x11\x12\x95\xb8\x75\x62\x4a\xdc\xa2\x03\x67\xf5\xd5\x9b\x06\xb7\xf0\x96\x9f\xc2\x49\xf6\x08\x35\xfa\x0a\xab\x80\x7e\xf3\x6f\x5f\xb8\x69\x1d\xe6\xff\xc2\x04\x73\x64\x93\x21\x5a\x7c\xaa\x96\x99\x14\x68\x71\x5f\x2e\x30\x92\xac\xa5\xb9\x73\x46\x2f\xa6\x2b\x6d\x93\x8b\xeb\x82\x55\x58\x48\xc7\xa2\xf3\xc8\x4d\x92\x3f\x0c\xa6\xa0\x22\x67\x1f\x84\x5f\xee\xfe\x6b\xd8\x51\xa3\x1b\x89\x94\x4c\x52\x2c\x49\x31\x8e\xfa\xdf\x3d\xa0\x79\x3b\x9f\x38\x6e\x4a\xe2\x04\xbb\x1a\x4d\x4a\xae\xd8\x99\xf4\xf2\x4c\xdb\x58\x8d\x06\x70\xa4\xe5\x71\x88\x90\xcc\xc5\xef\xe9\xfe\x17\x00\x00\xff\xff\xbe\x1f\x2a\xc2\x87\x0b\x00\x00")
func _0001_appUpSqlBytes() ([]byte, error) {
return bindataRead(
__0001_appUpSql,
"0001_app.up.sql",
)
}
func _0001_appUpSql() (*asset, error) {
bytes, err := _0001_appUpSqlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "0001_app.up.sql", size: 2951, mode: os.FileMode(0644), modTime: time.Unix(1575989917, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb4, 0x2, 0xd5, 0x91, 0xff, 0x5f, 0x8f, 0xb0, 0xe8, 0x19, 0x84, 0xd1, 0xa5, 0xd5, 0xec, 0xa5, 0x4, 0x1d, 0x4c, 0x5c, 0xb5, 0xd3, 0xde, 0x36, 0xd8, 0xa6, 0x98, 0x69, 0xee, 0xfa, 0x10, 0x97}}
return a, nil
}
var __0002_tokensDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\x28\xc9\xcf\x4e\xcd\x2b\xb6\xe6\x02\x04\x00\x00\xff\xff\xf0\xdb\x32\xa7\x13\x00\x00\x00")
func _0002_tokensDownSqlBytes() ([]byte, error) {
return bindataRead(
__0002_tokensDownSql,
"0002_tokens.down.sql",
)
}
func _0002_tokensDownSql() (*asset, error) {
bytes, err := _0002_tokensDownSqlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "0002_tokens.down.sql", size: 19, mode: os.FileMode(0644), modTime: time.Unix(1575992350, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd1, 0x31, 0x2, 0xcc, 0x2f, 0x38, 0x90, 0xf7, 0x58, 0x37, 0x47, 0xf4, 0x18, 0xf7, 0x72, 0x74, 0x67, 0x14, 0x7e, 0xf3, 0xb1, 0xd6, 0x5f, 0xb0, 0xd5, 0xe7, 0x91, 0xf4, 0x26, 0x77, 0x8e, 0x68}}
return a, nil
}
var __0002_tokensUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x8e\xcd\x6a\x85\x30\x10\x46\xf7\x79\x8a\x6f\x79\x05\xdf\xa0\xab\xa8\xa9\x0e\xb5\xb1\xc4\xb1\xea\xaa\x58\x93\x85\xf8\x13\x30\x42\xe9\xdb\x17\x4b\x4b\x2b\xdc\xed\x37\x67\x0e\x27\x35\x4a\xb2\x02\xcb\xa4\x54\xa0\x47\xe8\x8a\xa1\x3a\xaa\xb9\xc6\xe1\x67\xb7\x05\xdc\x04\x30\x58\xbb\xbb\x10\xf0\x2a\x4d\x5a\x48\xf3\x4d\xe9\xa6\x2c\x63\x01\x6c\xee\xf8\xf0\xfb\xfc\x36\x59\x34\xba\xa6\x5c\xab\x0c\x09\xe5\xa4\xf9\x8a\x0d\xab\x03\xab\xee\xba\x86\xcf\xf5\xdd\x2f\x77\xbd\xd6\x8d\xd3\x3a\x2c\xe1\xcf\x4a\x9a\xcf\xc3\xe8\x17\xbf\xff\xbe\x9c\xc3\x8b\xa1\x67\x69\x7a\x3c\xa9\x1e\xb7\x9f\xd4\xf8\x5f\x57\x24\x22\xb4\xc4\x45\xd5\x30\x4c\xd5\x52\xf6\x20\xc4\x57\x00\x00\x00\xff\xff\x73\xf3\x87\xe5\xf8\x00\x00\x00")
func _0002_tokensUpSqlBytes() ([]byte, error) {
return bindataRead(
__0002_tokensUpSql,
"0002_tokens.up.sql",
)
}
func _0002_tokensUpSql() (*asset, error) {
bytes, err := _0002_tokensUpSqlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "0002_tokens.up.sql", size: 248, mode: os.FileMode(0644), modTime: time.Unix(1575992350, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcc, 0xd6, 0xde, 0xd3, 0x7b, 0xee, 0x92, 0x11, 0x38, 0xa4, 0xeb, 0x84, 0xca, 0xcb, 0x37, 0x75, 0x5, 0x77, 0x7f, 0x14, 0x39, 0xee, 0xa1, 0x8b, 0xd4, 0x5c, 0x6e, 0x55, 0x6, 0x50, 0x16, 0xd4}}
return a, nil
}
var _docGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2c\xc9\xb1\x0d\xc4\x20\x0c\x05\xd0\x9e\x29\xfe\x02\xd8\xfd\x6d\xe3\x4b\xac\x2f\x44\x82\x09\x78\x7f\xa5\x49\xfd\xa6\x1d\xdd\xe8\xd8\xcf\x55\x8a\x2a\xe3\x47\x1f\xbe\x2c\x1d\x8c\xfa\x6f\xe3\xb4\x34\xd4\xd9\x89\xbb\x71\x59\xb6\x18\x1b\x35\x20\xa2\x9f\x0a\x03\xa2\xe5\x0d\x00\x00\xff\xff\x60\xcd\x06\xbe\x4a\x00\x00\x00")
func docGoBytes() ([]byte, error) {
return bindataRead(
_docGo,
"doc.go",
)
}
func docGo() (*asset, error) {
bytes, err := docGoBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0644), modTime: time.Unix(1574780240, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xde, 0x7c, 0x28, 0xcd, 0x47, 0xf2, 0xfa, 0x7c, 0x51, 0x2d, 0xd8, 0x38, 0xb, 0xb0, 0x34, 0x9d, 0x4c, 0x62, 0xa, 0x9e, 0x28, 0xc3, 0x31, 0x23, 0xd9, 0xbb, 0x89, 0x9f, 0xa0, 0x89, 0x1f, 0xe8}}
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) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; 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)
}
// AssetString returns the asset contents as a string (instead of a []byte).
func AssetString(name string) (string, error) {
data, err := Asset(name)
return string(data), err
}
// 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
}
// MustAssetString is like AssetString but panics when Asset would return an
// error. It simplifies safe initialization of global variables.
func MustAssetString(name string) string {
return string(MustAsset(name))
}
// 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) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; 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)
}
// AssetDigest returns the digest of the file with the given name. It returns an
// error if the asset could not be found or the digest could not be loaded.
func AssetDigest(name string) ([sha256.Size]byte, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err)
}
return a.digest, nil
}
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name)
}
// Digests returns a map of all known files and their checksums.
func Digests() (map[string][sha256.Size]byte, error) {
mp := make(map[string][sha256.Size]byte, len(_bindata))
for name := range _bindata {
a, err := _bindata[name]()
if err != nil {
return nil, err
}
mp[name] = a.digest
}
return mp, nil
}
// 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){
"0001_app.down.sql": _0001_appDownSql,
"0001_app.up.sql": _0001_appUpSql,
"0002_tokens.down.sql": _0002_tokensDownSql,
"0002_tokens.up.sql": _0002_tokensUpSql,
"doc.go": docGo,
}
// 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, and
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
canonicalName := strings.Replace(name, "\\", "/", -1)
pathList := strings.Split(canonicalName, "/")
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{
"0001_app.down.sql": &bintree{_0001_appDownSql, map[string]*bintree{}},
"0001_app.up.sql": &bintree{_0001_appUpSql, map[string]*bintree{}},
"0002_tokens.down.sql": &bintree{_0002_tokensDownSql, map[string]*bintree{}},
"0002_tokens.up.sql": &bintree{_0002_tokensUpSql, map[string]*bintree{}},
"doc.go": &bintree{docGo, 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
}
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
}
// 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 {
canonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
}