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