mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 22:26:30 +00:00
b27779aa4e
This commits add some endpoints to store mailserver request gaps, and provides 4 endpoints: ``` AddMailserverRequestGaps(gaps []MailserverRequestGap) error GetMailserverRequestGaps(chatID string) []MailserverRequestGap DeleteMailserverRequestGaps(ids []string) error DeleteMailserverRequestGapsByChatID(id string) error ```
320 lines
12 KiB
Go
320 lines
12 KiB
Go
// Code generated by go-bindata. DO NOT EDIT.
|
|
// sources:
|
|
// 0001_app.down.sql (314B)
|
|
// 0001_app.up.sql (2.528kB)
|
|
// doc.go (74B)
|
|
|
|
package migrations
|
|
|
|
import (
|
|
"bytes"
|
|
"compress/gzip"
|
|
"crypto/sha256"
|
|
"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 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 __0001_appDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\xce\xbf\x0e\x82\x40\x0c\xc7\xf1\x9d\xa7\xe0\x3d\x98\x34\x30\x98\x18\x35\xc6\xc1\xad\xa9\x47\x85\x46\xb8\x9e\x6d\xf1\xcf\xdb\x3b\xca\x45\x5c\x3f\xfd\xe5\x9b\xd6\xc7\xfd\xa1\x3c\xad\xd6\xdb\xa6\x34\x72\xe7\xd8\x59\x55\xcc\x10\x43\x90\x29\x7a\x8e\x17\x95\xa7\x91\x2e\x23\xf4\x6c\x2e\xfa\xce\x8e\x2d\xa6\x94\xcf\x13\xe9\xc8\x66\x2c\x31\x77\x57\x8c\x76\xfd\x89\x0f\x12\x6e\xcb\x9f\x81\x0b\x2c\x9c\x47\xe4\xc1\x48\x1f\xdf\xd2\x66\x57\x37\xe7\x99\x83\xd2\x7d\x22\x73\xe8\x30\x19\x84\x1e\x1d\xb8\x05\x6e\x5f\x7f\x3a\xd9\xbe\x2a\x3e\x01\x00\x00\xff\xff\x07\x9e\x75\xc1\x3a\x01\x00\x00")
|
|
|
|
func _0001_appDownSqlBytes() ([]byte, error) {
|
|
return bindataRead(
|
|
__0001_appDownSql,
|
|
"0001_app.down.sql",
|
|
)
|
|
}
|
|
|
|
func _0001_appDownSql() (*asset, error) {
|
|
bytes, err := _0001_appDownSqlBytes()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info := bindataFileInfo{name: "0001_app.down.sql", size: 314, mode: os.FileMode(0644), modTime: time.Unix(1567586064, 0)}
|
|
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x86, 0x70, 0x13, 0xfb, 0x14, 0x28, 0x91, 0x3f, 0x97, 0x54, 0x9b, 0xab, 0x17, 0xb0, 0xdd, 0x3c, 0xa9, 0x40, 0x72, 0x45, 0xec, 0xf6, 0x16, 0x47, 0xbc, 0xd2, 0x30, 0x5d, 0x14, 0x0, 0x50, 0x19}}
|
|
return a, nil
|
|
}
|
|
|
|
var __0001_appUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x56\xdf\x72\xba\x38\x18\xbd\xcf\x53\x7c\x97\x3a\xc3\x1b\xf4\x0a\x35\x5a\x66\x59\xd8\x45\xdc\xb6\x57\x99\x28\x51\x19\x81\xa4\x49\xac\xf5\xed\x77\x42\xf8\xa7\x02\xb6\xf3\xbb\x23\xc9\xc9\xf1\x9c\x93\x2f\x5f\x9c\x47\xd8\x8d\x31\xc4\xee\xcc\xc7\xe0\x2d\x21\x08\x63\xc0\xef\xde\x3a\x5e\x83\x62\x5a\xa7\xc5\x41\xc1\x04\xe9\xab\x60\xf0\x9f\x1b\xcd\x5f\xdd\x08\xfe\x89\xbc\xbf\xdd\xe8\x03\xfe\xc2\x1f\x0e\xfa\xa2\xd9\x99\xc1\xcc\x0f\x67\x68\x0a\x6f\x5e\xfc\x1a\x6e\x62\x88\xc2\x37\x6f\xf1\x82\xd0\x08\x39\xdd\xed\xf8\xb9\xd0\x86\x9c\x26\x89\x64\x4a\xf5\xf3\x5f\x68\x96\x31\x0d\xb3\x30\xf4\xb1\x1b\x38\x68\x77\xa4\x9d\x51\xa9\x2b\xc6\xef\xb1\x83\x94\xe6\x92\x1e\xea\x91\x38\x6f\x4f\xec\x5a\xea\x72\x90\xa0\xfa\x58\xcd\x17\x34\xaf\x21\x3b\x9e\x71\x59\x7e\x0f\x2b\xdf\x04\xde\xbf\x1b\x0c\x5e\xb0\xc0\xef\x70\x2e\xd2\xcf\x33\x23\x56\x11\xa9\x55\x87\x41\xc7\x8b\x5d\x9b\xc2\xdb\x2b\x8e\x70\x33\x7c\x19\xa3\x33\x86\xfa\xc9\xcc\x4a\x43\x55\x0e\xc6\x23\xdd\x4a\x7e\x51\x4c\x9a\x48\xd3\xa4\x34\x76\x1b\x65\xe3\xbd\xdc\x14\x6c\x7c\xdf\x41\x3a\xcd\x99\xd2\x34\x17\xb0\x59\xaf\xbc\x55\x80\x17\x30\xf3\x56\x5e\x10\x3b\x28\xa1\x42\xd4\x49\xc3\x02\x2f\xdd\x8d\x1f\xc3\x9e\x66\x8a\x39\xe8\x98\x9a\xb8\xaf\x5e\x91\xb0\x6f\xd8\x04\x6b\xbb\xd3\x0b\x46\xa2\x1c\x53\x4c\x2a\x3e\x98\xa0\x6a\x8a\xd4\x0e\x5a\xa9\x35\xc6\x9e\xde\x32\x8c\xb0\xb7\x0a\x8c\xb3\x49\xbb\x67\x0a\x11\x5e\xe2\x08\x07\x73\xdc\xb2\x4f\xcc\x7c\x68\x3c\xf8\x38\xc6\x30\x77\xd7\x73\x77\x81\xd1\x93\x34\x8d\x7d\x13\x65\x9b\x5a\x27\xcc\xdf\xd9\x14\x4c\xe6\xa9\x52\x29\x2f\x0c\xa1\x21\x26\x7d\x67\xd1\xc2\xee\x57\xba\x66\x9b\xed\x37\x5e\x4b\xb5\x13\x3b\xdd\x6f\x75\x4c\xa0\x96\xb4\x50\x7b\x5b\x3a\x05\xd3\x17\x2e\x4f\xe6\x00\x9a\x83\xb5\x25\xd1\x3d\x0b\xaa\x8e\xcd\x7d\x6d\xa7\xef\x6f\x72\xbb\xb2\xcd\x4e\x64\x60\x93\xfe\xae\xae\xa9\x62\x45\xc2\x64\x0f\x42\xb2\x1d\x4b\x85\xae\x60\x19\x3f\x54\x5f\x37\x5d\xa9\x3f\xad\xd6\x8d\x53\x4b\xb8\xad\x91\x8c\xef\x4e\xaa\x0b\xb3\x90\x87\x0c\x1d\x34\x0f\x83\x75\x1c\xb9\x26\x88\xea\xea\xd6\xb1\x11\xc1\x64\x7d\x85\xcb\xef\x8a\xae\xbe\xef\x13\xc3\xe9\x54\x00\xa7\xfd\xad\xe9\xb3\x1a\xb4\xea\xfe\xf0\x50\x8a\x73\xbe\x65\xf2\x11\xde\xb9\xfa\xc3\x94\x8c\x26\x65\x0f\x68\x1a\xc0\xd2\xf5\xd7\xbd\x61\x94\x5a\x7b\xdd\xdf\x87\x3b\xb8\xd9\x2a\x7d\xc6\x61\x51\x4f\xb3\xab\xfb\x28\xd1\x9c\xfc\x2e\xc7\xf1\x2a\x1e\x8a\x53\x5d\x8b\x1d\x94\x8d\x73\xa4\xfe\x2a\xed\xe3\x15\x58\x83\x7e\x54\x83\x39\x15\x22\x2d\x0e\x64\xcf\x25\xa9\x2c\x37\x8e\x7b\x93\xac\xcb\xb0\x95\xf3\x9b\x8a\xcc\x69\x9a\x29\x26\xbf\x6c\xaf\x00\x00\x48\x93\xfe\x87\xdb\xac\x95\x5d\xee\x31\x46\xb3\x34\x1c\xb2\x59\x15\x54\xa9\x0b\x97\x0d\xb5\x9d\xdd\x67\x8c\xe9\x87\x1d\x3f\x97\x4c\x24\xfb\x3c\x33\xa5\xc9\x81\x0a\x2b\xff\x40\x05\xd9\x4b\x9e\xdf\xbc\x61\x78\x85\x6f\xf5\x18\x94\xe6\xe3\x98\xde\x17\x17\xa0\x7c\xdd\xef\xdf\x32\x04\x30\xf8\x7e\xd8\xff\x06\x03\x9a\x49\x45\x47\xd2\xe4\xdb\x94\xc7\xa0\xb5\x0a\x37\x7d\x41\xff\x07\x00\x00\xff\xff\x84\xe7\x47\xce\xe0\x09\x00\x00")
|
|
|
|
func _0001_appUpSqlBytes() ([]byte, error) {
|
|
return bindataRead(
|
|
__0001_appUpSql,
|
|
"0001_app.up.sql",
|
|
)
|
|
}
|
|
|
|
func _0001_appUpSql() (*asset, error) {
|
|
bytes, err := _0001_appUpSqlBytes()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info := bindataFileInfo{name: "0001_app.up.sql", size: 2528, mode: os.FileMode(0644), modTime: time.Unix(1567586073, 0)}
|
|
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x54, 0xe5, 0x59, 0x10, 0xba, 0x9c, 0x1b, 0xb7, 0x11, 0x7a, 0x4d, 0xe4, 0x4c, 0xc3, 0x8f, 0xab, 0x5, 0x1b, 0xcc, 0x80, 0x4a, 0xea, 0x35, 0xbd, 0x13, 0xed, 0xe1, 0x92, 0xd9, 0x25, 0xf3, 0xa9}}
|
|
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
|
|
}
|
|
|
|
info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0644), modTime: time.Unix(1566455715, 0)}
|
|
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){
|
|
"0001_app.down.sql": _0001_appDownSql,
|
|
|
|
"0001_app.up.sql": _0001_appUpSql,
|
|
|
|
"doc.go": docGo,
|
|
}
|
|
|
|
// 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, 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{
|
|
"0001_app.down.sql": &bintree{_0001_appDownSql, map[string]*bintree{}},
|
|
"0001_app.up.sql": &bintree{_0001_appUpSql, map[string]*bintree{}},
|
|
"doc.go": &bintree{docGo, 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 {
|
|
canonicalName := strings.Replace(name, "\\", "/", -1)
|
|
return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
|
|
}
|