Files
stfs/pkg/db/sqlite/migrations/metadata/migrations.go

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\x93\xbf\x62\x27\x97\xd8\x53\x49\xe7\x4e\x33\x3d\xb8\x71\xe3\x66\x26\x76\x32\xb2\x55\xe7\x0a\x11\x4b\x12\x15\x89\x45\x17\x4b\xc9\xcc\xaf\xef\x2c\x40\xda\x52\x6a\xb5\xd3\x9e\x04\x01\xbb\x8f\x6f\xbf\x1e\xb0\x5c\xc2\x0f\xbd\x6b\xd8\x08\xc2\x26\x94\x15\xa3\xae\xc4\x6c\x3b\x84\x16\x8d\x45\x8e\x70\x51\x16\xcb\x25\x3c\x8c\x01\xeb\xce\x34\xe0\x22\x48\x8b\x20\x63\x40\xa0\x7a\xb2\x02\xf4\xc2\xe3\x2a\x5b\xb6\x08\xdf\x90\x09\xf6\xa6\x1b\x50\xed\xcd\x20\xd4\x1b\x71\x95\xe9\xba\x11\x02\x53\x4f\x82\x16\x84\x00\x9d\xb4\xc8\x09\x7c\x8d\x0d\x50\x5e\x5e\x3b\x4e\x48\x16\x03\x7a\xeb\x7c\x03\xe4\xd3\x47\x03\x63\x44\x5f\xa5\x0f\x1b\x10\x36\xae\xd3\xd3\xd8\x99\xd8\x82\xf3\x70\x67\x7a\x5c\x95\x85\x3c\x73\xf5\x82\x0d\x32\x78\x12\xf0\x43\xd7\x2d\x12\xac\x5a\x29\x42\xed\x3a\xcc\xc4\xcb\xc2\xeb\x9e\xe0\x93\x3c\xdb\x42\x60\xd7\x1b\x1e\x61\x87\x63\xf6\x7b\x30\xdc\xa0\x80\x9f\xdc\x3b\xe7\x77\x70\xb1\x37\x9d\xb3\x50\x4f\xcc\x3f\xe9\xde\xb4\xbe\x1f\x7b\x35\xb9\x2c\x0b\xfd\xf9\xfb\x07\x32\xe8\x27\x6a\x34\x2f\x99\x4c\x74\xdf\x50\xe3\xd8\x8e\x82\xb1\x2c\xa6\xbf\xaf\xc5\xf0\x05\xb9\x77\x31\x3a\xf2\x60\xbc\x85\x9e\x2c\xc2\xd6\x49\x2c\x8b\xb4\x7c\xdd\x69\x13\x91\xe1\xe3\xb5\x92\xa7\x83\x47\x2e\x8b\xc1\xd9\x33\xb6\x37\x4c\x43\x38\x35\x6e\xce\x1a\x27\xe0\x39\x2f\x33\xf4\xb9\x88\x33\xf2\x77\xd6\xcd\x39\xeb\x8f\x75\xaa\xfc\x07\xe2\xde\x88\x36\xd3\xe0\x63\xc0\xca\xd5\x0e\xed\x42\x8f\x3c\x3c\xb2\x13\xe4\x55\xfa\xf9\x2d\xb7\x23\xd3\xe0\x6d\x84\x5b\xb2\x0f\xae\xc7\x04\x24\x94\x80\x3c\x1a\xc6\x28\x10\xb1\x22\x6f\x53\xf2\x5c\xe3\x89\x31\xb7\xf5\x55\x55\x61\x8c\xea\x94\x8e\xde\xb7\xc6\x37\x98\xfe\xd6\x0e\x3b\x1b\x53\x8b\xe7\x6e\x20\x18\xe2\x89\x03\xf1\x91\xfd\x02\x32\xcd\xf1\x98\xbe\x89\xf0\xe5\xea\xab\x1a\xde\xdc\x6d\x56\xc7\x30\x71\xd8\x2e\x27\x4a\x8c\x91\xba\x41\x1c\xf9\x7f\xc0\xc8\xce\xb7\x64\x5d\xed\x2a\xa3\xc6\x20\x29\xd2\x9e\xac\x2e\xc0\xea\x20\x9f\xa6\x32\x53\x4d\x76\x70\xc1\xf8\xe7\xe0\x34\xea\x69\x04\x5f\x78\x41\x1c\x42\x20\x96\xcb\xb2\x30\xc9\xe3\x1c\x5e\x0e\xf6\xbf\xe0\x55\xc9\xe3\x1c\xde\xad\xf9\x83\x18\x2c\xee\x5d\x85\xe0\x87\x7e\x8b\xfc\xfd\x7c\xbd\x6f\x0d\xcf\xf3\xf5\x4b\x47\x95\x4e\x97\xc5\x7d\x9f\x3c\x5f\xef\xcd\x5b\xe7\xff\x2f\x6a\xf2\x3c\x33\x7f\x57\x5f\xd7\x58\x11\xdb\x98\x04\x0e\x7a\x13\xb4\x9b\x35\x6a\x7c\x12\xf4\x16\xed\x2c\x8d\x9c\xed\x5e\x3a\x47\xa7\x65\x69\xb1\x76\x1e\xed\x7c\x0a\xb1\xa5\xa1\xb3\xd0\x9a\x3d\xaa\xe2\x44\x45\xd3\xaa\xd7\xd4\x75\x74\x50\x95\xab\x89\xfb\x9f\x14\xa0\xf8\xfd\xd7\xbb\xeb\xcf\xeb\xd5\x0e\xc7\x03\xb1\x4d\x98\x8f\x2d\x32\x42\x3e\x50\x46\x91\x7a\x4c\x33\x16\x83\xa9\x92\xa6\x98\xae\x83\x21\x04\xe4\xca\x44\x5c\xa4\xee\x9e\x00\xa0\x37\x63\x02\xd1\x10\x2b\xf2\x62\x5c\x96\xdb\xb7\x3f\xbf\x85\xaa\x35\x6c\x2a\xd1\xa4\xe1\xaa\x59\x2d\xe0\xcd\xcd\xe7\x4f\x57\x77\x37\xab\xb0\x6b\x56\x7b\x64\x95\xa0\x37\x97\x2f\xca\xbf\xc3\x31\x61\x67\xf1\x9f\xa2\xda\x6a\xa9\xfd\x12\xfb\x20\x23\x6c\x1e\x3e\x2c\x7f\x84\x28\xec\x7c\x73\x94\x95\xc7\x33\xa3\xec\x22\xe8\xbd\xa1\xd3\xae\xd9\x9d\xf3\x65\x91\xdd\x1e\x2d\xd4\x4c\xbd\x92\x4d\x18\x94\x5a\x2f\x4f\xaa\xc6\x3c\x41\x88\xd9\xa5\xbb\xa3\x42\x9b\x6f\x8f\x7d\x6e\xd0\xf5\x73\x65\x82\x79\x9a\x81\x5f\xd1\xa0\x69\xf2\x66\xdd\x89\x53\x61\xd2\xe6\x54\x26\x31\x3c\xd5\xfb\x48\x21\x5a\x97\xba\x23\xa2\xc0\x76\x84\x75\x3e\xbe\x53\x7c\xa3\x3d\xb3\xc5\x28\x4b\xac\x6b\x62\x81\x66\xd0\xd1\x34\x72\x04\x9d\x73\x7a\xef\x94\xb1\xee\x66\x7f\xe8\xdc\x16\x39\x5d\xa4\x8c\xc6\xce\x95\x26\xbf\xac\xa8\x0f\x9d\x33\x5e\xd2\x5d\x12\x33\x75\x97\x34\x33\x50\x8c\x4e\xef\x74\xed\x78\x51\x5a\x42\x5a\x94\x1c\xd8\xc6\xef\x3c\x1d\xfc\x0b\xf1\x8f\xf5\x71\x84\xa7\x9a\x0b\x87\x7f\xad\x53\x96\x5b\x35\x73\xa2\xe2\x36\xe5\xcb\x71\x94\x19\xf3\x62\xea\x30\x62\x75\xa5\x1a\x36\xf7\x0f\x57\xeb\x54\xe1\x85\x6a\xc6\x65\xc2\xa8\x4c\x48\x2f\x11\xaa\x01\x7d\x45\xe9\x25\x90\xd8\x4f\x9f\xbc\x88\x38\xc7\xa0\x1d\x38\xf3\x7d\x75\x60\xb5\x37\x73\x89\xe7\xc7\x84\x98\x80\x65\x31\xed\x9d\x77\xca\x55\x7d\x1b\x61\xab\xca\x00\x13\xf1\xec\x56\x16\xf3\xe6\xa9\x77\x79\xf9\xae\x3c\x7e\x5a\x5d\xd3\xc1\x97\x96\x29\x9c\x3e\xad\xde\xfd\x15\x00\x00\xff\xff\xa8\x19\x83\xb5\x7f\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: 2431,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1636898047, 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, "/")...)...)
}