2023-08-17 15:23:25 +00:00
|
|
|
// Code generated by go-bindata. DO NOT EDIT.
|
|
|
|
// sources:
|
|
|
|
// 1691753758_initial.up.sql (5.738kB)
|
|
|
|
// doc.go (74B)
|
|
|
|
|
|
|
|
package migrations
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
|
|
|
"compress/gzip"
|
|
|
|
"crypto/sha256"
|
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func bindataRead(data []byte, name string) ([]byte, error) {
|
|
|
|
gz, err := gzip.NewReader(bytes.NewBuffer(data))
|
|
|
|
if err != nil {
|
2023-08-18 11:39:59 +00:00
|
|
|
return nil, fmt.Errorf("read %q: %w", name, err)
|
2023-08-17 15:23:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var buf bytes.Buffer
|
|
|
|
_, err = io.Copy(&buf, gz)
|
|
|
|
clErr := gz.Close()
|
|
|
|
|
|
|
|
if err != nil {
|
2023-08-18 11:39:59 +00:00
|
|
|
return nil, fmt.Errorf("read %q: %w", name, err)
|
2023-08-17 15:23:25 +00:00
|
|
|
}
|
|
|
|
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 __1691753758_initialUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\xcd\x8e\xdb\x36\x10\xbe\xfb\x29\x88\x3d\xad\x01\x1d\x9a\xb4\x28\x0a\xe4\xa4\xf5\x6a\x37\x42\x5d\x39\x95\xe5\x26\x39\x11\xb4\x34\x5e\x13\x2b\x89\x0a\x49\x39\x76\x9e\xbe\xa0\x7e\x49\x89\x92\xdd\x45\x7a\x94\x38\xe4\xfc\x7f\xf3\x91\xab\xd0\x73\x23\x0f\x45\xee\xc3\xda\x43\xfb\x94\xc5\xaf\x02\xdd\x2f\x10\x42\x28\x07\xf9\x9d\xf1\x57\x4c\x13\xb4\x0b\xb6\xfe\x73\xe0\x3d\xa2\x07\xff\xd9\x0f\x22\x14\x6c\x22\x14\xec\xd6\x6b\xa7\x12\x24\x49\xc2\x41\x08\xf4\x8f\x1b\xae\x3e\xba\xe1\x60\x75\x9f\xbe\xe2\xbc\xcc\xf6\xc0\xed\xbb\xd5\xfa\x91\x88\xa3\x7d\x35\x65\x24\x81\x04\x3d\x6c\x36\x6b\xf4\xe8\x3d\xb9\xbb\x75\x84\x9e\xdc\xf5\xd6\xab\x97\x57\x9b\x60\x1b\x85\xae\xda\x57\xe6\xf4\x5b\x09\x38\x23\x45\x41\xf3\x17\x7c\x60\x1c\x93\x38\x66\x65\x2e\xb1\x64\xb8\xf2\x0c\x17\xc0\x71\xe3\x16\xda\x05\xfe\xdf\x3b\x0f\xdd\x37\xd6\x3b\xad\x1d\x4e\xef\xf7\x72\xb1\xfc\xb0\x58\x58\x22\x84\x39\xc9\x5f\xe0\x7f\x08\xd4\x81\xb3\x6c\x3a\x4c\x92\x4d\xac\x91\x94\xe4\x31\xa0\x87\xf5\xe6\xa1\xfe\x93\x33\xf5\xed\x07\x91\xf7\xec\x85\xf3\x4e\x60\x01\xdf\x4a\xc8\x25\x25\xe9\xcf\xf7\x47\x48\xc2\x65\xb3\x59\xf3\x92\x72\x21\xa7\xdd\x4c\xc9\xd4\xea\xa7\xd0\xff\xcb\x0d\xbf\xa2\x3f\xbd\xaf\xe8\xbe\x37\xd3\x69\x2d\x59\x2e\x96\xe8\xb3\x1f\x7d\xdc\xec\x22\x14\x6e\x3e\xfb\x8f\x43\xcf\x0b\xc8\x13\x55\x1d\x92\x93\x5c\x90\x58\x52\x96\xff\xe7\x2c\x56\xc5\x6a\x77\x59\xd2\x0c\x84\x24\x59\x71\xe5\x08\x95\x66\x3c\x1f\x3d\xc9\x86\x02\xf5\x7f\x71\xc9\xf6\x2c\x35\xff\xbd\x10\x81\x0b\x4e\x8d\x0a\x50\xff\x52\x9a\x51\xa9\xfd\x3b\x91\xb4\xd4\x65\x12\x22\x09\x8a\xbc\x2f\x4d\x6a\xe4\xa5\x00\xf3\x60\x92\x24\x54\xc5\x88\xa4\x78\x20\x9b\x95\xa9\xa4\x7a\x18\x55\xdc\xba\x24\x4f\xe6\x49\xc5\xee\x6a\x92\xee\x04\x39\x41\xd2\xba\x0f\xe2\xae\xc9\xd0\x7c\xc0\x72\x92\x41\x65\xe0\x30\xd6\xe4\xc4\x4a\x4e\x25\x54\x20\xe2\xb9\x41\xb7\x6e\x03\x14\x0e\x19\x3b\x35\x80\x73\x4d\xb6\x2c\x12\x22\x01\xc7\xaa\x9b\x90\x9e\xe4\x4e\xf8\x97\x5a\x30\x3e\x12\x9a\x63\x71\x64\x5c\x62\x65\x66\xef\x42\x2b\x78\x77\x57\x4b\x42\x2e\x2a\x89\x49\x01\x2a\xb0\x04\xd5\x1e\x8d\x7d\x16\xb3\x62\x0e\x44\xaa\xf8\xc9\xca\xa8\x81\x2d\x46\x6a\x5a\xec\xeb\xf4\x3a\xad\x82\xab\x49\x92\xec\x15\x72\xdc\x20\x4f\xdb\x43\xa5\x00\x7e\xb5\xae\xd5\x3e\xc3\x47\x9b\x80\x59\xe6\x56\x91\x5b\xf4\xc4\x2c\x65\x7c\x24\x31\x8a\x6a\x2d\x9c\x40\x4c\x33\x92\x0a\x34\x6e\xd8\x56\x40\xc4\x9c\x16\xaa\xdc\x6f\x3d\xb3\xe4\x63\x27\x46\xa2\x2d\x7e\xdb\x3d\xa9\xab\xa7\x6e\xaf\x39\x3c\xd4\x83\xef\x74\xbb\x1c\x23\xa0\x4b\xb4\x09\xd4\xd0\x7c\x5a\xfb\xab\x08\x85\xde\xa7\xb5\xbb\xf2\xc6\x53\xae\xda\x22\x6e\x6b\xbb\x5b\x61\x73\xaa\x3f\x67\x33\xdd\xa5\xa4\x3b\xbb\xc3\x18\x23\xb5\x73\xb5\x6d\xcc\xf3\xf9\xa2\x3e\x51\x41\xf7\x29\x60\xc3\xff\x2e\xfe\x63\x1b\xa6\x42\x33\x8e\x68\x5c\x72\x0e\x79\x7c\x51\xbc\x24\x23\x12\xc7\x24\x3e\x42\xa3\x60\x3e\x02\x54\x14\x29\xb9\xcc\x15\xa7\x90\x9c\x16\x0a\x8b\x69\xaa\x66\xdb\x0f\xe0\x0c\xc4\x08\xc1\xc6\x36\x8d\x30\xbc\xf5\xf8\x86\xf1\x54\x8b\x08\x01\x72\x56\x20\x53\xfc\xeb\xe6\x09\x67\x11\x98\xd1\xa0\x8f\xab\x37\xce\x61\xa5\xc1\x30\x51\xb3\x7d\xba\xb0\xbb\xbd\xd7\x44\x62\xce\x84\xc0\xf2\xac\x04\xa6\x00\xbd\xd2\x25\xcf\x0d\x05\xee\x46\xb3\x64\xc6\x4f\x0b\x11\xad\x31\x03\x1f\xa9\x90\x8c\x5f\x26\x6b\xf5\x0d\xc4\xad\xad\xd5\x49\x5e\xa7\xe6\x9d\x3d\x9e\x5d\xdc\x2d\xcc\x8e\x4a\x95\xcb\x79\xf6\x3a\xf6\xb3\xe2\x35\x46\xbb\x54\xcd\xf9\x36\xd3\x6b\x92\x14\x7a\xee\x7a\xa6\x2d\xfc\xa7\x6a\xd1\xfb\xe2\x6f\xa3\xad\x82\x99\x14\x62\xa9\x60\x41\x60\xf6\x3d\x07\x2e\x8e\xb4\x30\x0c\xba\x31\xe8\x31\xcb\x25\x27\xb1\xbc\x69\x70\xd1\xa4\x8a\xc7\x60\xad\xd2\x3f\xb9\xdf\x82\xe3\xaa\xb7\x0f\xc0\x7f\x26\xc7\xbd\x4e\xfa\xe7\x08\xf2\x59\xab\x71\x01\x79\x02\x03\x08\xe7\x10\x03\x2d\x74\xd2\x9a\xb2\x17\xbd\x2f\xa6\x9b\xfe\xda\x45\xf3\x56\x50\xb0\x5d\x39\xdf\xdd\xc2\x7a\xf7\x44\x00\x56\xbc\xfb\x00\x83\x49\x37\xea\x7a\x21\x89\x2c\x45\xbf\xb5\x71\x1b\x57\xee\xf5\x10\x33\x82\x85\x94\xbd\x60\x9a\x27\x70\xd6\xb4\x56\x37\xdb\x81\x5c\x5c\x66\x65\x4a\x24\x3d\xd5\x06\x95\x02\x12\x7d\x72\x0e\x0a\xb1\xa7\xf5\x63\x61\x85\x5e\xa6\x42\x79\x1e\x98\x59\x70\x26\x21\x96\x3d\x6b\x1e\xde\x40\xc6\x83\xb3\xbb\xb1\xe0\x3
|
|
|
|
|
|
|
|
func _1691753758_initialUpSqlBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
__1691753758_initialUpSql,
|
|
|
|
"1691753758_initial.up.sql",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _1691753758_initialUpSql() (*asset, error) {
|
|
|
|
bytes, err := _1691753758_initialUpSqlBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2023-08-18 11:39:59 +00:00
|
|
|
info := bindataFileInfo{name: "1691753758_initial.up.sql", size: 5738, mode: os.FileMode(0644), modTime: time.Unix(1692687412, 0)}
|
2023-08-17 15:23:25 +00:00
|
|
|
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6b, 0x25, 0x31, 0xc8, 0x27, 0x3, 0x6b, 0x9f, 0x15, 0x42, 0x2f, 0x85, 0xfb, 0xe3, 0x6, 0xea, 0xf7, 0x97, 0x12, 0x56, 0x3c, 0x9a, 0x5b, 0x1a, 0xca, 0xb1, 0x23, 0xfa, 0xcd, 0x57, 0x25, 0x5c}}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2023-08-18 11:39:59 +00:00
|
|
|
info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0644), modTime: time.Unix(1692687412, 0)}
|
2023-08-17 15:23:25 +00:00
|
|
|
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){
|
|
|
|
"1691753758_initial.up.sql": _1691753758_initialUpSql,
|
2023-08-18 11:39:59 +00:00
|
|
|
"doc.go": docGo,
|
2023-08-17 15:23:25 +00:00
|
|
|
}
|
|
|
|
|
2023-08-18 11:39:59 +00:00
|
|
|
// AssetDebug is true if the assets were built with the debug flag enabled.
|
|
|
|
const AssetDebug = false
|
|
|
|
|
2023-08-17 15:23:25 +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:
|
2023-08-18 11:39:59 +00:00
|
|
|
//
|
|
|
|
// data/
|
|
|
|
// foo.txt
|
|
|
|
// img/
|
|
|
|
// a.png
|
|
|
|
// b.png
|
|
|
|
//
|
2023-08-17 15:23:25 +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
|
|
|
|
// 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{
|
2023-08-18 11:39:59 +00:00
|
|
|
"1691753758_initial.up.sql": {_1691753758_initialUpSql, map[string]*bintree{}},
|
|
|
|
"doc.go": {docGo, map[string]*bintree{}},
|
2023-08-17 15:23:25 +00:00
|
|
|
}}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|
2023-08-18 11:39:59 +00:00
|
|
|
err = os.WriteFile(_filePath(dir, name), data, info.Mode())
|
2023-08-17 15:23:25 +00:00
|
|
|
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, "/")...)...)
|
|
|
|
}
|