1// Code generated by go-bindata. 2// sources: 3// config/config.yaml 4// DO NOT EDIT! 5 6package main 7 8import ( 9 "bytes" 10 "compress/gzip" 11 "fmt" 12 "io" 13 "io/ioutil" 14 "os" 15 "path/filepath" 16 "strings" 17 "time" 18) 19 20func bindataRead(data []byte, name string) ([]byte, error) { 21 gz, err := gzip.NewReader(bytes.NewBuffer(data)) 22 if err != nil { 23 return nil, fmt.Errorf("Read %q: %v", name, err) 24 } 25 26 var buf bytes.Buffer 27 _, err = io.Copy(&buf, gz) 28 clErr := gz.Close() 29 30 if err != nil { 31 return nil, fmt.Errorf("Read %q: %v", name, err) 32 } 33 if clErr != nil { 34 return nil, err 35 } 36 37 return buf.Bytes(), nil 38} 39 40type asset struct { 41 bytes []byte 42 info os.FileInfo 43} 44 45type bindataFileInfo struct { 46 name string 47 size int64 48 mode os.FileMode 49 modTime time.Time 50} 51 52func (fi bindataFileInfo) Name() string { 53 return fi.name 54} 55func (fi bindataFileInfo) Size() int64 { 56 return fi.size 57} 58func (fi bindataFileInfo) Mode() os.FileMode { 59 return fi.mode 60} 61func (fi bindataFileInfo) ModTime() time.Time { 62 return fi.modTime 63} 64func (fi bindataFileInfo) IsDir() bool { 65 return false 66} 67func (fi bindataFileInfo) Sys() interface{} { 68 return nil 69} 70 71var _configYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x56\x4d\x4f\x23\x39\x10\xbd\xe7\x57\x94\x98\xc3\x80\x06\x9a\xcb\x6a\xb4\xca\x0d\x01\xbb\xe2\xb0\x30\x22\x19\xed\x1e\x22\x21\xc7\xae\x4e\x7b\x71\xdb\x3d\x55\xd5\x24\x99\x5f\xbf\xb2\xdd\x01\xb2\xc2\x9d\xac\xf6\x80\x50\x5c\xee\xf7\x9e\x9f\xeb\xc3\x2d\x0a\x59\xcd\xd3\xc9\x27\xb8\x9f\xdd\xc0\x1f\xf9\xe7\xe4\x13\xcc\xd5\x33\x7a\xa8\x29\xb4\xd0\x88\x74\x3c\xbd\xbc\x5c\xaf\xd7\x95\x77\x1e\xc5\xa9\x25\x57\xde\x5d\x76\x14\xfe\x46\x2d\x7c\xe9\xd9\xc4\xbf\x0b\x1d\xbc\x50\x70\xd5\xaf\x55\x23\xad\x83\x93\xd9\xfc\x6a\x7e\x37\x9b\xdf\x5d\xc3\xf5\xc3\xf7\xfb\xf9\xed\xe3\xec\x64\x02\xe0\xfb\xb6\xfa\xd1\x23\x59\xe4\xe9\x04\x00\xa0\x41\xd7\x4d\xe1\xb3\xef\xdb\x25\x12\x84\x1a\x86\x28\x10\x6a\xb4\x2f\x68\xe0\x54\x1a\x04\xd1\x1d\x28\x6f\xa0\x37\xdd\xeb\x0e\x65\x0c\x1a\xe8\xbb\xb3\xea\x73\x82\x92\x6d\x87\x53\xd0\xa1\xf7\x82\x34\x01\x10\xdb\x62\xb5\x0c\x41\xf6\x98\xfa\x2e\xae\x83\xf5\xc0\xa8\x83\x37\x0c\x6c\xbd\x46\x88\x2c\x8c\xf4\x82\x04\x6b\xc5\xc0\xa2\x48\xd0\x54\xf0\xa7\x95\x06\x6a\x52\x5a\x6c\xf0\xca\xed\xbe\xda\xe3\x5c\xa9\x7e\x85\x3b\x46\x74\xaa\x63\x34\x7b\xa4\x89\xf2\x8d\xc7\x29\x96\xc8\x20\xf1\x98\x5d\x20\x39\x7f\xa7\x67\xa0\x3c\x96\x93\xed\x4f\xac\xcc\xb2\x32\x96\x9f\xf7\x38\x63\x20\x1a\xea\xd9\x54\x66\x09\xc1\x43\xdc\x92\x98\x96\x5b\xc1\x71\xb4\x16\xdb\x0f\xc1\xa2\xfa\x9b\xfb\x19\x18\x25\x6a\xa9\x38\xf9\xd8\x62\x1b\x68\x7b\x0c\xf0\xa6\x26\x53\x84\xce\x30\x50\x07\x82\x9f\xc1\x23\x08\x29\xcf\x35\x12\xa7\x8b\xf7\x41\x6c\x1d\x6f\xdd\x7a\x88\x30\xd0\x51\xd0\xc8\x7c\x0e\xb8\xd1\xae\x37\xc8\x30\x9f\xdd\xfd\x9e\x84\x1d\x23\x45\x07\x5f\xdb\x55\xd9\xb5\x28\xc1\x59\x16\xa8\xad\xc3\x37\xf3\x5e\xc9\xa2\x11\xd1\xd9\x88\x93\x10\xff\x03\x69\xc9\x81\x1c\x4e\x47\x78\xef\xeb\x33\x76\x02\xb2\xb6\x7a\xc8\xda\x94\xa3\xd1\x93\x7d\x1f\x46\xe9\x63\xdd\xa1\xf1\x87\x8a\x6e\x1d\x33\xef\x36\x5e\xf0\xc3\xb7\x79\xa1\xac\x76\x50\x48\x74\x08\xad\xb1\xba\x81\x5a\x59\x87\x26\xa3\x76\x8a\x18\x47\x70\x7b\xd3\x1d\xc0\x0c\xf1\xf0\xdf\x6f\xbe\x81\xed\x7e\x19\x07\xfa\x7a\x3c\xd2\xd7\x11\x24\xd1\x25\x49\x3a\x78\x8f\xa9\x44\x07\xb0\xf9\xf5\x21\x59\xa2\x8b\xb2\x0a\x68\x63\xd2\x94\xe7\x35\xd2\xd3\x3a\x3c\x29\x55\x40\xcd\x5b\x86\x8b\xbd\x7f\xb8\x7d\x7c\x7c\x78\x04\xd2\xc1\x60\xca\xa0\xb8\x1c\x7a\x81\xab\x2b\xa8\x9d\x5a\x9d\x83\x34\x36\x96\xd8\xbb\x24\x27\xac\x91\x48\x39\x1e\x11\x42\x9b\xc3\xc9\x10\xeb\x3a\x27\x44\x46\x4d\xdd\x7d\x48\x8e\x31\xc7\x46\xa0\x77\x87\xdb\x87\x4e\x7d\xa3\xb5\x72\x18\x9b\xd4\xa6\x2e\x61\x5f\xfd\xf5\xdb\x23\x10\xfe\xe8\x91\x85\xf3\x2c\xd4\xce\xa2\x17\x8e\x03\x49\x09\xac\x82\xe4\x5a\xcc\x2e\xc6\x46\xee\xb6\xa5\x51\x94\x4e\x42\xbd\xd7\x4a\xfe\x35\x19\x0a\x57\x35\xbf\x4e\x17\x02\x8c\x32\x02\x69\x28\x74\x5d\x11\x70\xe7\x7c\x92\xbb\x46\x42\x18\xf6\xc3\x12\xb5\xea\x39\xcd\xa2\xed\xae\x3e\x59\x79\x2b\x5b\xd0\x0d\xea\xe7\x02\x65\xec\x89\x55\xab\x58\xb0\xe4\x5a\x0e\xa6\x8d\x3c\xb8\x53\xc1\xbc\x41\x46\x50\x84\xc3\x7a\x3a\xa0\x0f\x70\x32\xd8\x7b\xb1\xa9\xe9\x04\xd0\x4b\x54\x3b\x46\xcd\x4e\xbd\x60\x81\x39\xc5\x8e\x21\x3e\x9e\xf5\xd3\xee\x49\x94\x1d\x6c\x22\x81\x53\x4b\x74\x0c\x71\xf4\x99\x38\x15\x38\xb4\x31\x99\x57\xb8\x81\x17\xe5\x7a\x8c\xaf\xa7\x06\x41\xab\x4e\x7a\x42\x58\x51\xe8\x3b\xb0\xde\xe0\x06\xb8\x09\xbd\x33\xd0\x2a\x19\x12\x35\x2f\x0f\x43\x35\x01\x83\x57\x2d\x42\xef\x0d\xd2\xc0\x34\x49\xff\x9e\x5e\x9f\x6a\xe9\xde\x17\x55\x14\xba\xa8\x4e\x17\xeb\x2f\x67\xd9\x8f\xf8\xe1\x34\xc6\x9e\x62\x28\x2d\x65\x80\x1c\x06\xb8\x80\xd7\xc0\x78\xf7\x4f\x1d\x20\xae\x6c\xd3\x17\xe5\xec\x5b\x54\xa1\x8b\x8d\xa4\xa0\x23\x07\xff\xb7\x92\x0c\x33\xa6\x42\x3b\xc5\x5c\x10\x91\x62\x1f\x6a\x78\x8b\x1c\x6d\x47\xfa\x64\x4c\x09\x8d\xd8\x41\x45\x37\xde\x22\xc5\x96\x90\xf2\x4f\x2b\x22\x8b\x26\x2b\x22\x94\x9e\x3c\x8c\x78\x93\xdf\x09\xa7\x0b\xf3\xe5\x6c\xb1\xff\xe4\xce\xa2\x72\xfc\x69\x88\x7c\xa8\x2c\x6f\x19\x37\xa9\x51\xde\xc4\xf6\xb1\xdc\xbe\x7f\x41\x0f\x8f\x92\x0f\xa5\xfd\x13\x00\x00\xff\xff\x66\xaf\x8d\x3d\x77\x0c\x00\x00") 72 73func configYamlBytes() ([]byte, error) { 74 return bindataRead( 75 _configYaml, 76 "config.yaml", 77 ) 78} 79 80func configYaml() (*asset, error) { 81 bytes, err := configYamlBytes() 82 if err != nil { 83 return nil, err 84 } 85 86 info := bindataFileInfo{name: "config.yaml", size: 3191, mode: os.FileMode(420), modTime: time.Unix(1521253698, 0)} 87 a := &asset{bytes: bytes, info: info} 88 return a, nil 89} 90 91// Asset loads and returns the asset for the given name. 92// It returns an error if the asset could not be found or 93// could not be loaded. 94func Asset(name string) ([]byte, error) { 95 cannonicalName := strings.Replace(name, "\\", "/", -1) 96 if f, ok := _bindata[cannonicalName]; ok { 97 a, err := f() 98 if err != nil { 99 return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) 100 } 101 return a.bytes, nil 102 } 103 return nil, fmt.Errorf("Asset %s not found", name) 104} 105 106// MustAsset is like Asset but panics when Asset would return an error. 107// It simplifies safe initialization of global variables. 108func MustAsset(name string) []byte { 109 a, err := Asset(name) 110 if err != nil { 111 panic("asset: Asset(" + name + "): " + err.Error()) 112 } 113 114 return a 115} 116 117// AssetInfo loads and returns the asset info for the given name. 118// It returns an error if the asset could not be found or 119// could not be loaded. 120func AssetInfo(name string) (os.FileInfo, error) { 121 cannonicalName := strings.Replace(name, "\\", "/", -1) 122 if f, ok := _bindata[cannonicalName]; ok { 123 a, err := f() 124 if err != nil { 125 return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) 126 } 127 return a.info, nil 128 } 129 return nil, fmt.Errorf("AssetInfo %s not found", name) 130} 131 132// AssetNames returns the names of the assets. 133func AssetNames() []string { 134 names := make([]string, 0, len(_bindata)) 135 for name := range _bindata { 136 names = append(names, name) 137 } 138 return names 139} 140 141// _bindata is a table, holding each asset generator, mapped to its name. 142var _bindata = map[string]func() (*asset, error){ 143 "config.yaml": configYaml, 144} 145 146// AssetDir returns the file names below a certain 147// directory embedded in the file by go-bindata. 148// For example if you run go-bindata on data/... and data contains the 149// following hierarchy: 150// data/ 151// foo.txt 152// img/ 153// a.png 154// b.png 155// then AssetDir("data") would return []string{"foo.txt", "img"} 156// AssetDir("data/img") would return []string{"a.png", "b.png"} 157// AssetDir("foo.txt") and AssetDir("notexist") would return an error 158// AssetDir("") will return []string{"data"}. 159func AssetDir(name string) ([]string, error) { 160 node := _bintree 161 if len(name) != 0 { 162 cannonicalName := strings.Replace(name, "\\", "/", -1) 163 pathList := strings.Split(cannonicalName, "/") 164 for _, p := range pathList { 165 node = node.Children[p] 166 if node == nil { 167 return nil, fmt.Errorf("Asset %s not found", name) 168 } 169 } 170 } 171 if node.Func != nil { 172 return nil, fmt.Errorf("Asset %s not found", name) 173 } 174 rv := make([]string, 0, len(node.Children)) 175 for childName := range node.Children { 176 rv = append(rv, childName) 177 } 178 return rv, nil 179} 180 181type bintree struct { 182 Func func() (*asset, error) 183 Children map[string]*bintree 184} 185var _bintree = &bintree{nil, map[string]*bintree{ 186 "config.yaml": &bintree{configYaml, map[string]*bintree{}}, 187}} 188 189// RestoreAsset restores an asset under the given directory 190func RestoreAsset(dir, name string) error { 191 data, err := Asset(name) 192 if err != nil { 193 return err 194 } 195 info, err := AssetInfo(name) 196 if err != nil { 197 return err 198 } 199 err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) 200 if err != nil { 201 return err 202 } 203 err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) 204 if err != nil { 205 return err 206 } 207 err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) 208 if err != nil { 209 return err 210 } 211 return nil 212} 213 214// RestoreAssets restores an asset under the given directory recursively 215func RestoreAssets(dir, name string) error { 216 children, err := AssetDir(name) 217 // File 218 if err != nil { 219 return RestoreAsset(dir, name) 220 } 221 // Dir 222 for _, child := range children { 223 err = RestoreAssets(dir, filepath.Join(name, child)) 224 if err != nil { 225 return err 226 } 227 } 228 return nil 229} 230 231func _filePath(dir, name string) string { 232 cannonicalName := strings.Replace(name, "\\", "/", -1) 233 return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) 234} 235 236