1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-06 03:56:15 +00:00
rke/data/bindata.go

247 lines
102 KiB
Go
Raw Normal View History

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