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