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