chirpnest/bindata.go

316 lines
76 KiB
Go
Raw Normal View History

2019-12-29 08:50:56 +01:00
// Package main Code generated by go-bindata. (@generated) DO NOT EDIT.
// sources:
// data/code.json
// data/code_obj_sub_type.json
// data/code_obj_type.json
// data/msg_rules.json
2019-12-26 06:08:00 +01:00
package main
2019-12-29 08:50:56 +01:00
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 os.FileInfo
}
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
}
// Name return file name
func (fi bindataFileInfo) Name() string {
return fi.name
}
// Size return file size
func (fi bindataFileInfo) Size() int64 {
return fi.size
}
// Mode return file mode
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}
// ModTime return file modify time
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}
// IsDir return file whether a directory
func (fi bindataFileInfo) IsDir() bool {
return fi.mode&os.ModeDir != 0
}
// Sys return file is sys mode
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _dataCodeJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func dataCodeJsonBytes() ([]byte, error) {
return bindataRead(
_dataCodeJson,
"data/code.json",
)
}
func dataCodeJson() (*asset, error) {
bytes, err := dataCodeJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "data/code.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1577594077, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _dataCode_obj_sub_typeJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x9b\x4d\x73\x1b\x2d\x12\xc7\xcf\xc9\xa7\xa0\x7c\x7e\x0e\x96\xe3\xd7\xbd\x29\x71\xe2\x64\x6b\xf3\xbc\xd8\xf1\xe6\xb0\xb5\x35\x85\x66\x5a\xd2\x24\x33\xa0\x00\x23\x45\xb5\xb5\xdf\x7d\x0b\xe6\x45\x1a\xba\x71\xa6\x55\xb5\x47\x83\xeb\xff\xa3\x81\x7f\xc3\x00\xfa\xd7\xeb\x57\xff\x79\xfd\xea\xd5\x59\x59\x9c\xfd\x4d\x9c\xcd\xce\x67\x67\xbf\x85\x3f\x95\xab\xb2\xb6\xac\xb1\x60\xda\x42\x25\x6b\xf0\x25\xcf\x43\x89\x5e\x7c\xcb\xdc\x7e\x03\xdd\xbf\xce\xce\x5e\xbf\xfa\xef\x6f\x23\xc5\x0b\x42\x71\xd5\x94\x55\x31\x96\x7c\x38\x14\x45\x9a\x17\x58\xf3\x0d\xd5\x4a\xf5\x5d\xe9\x9d\x8a\x1a\x7a\x5c\x18\xe9\xbe\xa1\x74\x2f\x90\xee\x4e\x46\xc1\x7f\x95\x46\x18\xd8\x68\xe3\xa6\xcb\x5e\xd2\x5d\x90\x21\xf1\xd0\x0d\x56\xec\x4e\x60\x5c\x21\x46\xab\x90\x19\xf8\x31\x86\xfc\x59\xc9\x3d\x98\x23\x88\x30\xf0\xa3\x01\xcb\x80\x5d\xa7\x60\x32\xff\xfe\x2b\xd8\xf0\x2f\x53\x40\x37\xb8\xe7\xb2\x5f\xc4\xb5\x8a\xfb\x90\x1f\xde\x6d\x9a\x9a\x0a\x10\x53\x59\x71\xde\x21\x62\x68\x72\x66\xc0\x8e\x71\x7f\xf9\x62\x61\xc0\x36\xd5\xf4\x80\x66\xe7\x48\xbe\x68\xa0\xca\x96\xe5\x6a\xed\xc6\xfa\xf7\x0d\x54\x22\x94\xb3\x21\xd8\x94\x6b\x30\x1a\x8f\xd3\x47\x30\x5a\xd8\xa6\xae\xa5\xd9\xb3\xc7\x66\x86\x2d\x1a\x28\x68\x5c\x46\x14\xce\x58\xcc\xde\x20\x42\x0d\xa9\x28\xd6\x7e\xa4\x4f\x8e\x05\xe7\x85\x1a\x52\x91\x8c\x48\xac\x78\x70\x66\x28\xd5\x16\x07\xf4\x49\x6d\x41\x39\x7d\x4a\x1c\x38\x1d\x78\x02\x0a\xe4\x40\x60\xb5\x1f\xe7\x80\x4d\x59\x55\x72\x05\x59\xa9\xf2\xc8\x8c\x6d\x85\x28\x55\xae\xeb\x52\xad\xa6\x43\xb0\xe5\x7b\xc8\x4a\xd3\x8c\xbe\x7c\x8a\x3a\xb6\x77\xaf\xee\xca\x1a\x74\xe3\x68\xc4\xa8\x72\x02\xe7\x02\xfb\xbc\xe7\xec\x4a\x45\x33\x86\x8a\x29\xfa\xd8\xe2\xbd\x7e\xa5\xad\xa5\x01\x87\x9a\x29\x04\x6c\x6f\x67\xca\x45\xe3\x88\xc1\xfe\xd2\x56\xf0\x07\xfb\x02\x3b\xbc\x87\xa0\x39\xdb\x43\x64\xee\xb7\x12\x15\x14\x2b\xa0\xf7\x29\x24\x08\x1b\x5c\x36\xb9\x2b\xb5\xca\xa4\x52\xba\x51\x39\x8c\x69\xf3\xb6\x56\x8c\x6b\xa7\x90\xb0\xc9\x7b\x52\xb3\x29\xb0\xd9\x7b\x50\xb3\x29\xa4\x03\xb6\xe3\x2f\xb0\xe3\x8f\x71\xa8\x17\x23\xdc\xa1\x33\x6b\x50\x0c\x2a\xce\x04\xde\x21\xc4\xa0\x95\x35\x88\xf9\x89\x10\x9c\x09\x02\x04\x75\x61\x80\x3c\x72\x3b\x0e\x67\x82\x38\xbf\x3c\x4c\xcf\x2b\x6f\x08\xbf\x87\x29\x1a\x6f\x51\x0e\x65\x53\x54\x89\x1d\xbb\xce\xfa\xfd\xc8\x8f\xb8\xb5\x22\xd4\xf8\x9e\x98\x4e\xc0\x2e\x5f\x4a\xeb\xa8\xfd\xc8\xdc\x80\x92\xc2\xd7\x8a\xa3\xda\x29\x0c\x6c\xf2\x95\xce\xa4\x97\x43\x11\x1c\x95\x4e\x51\xc6\xae\x76\x7a\x13\x4d\x8e\xbe\x60\x8a\x1e\xf6\x6e\x0d\xaa\x19\x0b\x7e\x1e\x4a\xa6\x28\x62\x7b\x2e\x9a\x3d\x1e\xbc\x27\xa8\x2a\xde\xc0\x61\x07\x5a\xa8\x2a\xac\xfc\xb6\xd9\xf3\x84\xb1\xeb\xb4\x29\xc0\x2c\xb4\xfe\x8e\xd5\xff\xe8\xab\x78\x0c\xec\xbd\x03\x43\xe6\x55\x8a\x31\x67\x6c\x56\x2e\xb1\x23\x77\xa5\x5b\x17\x46\xee\x70\x18\x5f\xbb\x1a\x56\x14\x97\xd8\x9d\x03\x21\xd7\x05\x24\x10\xef\x86\xaa\x29\x0c\xe2\x3b\x78\x88\x22\xdf\x26\xa3\xc8\xa1\xdc\x32\x96\xc7\x4b\x6c\x51\xeb\x74\x4e\x0c\xf8\x93\x2f\xe6\x75\x13\x36\x69\xab\x8d\x16\x8b\x56\x9b\x35\xc8\x84\x61\x4b\x9b\xe3\x66\x7f\x2e\x6d\xce\x6b\x35\x36\x6e\x50\x46\x8d\x0e\xca\xac\x36\x63\xe7\x36\xca\xaf\xd7\xe8\x0c\xe2\xd9\x17\x9f\x72\x04\x71\x49\xac\x9c\x4d\xea\x63\xfd\x8b\x91\x05\x88\x96\xf5\x55\x1a\xf1\xd8\x7e\x34\xb3\x3a\x0b\xfb\x79\xe0\x11\xfb\x38\x92\xc7\xe9\xc2\x2b\xec\x6d\x72\xf7\xfe\x00\x0a\x4c\x99\xb3\x77\xef\x57\x2f\xac\xbb\x28\x9e\x07\x2d\xda\xa3\x00\x56\x04\xd8\xd7\x2b\xa3\x2b\xb0\xc4\xba\xde\x94\x55\x21\x42\x25\x6b\x50\xae\x88\x65\xb7\x45\xe0\x10\x8e\x10\xac\x28\x88\xe3\xb4\x3e\x6f\x50\x91\xf4\xc9\x83\x19\x08\x36\x79\x47\x91\x55\xbe\x4e\x62\xe6\x55\xbe\xe6\x71\xb0\xe5\x3b\x0e\x9d\x53\x3a\x0e\x3b\xb5\x5c\x11\x47\x69\x7d\xaf\xa5\x31\x8f\xc0\xa4\x10\x47\x67\x2d\x65\x23\xa9\x34\xd0\x61\xfe\x94\x4c\xef\x5f\x11\xfb\xe8\x96\xa3\x1d\x35\x38\xa1\x4e\xfc\xe1\x78\x63\x73\x8d\x1d\xdf\xcf\x01\xb5\x27\x26\x74\x4b\x99\xab\x3d\x6b\x3e\x5f\x13\xbe\x4f\xac\x83\x0f\xfc\x85\xf0\x9a\xf0\x7c\x62\x25\x7c\xe0\x2f\x85\xd7\xd8\xee\x8b\xc6\xee\xe3\xcd\x60\x5f\x32\x45\x11\xbb\xdb\xdb\x3a\xd1\x21\x8f\x60\x75\x63\x72\xb0\xe2\x84\x9e\x21\xbe\x99\xbd\xb5\x13\x28\xef\x6c\xa8\xf7\xa7\x80\x12\xab\x7a\x
func dataCode_obj_sub_typeJsonBytes() ([]byte, error) {
return bindataRead(
_dataCode_obj_sub_typeJson,
"data/code_obj_sub_type.json",
)
}
func dataCode_obj_sub_typeJson() (*asset, error) {
bytes, err := dataCode_obj_sub_typeJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "data/code_obj_sub_type.json", size: 13483, mode: os.FileMode(420), modTime: time.Unix(1577594077, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _dataCode_obj_typeJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\xd2\x4d\x4b\xc4\x30\x10\xc6\xf1\x73\xf2\x29\x4a\xcf\x7b\x70\x7d\xd7\xab\xa8\x28\x78\x50\x5c\x3c\x88\x2c\xe9\x76\x2c\x91\x36\xa9\x79\xc1\x05\xd9\xef\xbe\x24\x39\x4d\x9e\x1e\xfb\x2f\xbf\x61\x68\xe7\x53\x8a\x7f\x29\x44\xab\xfb\xf6\xb6\x69\xd7\xed\x2a\x3f\x98\x30\x6e\x4b\x89\x9e\x5c\x89\x46\x4d\x94\xca\x26\x15\x29\x0e\x2b\x26\x4f\x41\x0e\x51\x8f\x3d\xa7\x8f\x39\x81\x3d\x03\x3b\xf9\x81\xcb\x17\xf2\x5e\x0d\x84\xf6\x1c\xec\x9f\xaa\x16\xfe\x50\x0b\xfb\x5e\x2c\xb9\xad\xa3\xd9\xba\x00\xbc\x79\x2b\x1d\xa6\x5c\xc2\x94\x1f\xdb\x71\xfe\x6c\x3b\x74\x57\xe0\x74\xa0\x89\xc3\xa7\x54\x40\x5e\x83\xdc\x29\x1f\x46\xe2\xf6\xae\x34\xd0\x37\xa0\xbf\x95\xae\x3e\xd7\x43\x2a\x20\xd7\x27\x78\x1a\x46\x5b\xc3\xed\xbb\x53\x3d\x35\x9b\xfc\x02\x47\xe0\x75\x05\xa7\xbb\x18\xa8\x1e\x52\x22\x0e\xc0\x23\xdb\xcf\xdc\xde\xef\x67\x72\x9a\xcc\x6e\x89\xe3\x9d\xfd\x46\xf2\xd5\xef\x7e\xcd\x49\x8a\x83\xfc\x3a\x06\x00\x00\xff\xff\xd6\xc0\x82\xc0\x1c\x03\x00\x00")
func dataCode_obj_typeJsonBytes() ([]byte, error) {
return bindataRead(
_dataCode_obj_typeJson,
"data/code_obj_type.json",
)
}
func dataCode_obj_typeJson() (*asset, error) {
bytes, err := dataCode_obj_typeJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "data/code_obj_type.json", size: 796, mode: os.FileMode(420), modTime: time.Unix(1577594077, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _dataMsg_rulesJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x6d\xaf\x1c\xc7\x75\x27\xfe\xda\xfe\x14\x25\xe6\x0f\xf0\x5e\xf2\xde\x2b\x3e\x4b\xe2\x3f\x20\xf7\x52\x14\x25\x66\x45\x99\x16\x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cf\x76\xe6\xb5\x6d\xf2\x32\xcb\x76\xc0\x67\x19\x8e\xfd\x5a\x33\xa7\x41\x7f\x60\x0d\x3c\xc6\xe6\xf4\xc3\x6f\x37\x72\x7a\xf5\x85\x03\xa7\x56\x0b\xe3\xc6\x71\xbc\x63\x0a\x71\x18\xe2\x09\x68\x57\xf6\x4e\x90\xa1\xf1\x89\x82\xf1\x6f\x7c\x10\x09\xf1\xaa\xbf\x7c\x70\x6a\x77\x3d\xf1\x9c\xbb\xb0\x21\xf1\xdc\x55\xd5\x32\xc5\xdc\x34\xe2\xed\x52\x06\x71\x4f\x3a\x2f\x66\xd6\xe9\x42\x18\x3b\x8b\xc4\x8c\xed\x13\xcd\xe0\x31\xb1\x8d\xe3\xb5\xfd\xf4\xdc\x0f\x76\x89\x31\xdc\x52\xa6\x09\xd0\xfd\x18\x5b\x5e\x97\xf3\xee\x37\x9a\xd0\x2d\x6b\x42\x79\xe5\xe0\x34\xff\xeb\x23\x90\xe9\x4b\x17\xe8\xa5\x2c\x33\xf7\x40\x86\x12\x9c\x18\x5b\x07\xb9\xf4\x21\x7e\x2a\xfe\x8c\xc3\x78\xf6\x5f\x3e\xef\xfd\xf2\x01\x3c\x0a\xed\xe0\x68\x75\x06\xce\xd6\xb9\x37\x36\x5c\x9e\xdb\x4a\x6b\x39\x01\x71\xd3\xe4\x4b\xab\xf4\x91\x6d\xc4\x0c\x1c\xe0\x61\xb6\x5a\x2b\x33\x11\xd2\xd9\xc6\x14\xc8\xe4\xe6\xc8\xf3\x4a\xeb\x3c\x88\x59\x09\xf4\x6f\x61\x6c\x50\x39\x14\x62\x63\xf6\xcd\xec\x98\xe7\x29\xec\x58\x1c\x7c\xca\xbf\x47\xe2\xdc\xb9\x65\xad\xd1\x6a\x52\x86\xc7\xf7\xac\x1e\xd7\x32\x9f\x3e\xbe\x0e\xe0\x4a\xeb\xcc\xe3\xeb\x4e\x4e\xac\xf1\xb9\xd4\xf0\xf8\x4e\x29\xdd\x34\x00\x84\xf2\xf1\x6d\x1b\x64\xb0\x8f\xdf\x53\x93\xd2\x80\x0f\xbb\xbb\x82\x3f\x26\x82\x9b\xe3\x0c\x82\x15\x75\x9c\xb1\x14\xda\x22\xaf\x3a\xe2\x7f\x1f\x88\xbb\x56\xf8\x60\x6b\x51\xaa\x4a\xe4\x5a\xe5\x53\xf1\xfa\xc4\x0e\xac\xef\xd9\x4d\xd7\xf7\x5d\xbb\xb4\xac\xc3\xdf\x3c\xf7\xd6\x4b\xee\xd9\xca\xb7\x71\xcb\xb4\x1a\x07\xd1\xd4\xbc\x43\x7e\x66\x5d\x21\xa4\x29\x44\x5e\x4a\x87\x93\x0e\x24\x9f\x8e\x94\xd5\x32\x58\x77\x30\x34\xbd\x37\x5f\x72\x28\xf7\x94\x59\x33\x16\xdf\xe4\x39\x78\x3f\x6e\xb4\x9e\x8b\x02\xc6\x20\xc3\x6f\x4b\x
func dataMsg_rulesJsonBytes() ([]byte, error) {
return bindataRead(
_dataMsg_rulesJson,
"data/msg_rules.json",
)
}
func dataMsg_rulesJson() (*asset, error) {
bytes, err := dataMsg_rulesJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "data/msg_rules.json", size: 60991, mode: os.FileMode(420), modTime: time.Unix(1577594077, 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, fmt.Errorf("Asset %s not found", name)
}
// 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
}
// 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, fmt.Errorf("AssetInfo %s not found", name)
}
// 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){
"data/code.json": dataCodeJson,
"data/code_obj_sub_type.json": dataCode_obj_sub_typeJson,
"data/code_obj_type.json": dataCode_obj_typeJson,
"data/msg_rules.json": dataMsg_rulesJson,
}
// 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, 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{
"data": &bintree{nil, map[string]*bintree{
"code.json": &bintree{dataCodeJson, map[string]*bintree{}},
"code_obj_sub_type.json": &bintree{dataCode_obj_sub_typeJson, map[string]*bintree{}},
"code_obj_type.json": &bintree{dataCode_obj_typeJson, map[string]*bintree{}},
"msg_rules.json": &bintree{dataMsg_rulesJson, 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
}
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
if err != nil {
return err
}
return nil
}
// 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, "/")...)...)
}