github.com/status-im/status-go@v1.1.0/mailserver/migrations/bindata.go (about)

     1  // Code generated by go-bindata. DO NOT EDIT.
     2  // sources:
     3  // 1557732988_initialize_db.down.sql (72B)
     4  // 1557732988_initialize_db.up.sql (278B)
     5  // static.go (198B)
     6  
     7  package migrations
     8  
     9  import (
    10  	"bytes"
    11  	"compress/gzip"
    12  	"crypto/sha256"
    13  	"fmt"
    14  	"io"
    15  	"io/ioutil"
    16  	"os"
    17  	"path/filepath"
    18  	"strings"
    19  	"time"
    20  )
    21  
    22  func bindataRead(data []byte, name string) ([]byte, error) {
    23  	gz, err := gzip.NewReader(bytes.NewBuffer(data))
    24  	if err != nil {
    25  		return nil, fmt.Errorf("read %q: %v", name, err)
    26  	}
    27  
    28  	var buf bytes.Buffer
    29  	_, err = io.Copy(&buf, gz)
    30  	clErr := gz.Close()
    31  
    32  	if err != nil {
    33  		return nil, fmt.Errorf("read %q: %v", name, err)
    34  	}
    35  	if clErr != nil {
    36  		return nil, err
    37  	}
    38  
    39  	return buf.Bytes(), nil
    40  }
    41  
    42  type asset struct {
    43  	bytes  []byte
    44  	info   os.FileInfo
    45  	digest [sha256.Size]byte
    46  }
    47  
    48  type bindataFileInfo struct {
    49  	name    string
    50  	size    int64
    51  	mode    os.FileMode
    52  	modTime time.Time
    53  }
    54  
    55  func (fi bindataFileInfo) Name() string {
    56  	return fi.name
    57  }
    58  func (fi bindataFileInfo) Size() int64 {
    59  	return fi.size
    60  }
    61  func (fi bindataFileInfo) Mode() os.FileMode {
    62  	return fi.mode
    63  }
    64  func (fi bindataFileInfo) ModTime() time.Time {
    65  	return fi.modTime
    66  }
    67  func (fi bindataFileInfo) IsDir() bool {
    68  	return false
    69  }
    70  func (fi bindataFileInfo) Sys() interface{} {
    71  	return nil
    72  }
    73  
    74  var __1557732988_initialize_dbDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\xf0\xf4\x73\x71\x8d\x50\xc8\x4c\x89\x4f\xca\xc9\xcf\xcf\x8d\xcf\x4c\xa9\xb0\xe6\x42\x95\x28\xc9\x2f\xc8\x4c\x46\x92\x08\x71\x74\xf2\x71\x55\x48\xcd\x2b\x4b\xcd\xc9\x2f\x48\x2d\xb6\xe6\x02\x04\x00\x00\xff\xff\x6b\x93\xaa\x08\x48\x00\x00\x00")
    75  
    76  func _1557732988_initialize_dbDownSqlBytes() ([]byte, error) {
    77  	return bindataRead(
    78  		__1557732988_initialize_dbDownSql,
    79  		"1557732988_initialize_db.down.sql",
    80  	)
    81  }
    82  
    83  func _1557732988_initialize_dbDownSql() (*asset, error) {
    84  	bytes, err := _1557732988_initialize_dbDownSqlBytes()
    85  	if err != nil {
    86  		return nil, err
    87  	}
    88  
    89  	info := bindataFileInfo{name: "1557732988_initialize_db.down.sql", size: 72, mode: os.FileMode(0664), modTime: time.Unix(1700000000, 0)}
    90  	a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x77, 0x40, 0x78, 0xb7, 0x71, 0x3c, 0x20, 0x3b, 0xc9, 0xb, 0x2f, 0x49, 0xe4, 0xff, 0x1c, 0x84, 0x54, 0xa1, 0x30, 0xe3, 0x90, 0xf8, 0x73, 0xda, 0xb0, 0x2a, 0xea, 0x8e, 0xf1, 0x82, 0xe7, 0xd2}}
    91  	return a, nil
    92  }
    93  
    94  var __1557732988_initialize_dbUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x0e\x72\x75\x0c\x71\x55\x08\x71\x74\xf2\x71\x55\x48\xcd\x2b\x4b\xcd\xc9\x2f\x48\x2d\x56\xd0\xc8\x4c\x51\x70\x8a\x0c\x71\x75\x54\xf0\xf3\x0f\x51\xf0\x0b\xf5\xf1\x51\x08\xf5\xf3\x0c\x0c\x75\xd5\x51\x48\x49\x2c\x49\x44\x93\xd3\x51\x28\xc9\x2f\xc8\x4c\xc6\x10\x4d\xca\xc9\xcf\xcf\x55\x70\xf2\x0c\xd1\x30\x35\x34\xd2\x84\x4b\x68\x5a\x73\x71\x41\xed\xf5\xf4\x73\x71\x8d\x50\xc8\x4c\x89\x07\x2b\x8d\xcf\x4c\xa9\x50\xf0\xf7\x43\x73\x87\x8b\x6b\xb0\x33\xd4\x2c\x4d\x6b\x0c\x8d\x60\x9b\xf1\x69\x04\x2b\x40\xd7\x88\x5d\x97\x06\x4c\x2d\x20\x00\x00\xff\xff\x0b\x7d\x91\x3e\x16\x01\x00\x00")
    95  
    96  func _1557732988_initialize_dbUpSqlBytes() ([]byte, error) {
    97  	return bindataRead(
    98  		__1557732988_initialize_dbUpSql,
    99  		"1557732988_initialize_db.up.sql",
   100  	)
   101  }
   102  
   103  func _1557732988_initialize_dbUpSql() (*asset, error) {
   104  	bytes, err := _1557732988_initialize_dbUpSqlBytes()
   105  	if err != nil {
   106  		return nil, err
   107  	}
   108  
   109  	info := bindataFileInfo{name: "1557732988_initialize_db.up.sql", size: 278, mode: os.FileMode(0664), modTime: time.Unix(1700000000, 0)}
   110  	a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf5, 0x85, 0x41, 0x7a, 0xba, 0x4f, 0xa3, 0x43, 0xc0, 0x63, 0xfa, 0x2c, 0xd1, 0xc5, 0xbb, 0x20, 0xa0, 0x64, 0xa8, 0x3b, 0x65, 0x82, 0xa2, 0x14, 0x28, 0x18, 0x7c, 0x8b, 0x3a, 0x7a, 0xfd, 0xe0}}
   111  	return a, nil
   112  }
   113  
   114  var _staticGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\xcc\x31\x4a\x06\x41\x0c\xc5\xf1\x7e\x4e\xf1\x4a\x05\x67\xa2\x95\x20\xd8\x8b\x28\x08\x7a\x81\xec\x6e\xc8\x17\xd6\x99\x2c\x99\xe8\xf9\x6d\x56\xc4\xd7\x3d\xfe\xf0\x23\xc2\x1b\xaf\x3b\xab\x60\x26\xa7\xad\x90\xbe\xc8\x36\x7f\xdf\xd5\xf3\xfb\x0d\x9e\x3e\x5e\x5f\xae\x11\x32\xfd\x2b\x56\x99\x08\xd3\x4b\xc2\x46\x3a\xf2\x22\x58\x6c\x70\x98\xcc\x72\xfc\x93\x4a\x21\x52\x7f\x50\x19\x12\x9c\x02\xf5\xba\xd8\xd8\x38\x19\xb5\xfb\x96\xd6\xe5\xf1\xee\xfe\xf6\x1c\xea\xb1\x2b\xba\x69\x70\x9a\x8f\x89\xea\x68\x8d\x5a\xa3\xce\xf6\x39\x25\xbe\x25\xe8\x2f\xd3\x49\x35\x75\xb4\xf2\x13\x00\x00\xff\xff\x9a\xab\xca\x11\xc6\x00\x00\x00")
   115  
   116  func staticGoBytes() ([]byte, error) {
   117  	return bindataRead(
   118  		_staticGo,
   119  		"static.go",
   120  	)
   121  }
   122  
   123  func staticGo() (*asset, error) {
   124  	bytes, err := staticGoBytes()
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  
   129  	info := bindataFileInfo{name: "static.go", size: 198, mode: os.FileMode(0664), modTime: time.Unix(1700000000, 0)}
   130  	a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb, 0xd2, 0xfd, 0xbf, 0xe5, 0xff, 0xcb, 0x54, 0xec, 0x41, 0x23, 0x7b, 0xc0, 0xeb, 0x55, 0xb8, 0x69, 0xd7, 0x57, 0xf1, 0x83, 0x13, 0x88, 0x55, 0xd9, 0x73, 0xdc, 0x93, 0xee, 0x23, 0xe3, 0xe9}}
   131  	return a, nil
   132  }
   133  
   134  // Asset loads and returns the asset for the given name.
   135  // It returns an error if the asset could not be found or
   136  // could not be loaded.
   137  func Asset(name string) ([]byte, error) {
   138  	canonicalName := strings.Replace(name, "\\", "/", -1)
   139  	if f, ok := _bindata[canonicalName]; ok {
   140  		a, err := f()
   141  		if err != nil {
   142  			return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
   143  		}
   144  		return a.bytes, nil
   145  	}
   146  	return nil, fmt.Errorf("Asset %s not found", name)
   147  }
   148  
   149  // AssetString returns the asset contents as a string (instead of a []byte).
   150  func AssetString(name string) (string, error) {
   151  	data, err := Asset(name)
   152  	return string(data), err
   153  }
   154  
   155  // MustAsset is like Asset but panics when Asset would return an error.
   156  // It simplifies safe initialization of global variables.
   157  func MustAsset(name string) []byte {
   158  	a, err := Asset(name)
   159  	if err != nil {
   160  		panic("asset: Asset(" + name + "): " + err.Error())
   161  	}
   162  
   163  	return a
   164  }
   165  
   166  // MustAssetString is like AssetString but panics when Asset would return an
   167  // error. It simplifies safe initialization of global variables.
   168  func MustAssetString(name string) string {
   169  	return string(MustAsset(name))
   170  }
   171  
   172  // AssetInfo loads and returns the asset info for the given name.
   173  // It returns an error if the asset could not be found or
   174  // could not be loaded.
   175  func AssetInfo(name string) (os.FileInfo, error) {
   176  	canonicalName := strings.Replace(name, "\\", "/", -1)
   177  	if f, ok := _bindata[canonicalName]; ok {
   178  		a, err := f()
   179  		if err != nil {
   180  			return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
   181  		}
   182  		return a.info, nil
   183  	}
   184  	return nil, fmt.Errorf("AssetInfo %s not found", name)
   185  }
   186  
   187  // AssetDigest returns the digest of the file with the given name. It returns an
   188  // error if the asset could not be found or the digest could not be loaded.
   189  func AssetDigest(name string) ([sha256.Size]byte, error) {
   190  	canonicalName := strings.Replace(name, "\\", "/", -1)
   191  	if f, ok := _bindata[canonicalName]; ok {
   192  		a, err := f()
   193  		if err != nil {
   194  			return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err)
   195  		}
   196  		return a.digest, nil
   197  	}
   198  	return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name)
   199  }
   200  
   201  // Digests returns a map of all known files and their checksums.
   202  func Digests() (map[string][sha256.Size]byte, error) {
   203  	mp := make(map[string][sha256.Size]byte, len(_bindata))
   204  	for name := range _bindata {
   205  		a, err := _bindata[name]()
   206  		if err != nil {
   207  			return nil, err
   208  		}
   209  		mp[name] = a.digest
   210  	}
   211  	return mp, nil
   212  }
   213  
   214  // AssetNames returns the names of the assets.
   215  func AssetNames() []string {
   216  	names := make([]string, 0, len(_bindata))
   217  	for name := range _bindata {
   218  		names = append(names, name)
   219  	}
   220  	return names
   221  }
   222  
   223  // _bindata is a table, holding each asset generator, mapped to its name.
   224  var _bindata = map[string]func() (*asset, error){
   225  	"1557732988_initialize_db.down.sql": _1557732988_initialize_dbDownSql,
   226  
   227  	"1557732988_initialize_db.up.sql": _1557732988_initialize_dbUpSql,
   228  
   229  	"static.go": staticGo,
   230  }
   231  
   232  // AssetDir returns the file names below a certain
   233  // directory embedded in the file by go-bindata.
   234  // For example if you run go-bindata on data/... and data contains the
   235  // following hierarchy:
   236  //     data/
   237  //       foo.txt
   238  //       img/
   239  //         a.png
   240  //         b.png
   241  // then AssetDir("data") would return []string{"foo.txt", "img"},
   242  // AssetDir("data/img") would return []string{"a.png", "b.png"},
   243  // AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
   244  // AssetDir("") will return []string{"data"}.
   245  func AssetDir(name string) ([]string, error) {
   246  	node := _bintree
   247  	if len(name) != 0 {
   248  		canonicalName := strings.Replace(name, "\\", "/", -1)
   249  		pathList := strings.Split(canonicalName, "/")
   250  		for _, p := range pathList {
   251  			node = node.Children[p]
   252  			if node == nil {
   253  				return nil, fmt.Errorf("Asset %s not found", name)
   254  			}
   255  		}
   256  	}
   257  	if node.Func != nil {
   258  		return nil, fmt.Errorf("Asset %s not found", name)
   259  	}
   260  	rv := make([]string, 0, len(node.Children))
   261  	for childName := range node.Children {
   262  		rv = append(rv, childName)
   263  	}
   264  	return rv, nil
   265  }
   266  
   267  type bintree struct {
   268  	Func     func() (*asset, error)
   269  	Children map[string]*bintree
   270  }
   271  
   272  var _bintree = &bintree{nil, map[string]*bintree{
   273  	"1557732988_initialize_db.down.sql": &bintree{_1557732988_initialize_dbDownSql, map[string]*bintree{}},
   274  	"1557732988_initialize_db.up.sql":   &bintree{_1557732988_initialize_dbUpSql, map[string]*bintree{}},
   275  	"static.go":                         &bintree{staticGo, map[string]*bintree{}},
   276  }}
   277  
   278  // RestoreAsset restores an asset under the given directory.
   279  func RestoreAsset(dir, name string) error {
   280  	data, err := Asset(name)
   281  	if err != nil {
   282  		return err
   283  	}
   284  	info, err := AssetInfo(name)
   285  	if err != nil {
   286  		return err
   287  	}
   288  	err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
   289  	if err != nil {
   290  		return err
   291  	}
   292  	err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
   293  	if err != nil {
   294  		return err
   295  	}
   296  	return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
   297  }
   298  
   299  // RestoreAssets restores an asset under the given directory recursively.
   300  func RestoreAssets(dir, name string) error {
   301  	children, err := AssetDir(name)
   302  	// File
   303  	if err != nil {
   304  		return RestoreAsset(dir, name)
   305  	}
   306  	// Dir
   307  	for _, child := range children {
   308  		err = RestoreAssets(dir, filepath.Join(name, child))
   309  		if err != nil {
   310  			return err
   311  		}
   312  	}
   313  	return nil
   314  }
   315  
   316  func _filePath(dir, name string) string {
   317  	canonicalName := strings.Replace(name, "\\", "/", -1)
   318  	return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
   319  }