2022-02-14 11:08:18 +00:00
|
|
|
// Code generated by go-bindata. DO NOT EDIT.
|
2019-09-04 06:25:33 +00:00
|
|
|
// sources:
|
2022-02-14 11:08:18 +00:00
|
|
|
// 1640111208_dummy.up.sql (258B)
|
|
|
|
// 1643644541_gif_api_key_setting.up.sql (108B)
|
|
|
|
// doc.go (74B)
|
2021-09-01 12:02:18 +00:00
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
package migrations
|
2021-09-10 18:08:22 +00:00
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
import (
|
|
|
|
"bytes"
|
|
|
|
"compress/gzip"
|
2022-02-14 11:08:18 +00:00
|
|
|
"crypto/sha256"
|
2022-01-12 20:04:43 +00:00
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
"io/ioutil"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
)
|
2021-09-10 18:08:22 +00:00
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
func bindataRead(data []byte, name string) ([]byte, error) {
|
|
|
|
gz, err := gzip.NewReader(bytes.NewBuffer(data))
|
2021-09-10 18:08:22 +00:00
|
|
|
if err != nil {
|
2022-02-14 11:08:18 +00:00
|
|
|
return nil, fmt.Errorf("read %q: %v", name, err)
|
2021-09-10 18:08:22 +00:00
|
|
|
}
|
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
var buf bytes.Buffer
|
|
|
|
_, err = io.Copy(&buf, gz)
|
|
|
|
clErr := gz.Close()
|
2021-09-10 18:08:22 +00:00
|
|
|
|
|
|
|
if err != nil {
|
2022-02-14 11:08:18 +00:00
|
|
|
return nil, fmt.Errorf("read %q: %v", name, err)
|
2021-09-10 18:08:22 +00:00
|
|
|
}
|
2022-01-12 20:04:43 +00:00
|
|
|
if clErr != nil {
|
2021-09-09 14:28:54 +00:00
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
return buf.Bytes(), nil
|
2021-09-09 14:28:54 +00:00
|
|
|
}
|
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
type asset struct {
|
2022-02-14 11:08:18 +00:00
|
|
|
bytes []byte
|
|
|
|
info os.FileInfo
|
|
|
|
digest [sha256.Size]byte
|
2021-09-09 14:28:54 +00:00
|
|
|
}
|
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
type bindataFileInfo struct {
|
|
|
|
name string
|
|
|
|
size int64
|
|
|
|
mode os.FileMode
|
|
|
|
modTime time.Time
|
2021-09-09 14:28:54 +00:00
|
|
|
}
|
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
func (fi bindataFileInfo) Name() string {
|
|
|
|
return fi.name
|
2021-02-17 23:14:48 +00:00
|
|
|
}
|
2022-01-12 20:04:43 +00:00
|
|
|
func (fi bindataFileInfo) Size() int64 {
|
|
|
|
return fi.size
|
2021-11-03 12:38:37 +00:00
|
|
|
}
|
2022-01-12 20:04:43 +00:00
|
|
|
func (fi bindataFileInfo) Mode() os.FileMode {
|
|
|
|
return fi.mode
|
2021-11-03 12:38:37 +00:00
|
|
|
}
|
2022-01-12 20:04:43 +00:00
|
|
|
func (fi bindataFileInfo) ModTime() time.Time {
|
|
|
|
return fi.modTime
|
2021-02-17 23:14:48 +00:00
|
|
|
}
|
2022-01-12 20:04:43 +00:00
|
|
|
func (fi bindataFileInfo) IsDir() bool {
|
|
|
|
return false
|
2021-10-11 15:39:52 +00:00
|
|
|
}
|
2022-01-12 20:04:43 +00:00
|
|
|
func (fi bindataFileInfo) Sys() interface{} {
|
|
|
|
return nil
|
2021-11-29 13:11:55 +00:00
|
|
|
}
|
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
var __1640111208_dummyUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x8e\xb1\x4e\x04\x31\x0c\x44\x7b\xbe\x62\x3a\x40\x22\x7f\x71\x57\x50\xc0\x4a\xe8\x44\x9f\x4b\x26\x1b\x8b\x5d\x1b\x62\xa3\xe5\xf3\x51\x44\x45\x73\x6e\x3d\xef\xcd\xa4\x84\xd3\x82\xd7\xe5\x82\xb7\xf3\xcb\xf2\x7e\xbe\x4b\x09\xe9\xd6\xcd\xc0\xa5\x8b\xa3\xc9\x46\x54\xa3\x43\x2d\xba\xe8\x3a\x3f\xcf\x71\xef\x28\x83\x39\x58\xe1\x86\xe8\xc4\x2e\xeb\xc8\x21\xa6\xf8\x50\x3b\x1c\x6d\xd8\x8e\xa3\x4b\xe9\xf0\xaf\xed\xcf\x13\x86\x62\x1a\xa2\xdf\x84\x8b\x16\x62\xda\xfe\xd3\x3d\x3b\xae\xa4\xc2\x3f\x37\x89\x59\x20\x8a\x38\x0c\x0f\x57\x36\x1b\x7c\x42\xd6\x8a\xdc\x82\x03\x6a\x95\xa5\xad\xe0\x4f\x8c\x5c\x26\xfe\x38\x85\x27\x9b\x63\x91\x6b\x45\xb1\x4a\x74\x0e\xfe\x06\x00\x00\xff\xff\x9b\xc1\xf3\x13\x02\x01\x00\x00")
|
2021-11-29 13:11:55 +00:00
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
func _1640111208_dummyUpSqlBytes() ([]byte, error) {
|
2021-11-29 13:11:55 +00:00
|
|
|
return bindataRead(
|
2022-01-12 20:04:43 +00:00
|
|
|
__1640111208_dummyUpSql,
|
|
|
|
"1640111208_dummy.up.sql",
|
2021-11-29 13:11:55 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
func _1640111208_dummyUpSql() (*asset, error) {
|
|
|
|
bytes, err := _1640111208_dummyUpSqlBytes()
|
2021-11-29 13:11:55 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
info := bindataFileInfo{name: "1640111208_dummy.up.sql", size: 258, mode: os.FileMode(0644), modTime: time.Unix(1642505279, 0)}
|
|
|
|
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3e, 0xf0, 0xae, 0x20, 0x6e, 0x75, 0xd1, 0x36, 0x14, 0xf2, 0x40, 0xe5, 0xd6, 0x7a, 0xc4, 0xa5, 0x72, 0xaa, 0xb5, 0x4d, 0x71, 0x97, 0xb8, 0xe8, 0x95, 0x22, 0x95, 0xa2, 0xac, 0xaf, 0x48, 0x58}}
|
2022-01-31 12:58:03 +00:00
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
2022-01-31 16:46:59 +00:00
|
|
|
var __1643644541_gif_api_key_settingUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\x28\x4e\x2d\x29\xc9\xcc\x4b\x2f\x56\x70\x74\x71\x51\x70\xf6\xf7\x09\xf5\xf5\x53\x48\xcf\x4c\x8b\x4f\x2c\xc8\x8c\xcf\x4e\xad\x54\x08\x71\x8d\x08\x51\xf0\xf3\x0f\x51\xf0\x0b\xf5\xf1\x51\x70\x71\x75\x73\x0c\xf5\x09\x51\x50\x52\xb2\xe6\x0a\x0d\x70\x71\x0c\x41\x32\x20\xd8\x35\x04\x45\xa7\x2d\x58\x15\x20\x00\x00\xff\xff\x59\x5f\x0d\x48\x6c\x00\x00\x00")
|
2022-01-31 12:58:03 +00:00
|
|
|
|
2022-01-31 16:46:59 +00:00
|
|
|
func _1643644541_gif_api_key_settingUpSqlBytes() ([]byte, error) {
|
2022-01-31 12:58:03 +00:00
|
|
|
return bindataRead(
|
2022-01-31 16:46:59 +00:00
|
|
|
__1643644541_gif_api_key_settingUpSql,
|
|
|
|
"1643644541_gif_api_key_setting.up.sql",
|
2022-01-31 12:58:03 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2022-01-31 16:46:59 +00:00
|
|
|
func _1643644541_gif_api_key_settingUpSql() (*asset, error) {
|
|
|
|
bytes, err := _1643644541_gif_api_key_settingUpSqlBytes()
|
2022-01-31 12:58:03 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
info := bindataFileInfo{name: "1643644541_gif_api_key_setting.up.sql", size: 108, mode: os.FileMode(0644), modTime: time.Unix(1644591919, 0)}
|
|
|
|
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1b, 0x94, 0x28, 0xfb, 0x66, 0xd1, 0x7c, 0xb8, 0x89, 0xe2, 0xb4, 0x71, 0x65, 0x24, 0x57, 0x22, 0x95, 0x38, 0x97, 0x3, 0x9b, 0xc6, 0xa4, 0x41, 0x7b, 0xba, 0xf7, 0xdb, 0x70, 0xf7, 0x20, 0x3a}}
|
2021-10-11 15:39:52 +00:00
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
2019-09-04 06:25:33 +00:00
|
|
|
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")
|
2019-07-25 05:35:09 +00:00
|
|
|
|
2019-09-04 06:25:33 +00:00
|
|
|
func docGoBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_docGo,
|
2019-07-25 05:35:09 +00:00
|
|
|
"doc.go",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2019-09-04 06:25:33 +00:00
|
|
|
func docGo() (*asset, error) {
|
|
|
|
bytes, err := docGoBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0644), modTime: time.Unix(1585751575, 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}}
|
2019-09-04 06:25:33 +00:00
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
2019-07-25 05:35:09 +00:00
|
|
|
// 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) {
|
2022-02-14 11:08:18 +00:00
|
|
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
|
|
|
if f, ok := _bindata[canonicalName]; ok {
|
2019-09-04 06:25:33 +00:00
|
|
|
a, err := f()
|
|
|
|
if err != nil {
|
|
|
|
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
|
|
|
}
|
|
|
|
return a.bytes, nil
|
2019-07-25 05:35:09 +00:00
|
|
|
}
|
|
|
|
return nil, fmt.Errorf("Asset %s not found", name)
|
|
|
|
}
|
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
// 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
|
|
|
|
}
|
|
|
|
|
2019-09-04 06:25:33 +00:00
|
|
|
// 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
|
|
|
|
}
|
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
// 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))
|
|
|
|
}
|
|
|
|
|
2019-09-04 06:25:33 +00:00
|
|
|
// 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) {
|
2022-02-14 11:08:18 +00:00
|
|
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
|
|
|
if f, ok := _bindata[canonicalName]; ok {
|
2019-09-04 06:25:33 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
// 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
|
|
|
|
}
|
|
|
|
|
2019-07-25 05:35:09 +00:00
|
|
|
// 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.
|
2019-09-04 06:25:33 +00:00
|
|
|
var _bindata = map[string]func() (*asset, error){
|
2022-01-12 20:04:43 +00:00
|
|
|
"1640111208_dummy.up.sql": _1640111208_dummyUpSql,
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2022-01-31 16:46:59 +00:00
|
|
|
"1643644541_gif_api_key_setting.up.sql": _1643644541_gif_api_key_settingUpSql,
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2022-01-12 20:04:43 +00:00
|
|
|
"doc.go": docGo,
|
2021-05-28 11:05:01 +00:00
|
|
|
}
|
2021-05-29 17:05:25 +00:00
|
|
|
|
2019-07-25 05:35:09 +00:00
|
|
|
// 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
|
2022-02-14 11:08:18 +00:00
|
|
|
// 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
|
2019-07-25 05:35:09 +00:00
|
|
|
// AssetDir("") will return []string{"data"}.
|
|
|
|
func AssetDir(name string) ([]string, error) {
|
|
|
|
node := _bintree
|
|
|
|
if len(name) != 0 {
|
2022-02-14 11:08:18 +00:00
|
|
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
|
|
|
pathList := strings.Split(canonicalName, "/")
|
2019-07-25 05:35:09 +00:00
|
|
|
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))
|
2019-09-04 06:25:33 +00:00
|
|
|
for childName := range node.Children {
|
|
|
|
rv = append(rv, childName)
|
2019-07-25 05:35:09 +00:00
|
|
|
}
|
|
|
|
return rv, nil
|
|
|
|
}
|
|
|
|
|
2019-09-04 06:25:33 +00:00
|
|
|
type bintree struct {
|
|
|
|
Func func() (*asset, error)
|
|
|
|
Children map[string]*bintree
|
2019-07-25 05:35:09 +00:00
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
|
2019-09-04 06:25:33 +00:00
|
|
|
var _bintree = &bintree{nil, map[string]*bintree{
|
2022-02-14 11:08:18 +00:00
|
|
|
"1640111208_dummy.up.sql": &bintree{_1640111208_dummyUpSql, map[string]*bintree{}},
|
2022-01-31 16:46:59 +00:00
|
|
|
"1643644541_gif_api_key_setting.up.sql": &bintree{_1643644541_gif_api_key_settingUpSql, map[string]*bintree{}},
|
2022-02-14 11:08:18 +00:00
|
|
|
"doc.go": &bintree{docGo, map[string]*bintree{}},
|
2019-07-25 05:35:09 +00:00
|
|
|
}}
|
2019-09-04 06:25:33 +00:00
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
// RestoreAsset restores an asset under the given directory.
|
2019-09-04 06:25:33 +00:00
|
|
|
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
|
|
|
|
}
|
2022-02-14 11:08:18 +00:00
|
|
|
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
2019-09-04 06:25:33 +00:00
|
|
|
}
|
|
|
|
|
2022-02-14 11:08:18 +00:00
|
|
|
// RestoreAssets restores an asset under the given directory recursively.
|
2019-09-04 06:25:33 +00:00
|
|
|
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 {
|
2022-02-14 11:08:18 +00:00
|
|
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
|
|
|
return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
|
2019-09-04 06:25:33 +00:00
|
|
|
}
|