Files
stfs/pkg/db/sqlite/migrations/metadata/migrations.go
2021-11-14 14:19:23 +01:00

287 lines
10 KiB
Go

// Code generated by go-bindata. DO NOT EDIT.
// sources:
// ../../db/sqlite/migrations/metadata/1636892915.sql
package metadata
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 fileInfoEx
}
type fileInfoEx interface {
os.FileInfo
MD5Checksum() string
}
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
md5checksum string
}
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) MD5Checksum() string {
return fi.md5checksum
}
func (fi bindataFileInfo) IsDir() bool {
return false
}
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _bindataDbSqliteMigrationsMetadata1636892915Sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x56\x4d\x73\xdb\x36\x10\x3d\x8b\xbf\x62\x27\x97\xd8\x53\x49\xe7\x4e\x33\x3d\xb8\x71\xe3\x7a\xc6\x76\x32\xb2\x54\xe7\x0a\x01\x4b\x12\x15\x88\x45\x17\xa0\x64\xe6\xd7\x77\x16\x20\x6d\x29\xb5\xda\x69\x4f\x82\x88\xdd\x87\xb7\x5f\x0f\x58\x2c\xe0\x87\xce\x36\xac\x12\xc2\x26\x54\x9a\x51\x56\x49\x6d\x1d\x42\x8b\xca\x20\x47\xb8\xa8\x66\x8b\x05\xac\x87\x80\xb5\x53\x0d\xd8\x08\xa9\x45\x48\x43\x40\xa0\x7a\xb4\x02\xf4\x89\x87\x65\xb1\x6c\x11\xbe\x21\x13\xec\x95\xeb\x51\xec\x55\x9f\xa8\x53\xc9\x6a\xe5\xdc\x00\x81\xa9\xa3\x84\x06\x12\x01\xda\xd4\x22\x67\xf0\x15\x36\x40\x65\x79\x6d\x39\x23\x19\x0c\xe8\x8d\xf5\x0d\x90\xcf\x87\x06\xc6\x88\x5e\xe7\x83\x15\x24\x56\xd6\xc9\x6e\x74\x2a\xb6\x60\x3d\x3c\xa8\x0e\x97\xd5\x2c\xbd\x70\xf5\x09\x1b\x64\xf0\x94\xc0\xf7\xce\xcd\x33\xac\x58\x09\x42\x6d\x1d\x16\xe2\xd5\xcc\xcb\xb7\x84\xcf\xe9\xc5\x16\x02\xdb\x4e\xf1\x00\x3b\x1c\x8a\xdf\x5a\x71\x83\x09\xfc\xe8\xee\xac\xdf\xc1\xc5\x5e\x39\x6b\xa0\x1e\x99\xdf\xc9\xb7\x71\xfd\x38\x74\x62\x72\x59\xcd\xe4\xe7\xef\x07\x14\xd0\x3b\x6a\x24\x2f\x85\x4c\xb4\xdf\x50\xe2\xd8\x0e\x09\x63\x35\x1b\xff\xbe\x15\xc3\x17\xe4\xce\xc6\x68\xc9\x83\xf2\x06\x3a\x32\x08\x5b\x9b\x62\x35\xcb\xcb\xb7\x9d\x36\x11\x19\x6e\xaf\x85\x3c\x1d\x3c\x72\x35\xeb\xad\x39\x63\x7b\xc3\xd4\x87\x53\xe3\xe6\xac\x71\x06\x9e\xf2\x32\x41\x9f\x8b\xb8\x20\x7f\x67\xdd\x9c\xb3\xbe\xad\x73\xe5\x3f\x11\x77\x2a\x49\x33\xf5\x3e\x06\xd4\xb6\xb6\x68\xe6\xb2\xe5\xe1\x89\x6d\x42\x5e\xe6\x9f\xdf\x4a\x3b\x32\xf5\xde\x44\xb8\x27\xb3\xb6\x1d\x66\xa0\x44\x19\xc8\xa3\x62\x8c\x09\x22\x6a\xf2\x26\x27\xcf\x36\x9e\x18\x4b\x5b\x5f\x69\x8d\x31\x8a\x53\xde\xfa\xd8\x2a\xdf\x60\xfe\x5b\x5b\x74\x26\xe6\x16\x2f\xdd\x40\xd0\xc7\x13\x07\xe2\x23\xfb\x39\x14\x9a\xc3\x31\x7d\x15\xe1\xcb\xd5\x57\x31\xbc\x79\xd8\x2c\x8f\x61\x62\xbf\x5d\x8c\x94\x18\x23\xb9\x3e\x59\xf2\xff\x80\x51\x9c\xef\xc9\xd8\xda\x6a\x25\xc6\x90\x72\xa4\x1d\x19\x59\x80\x91\x41\x3e\x4d\x65\xa1\x9a\xed\xe0\x82\xf1\xcf\xde\x4a\xd4\xe3\x08\xbe\xf2\x82\xd8\x87\x40\x9c\x2e\xab\x99\xca\x1e\xe7\xf0\x4a\xb0\xff\x05\x4f\x67\x8f\x73\x78\xf7\xea\x0f\x62\x30\xb8\xb7\x1a\xc1\xf7\xdd\x16\xf9\xfb\xf9\xfa\xd8\x2a\x9e\xe6\xeb\x17\x47\x5a\xa6\xcb\xe0\xbe\xcb\x9e\x6f\xf7\xe6\xbd\xf5\xff\x17\x35\x7b\x9e\x99\xbf\xab\xaf\x2b\xd4\xc4\x26\x66\x81\x83\x4e\x05\xe9\x66\x89\x1a\x9f\x13\x7a\x83\x66\x92\x46\x2e\x76\xaf\x9d\x23\xd3\xb2\x30\x58\x5b\x8f\x66\xda\x85\xd8\x52\xef\x0c\xb4\x6a\x8f\xa2\x38\x51\xd0\xa4\xea\x35\x39\x47\x07\x51\xb9\x9a\xb8\xfb\x49\x00\x66\xbf\xff\xfa\x70\xfd\x79\xb5\xdc\xe1\x70\x20\x36\x19\xf3\xa9\x45\x46\x28\x1b\xc2\x28\x52\x87\x79\xc6\x62\x50\x3a\x6b\x8a\x72\x0e\xfa\x10\x90\xb5\x8a\x38\xcf\xdd\x3d\x02\x40\xa7\x86\x0c\x22\x21\x6a\xf2\x49\xd9\x22\xb7\xef\x7f\x7e\x0f\xba\x55\xac\x74\x92\xa4\xe1\xb2\x59\xce\xe1\xdd\xcd\xe7\xbb\xab\x87\x9b\x65\xd8\x35\xcb\x3d\xb2\x48\xd0\xbb\xcb\x57\xe5\xdf\xe1\x90\xb1\x8b\xf8\x8f\x51\x6d\xa5\xd4\x7e\x81\x5d\x48\x03\x6c\xd6\x9f\x16\x3f\x42\x4c\x6c\x7d\x73\x94\x95\xa7\x33\xa3\x6c\x23\xc8\xbd\x21\xd3\x2e\xd9\x9d\xf2\x65\x90\xed\x1e\x0d\xd4\x4c\x9d\x90\xcd\x18\x94\x5b\xaf\x4c\xaa\xc4\x3c\x42\x24\xb5\xcb\x77\x87\x46\x53\x6e\x8f\x7d\x69\xd0\xd5\x4b\x65\x82\x7a\x9e\x80\xdf\xd0\xa0\x71\xf2\x26\xdd\x89\x63\x61\xf2\xc7\xb1\x4c\x49\xf1\x58\xef\x23\x85\x68\x6d\xee\x8e\x88\x09\xb6\x03\xac\xca\xf6\x83\xe0\x2b\xe9\x99\x2d\xc6\xb4\xc0\xba\x26\x4e\xd0\xf4\x32\x9a\x2a\x1d\x41\x97\x9c\x3e\x5a\x61\x2c\x5f\x8b\x3f\x38\xbb\x45\xce\x17\x29\xa3\x32\x53\xa5\xc9\x2f\x34\x75\xc1\x59\xe5\x53\xbe\x4b\x62\xa1\x6e\xb3\x66\x06\x8a\xd1\xca\x9d\x2e\x1d\x9f\x84\x56\x22\x29\x4a\x09\x6c\xe3\x77\x9e\x0e\xfe\x95\xf8\x6d\x7d\x1c\xe1\xa9\xe6\xc2\xe1\x5f\xeb\x54\xe4\x56\xcc\x6c\x12\x71\x1b\xf3\x65\x39\xa6\x09\xf3\x62\xec\x30\x62\x71\xa5\x1a\x36\x8f\xeb\xab\x55\xae\xf0\x5c\x34\xe3\x32\x63\x68\x15\xf2\x4b\x84\x6a\x40\xaf\x29\xbf\x04\x32\xfb\xf1\xc8\x8b\x88\x53\x0c\xd2\x81\x23\xf6\x49\x01\xab\xcb\x0f\xd5\xf1\x23\xe7\x9a\x0e\xbe\x32\x4c\xe1\xf4\x91\xf3\xe1\xaf\x00\x00\x00\xff\xff\xd0\x35\xad\x6a\x09\x09\x00\x00")
func bindataDbSqliteMigrationsMetadata1636892915SqlBytes() ([]byte, error) {
return bindataRead(
_bindataDbSqliteMigrationsMetadata1636892915Sql,
"../../db/sqlite/migrations/metadata/1636892915.sql",
)
}
func bindataDbSqliteMigrationsMetadata1636892915Sql() (*asset, error) {
bytes, err := bindataDbSqliteMigrationsMetadata1636892915SqlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{
name: "../../db/sqlite/migrations/metadata/1636892915.sql",
size: 2313,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1636894164, 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, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
}
//
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
// nolint: deadcode
//
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, &os.PathError{Op: "open", Path: name, Err: os.ErrNotExist}
}
//
// AssetNames returns the names of the assets.
// nolint: deadcode
//
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){
"../../db/sqlite/migrations/metadata/1636892915.sql": bindataDbSqliteMigrationsMetadata1636892915Sql,
}
//
// 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, &os.PathError{
Op: "open",
Path: name,
Err: os.ErrNotExist,
}
}
}
}
if node.Func != nil {
return nil, &os.PathError{
Op: "open",
Path: name,
Err: os.ErrNotExist,
}
}
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{Func: nil, Children: map[string]*bintree{
"..": {Func: nil, Children: map[string]*bintree{
"..": {Func: nil, Children: map[string]*bintree{
"db": {Func: nil, Children: map[string]*bintree{
"sqlite": {Func: nil, Children: map[string]*bintree{
"migrations": {Func: nil, Children: map[string]*bintree{
"metadata": {Func: nil, Children: map[string]*bintree{
"1636892915.sql": {Func: bindataDbSqliteMigrationsMetadata1636892915Sql, Children: 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 {
cannonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}