1
0
mirror of https://github.com/rancher/rke.git synced 2025-06-29 00:38:23 +00:00
rke/data/bindata.go

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