Files
stfs/pkg/db/sqlite/migrations/metadata/migrations.go
2021-11-14 20:24:17 +01:00

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