plugeth/signer/fourbyte/4byte.go

272 lines
7.6 MiB
Go
Raw Normal View History

// Code generated by go-bindata. DO NOT EDIT.
// sources:
// 4byte.json (5.505MB)
package fourbyte
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 __4byteJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\xbd\x49\x73\x23\xb9\xf1\x37\xfc\x5d\xe6\xd4\x6f\xc4\x1c\x0a\xa8\xdd\x37\x92\xa2\xba\xe5\xd1\x42\x8b\xec\xee\xb1\x1d\xff\x60\x60\x49\x90\x65\x15\x0b\x74\x2d\x52\x73\xde\x2f\xff\x04\x12\x40\x6d\xa2\x7a\xc6\x3e\x8c\xda\x04\x6a\x03\x12\xb9\xfe\x32\xf3\xff\xff\x25\xb0\xff\x23\xbf\xfc\xed\x17\x26\x84\xee\xaa\x76\x5f\x54\x4a\xef\x6b\xdd\xb2\x16\xf6\x6d\x51\xc1\xa7\xae\xa8\x5a\x1a\x27\xff\xdf\x2f\xbf\xfa\xe9\xf4\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ba\x72\x41\x36\x9a\xcf\x7f\xf9\xdb\x2f\xaf\x05\xe3\x25\xec\xcf\x75\x51\xb5\x1f\x3c\x68\x74\x85\xd9\xd2\x73\x09\xf2\x00\x7b\xd5\xb5\x5d\x3d\x5f\x9c\xf9\x23\x40\xda\xd3\x02\x4d\xb3\x17\x5a\xe8\xaa\x6b\xf7\xac\x64\xf5\xe9\xfd\x49\x51\xb1\xd9\xf3\x23\xd4\xf5\x65\xdf\xea\x93\xae\xeb\x19\xc1\x24\xd1\xaf\xd3\xa3\xa3\x32\x73\xb6\xe0\xbf\x5d\x51\x83\x34\x7b\x2a\x74\xf5\xea\xe8\xfc\xd7\x29\xb9\x67\x79\x62\xe8\xa3\x35\x67\xc9\xcf\xc0\x57\x9d\xcd\x63\xc0\x91\xda\x8b\x43\xcd\x5a\xf0\xdb\x7a\xf3\x8f\x6f\xef\x36\x95\x50\x95\x99\xf5\xbb\x67\x6d\xd1\x9d\x7e\xf7\x47\x97\x44\x71\x60\x9f\xd4\xb2\xf2\xae\x52\x20\x5a\x90\xfd\x60\x6c\x69\xf0\x66\xfd\x6d\xbf\x5b\x2f\x1e\xf6\xdb\xdd\xe2\xb7\xb5\x1f\xa5\x01\xa3\xe6\x8b\xbe\xb0\xb2\xc5\x43\xbf\x28\xcb\xa7\x33\xd4\xac\x2d\x74\xd5\x4f\x4a\x52\x66\x68\xe9\x00\xed\x57\xb3\x63\xfd\xcf\x40\x42\xbb\x7e\xe2\x65\xd1\xbe\x2c\x75\xd3\xfc\xa3\x83\xa6\xfd\xc4\xa4\xac\xa1\xf1\xf4\x4d\xd3\x34\x34\xd4\xc5\x0a\xa1\xab\xb6\x66\x62\xb8\x03\x63\x38\x52\x17\xe2\xd8\x42\xd3\xbe\xbc\xf4\x8b\xff\xf1\x7a\x51\x41\xa4\xe1\x5f\x7f\xd7\xc7\xaa\xd1\xd5\x6b\x51\x96\xe0\x6f\x18\x25\x82\x28\xbf\x12\x37\x35\x3b\xe8\xaa\xf1\x63\x31\x8d\x95\xa1\x8c\x5a\xf3\x95\x2e\xfa\x8f\x8b\x59\x8c\x7c\x6f\xa5\x59\x59\x88\x23\x2b\x2a\x5c\x87\x7e\x98\x2b\x9e\xe2\xb7\x9f\x4e\x97\x87\xae\x29\xc4\xbd\x16\x2f\xbb\xe2\xd4\x3f\x33\x25\xa1\x32\x24\x7a\x57\x15\x6d\x61\x58\x95\xfb\xfa\xab\x0c\xc7\xfc\x1d\x11\x54\x1a\x13\x6e\x96\xff\x5e\x1f\xd6\x3f\x5a\xa8\xe4\x96\x95\x73\x86\x9e\x26\x79\x64\x5e\xb0\xab\x4a\x2d\x5e\xa0\xee\x9f\x9b\x48\x48\x2d\xb7\x33\xa7\x69\x0b\x65\x09\xf5\xca\x70\xfb\x12\xef\x40\x92\x5f\xfd\x9b\x4c\xf7\x23\x8b\x25\x8d\x71\x21\xba\x4a\x86\xfe\x76\x99\xca\xa4\xc2\xdd\x64\xd5\x01\xee\x84\xbe\x2d\xaa\xa2\x39\xce\x5e\x26\x8f\x48\x62\x78\xd5\x6e\xfd\xfc\xb0\xdd\x2f\x1e\x6f\xf6\xab\xa7\xc7\x9b\xbb\xdd\xdd\xd3\xe3\xd6\xdf\x29\x4f\xa2\xc4\x48\x85\x45\x27\x0c\x15\xad\x6a\x60\x86\x1e\xfd\xe7\xff\xd9\xf2\xcc\x1e\x98\x05\x21\x47\x96\xf7\x02\x9b\x5a\xff\x07\x44\x4f\x5e\x63\x1a\xb9\x72\x61\x2e\xf0\x7b\xde\x8a\xf6\x28\x6b\xf6\x86\xbb\xda\x84\xb3\xef\x61\x11\x4b\x0d\x07\xe3\xcc\x90\xf0\x5d\x25\xe1\xc7\x9f\xb0\x7d\x26\x88\x32\xf7\x65\x52\x9e\x59\xdd\x36\x96\xa1\x3b\x2e\xf4\x93\xcb\xa4\x48\xcc\x6e\xf1\xee\xb2\x6f\x8f\xb0\x47\xae\xd0\x4c\x05\x24\x4f\x12\x69\x76\xba\x81\xf6\x4e\xe8\x6d\xcb\xea\x16\x09\x6d\x7a\x27\x9e\xa7\xd4\x08\x81\x87\xa2\x6a\x8b\xea\xb0\x9a\x9d\x29\x0e\x61\x6c\x86\xe1\xc7\xd9\xb0\xa8\xa5\x21\x1a\x3f\x26\x08\x65\xe6\xdd\x77\x4f\xbb\xc5\xfd\x7e\xf7\xf4\xdb\xfa\xb1\xd9\
func _4byteJsonBytes() ([]byte, error) {
return bindataRead(
__4byteJson,
"4byte.json",
)
}
func _4byteJson() (*asset, error) {
bytes, err := _4byteJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "4byte.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x56, 0x18, 0x15, 0x8, 0x49, 0xac, 0xa1, 0xbf, 0xc2, 0xcb, 0x21, 0x40, 0xee, 0xff, 0xc2, 0xba, 0x46, 0xc0, 0xe1, 0x85, 0xa1, 0x44, 0xe7, 0xca, 0xd6, 0xfd, 0x44, 0xf9, 0x4d, 0xf, 0x34, 0x4d}}
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){
"4byte.json": _4byteJson,
}
// 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{
"4byte.json": {_4byteJson, 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, "/")...)...)
}