1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-01 09:42:07 +00:00
rke/data/bindata.go

247 lines
113 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-10 12:25:52 +00:00
var _dataDataJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xfb\x6f\xdb\x3a\xb6\x2f\xfe\xfb\xfc\x15\x84\x3b\x17\xfb\xde\x83\xc8\xb1\xf3\x6a\x9a\x8b\xe2\x8b\xec\x24\x6d\x8d\xb6\x89\x6f\x92\xb6\x67\x30\x19\x04\x8c\xc4\xd8\x3a\x91\x49\x6d\x49\x4e\x9b\xc9\xe9\xf9\xdb\xbf\xe0\x43\x12\x25\x51\xb2\xe4\x57\x6c\x67\x79\x80\xd9\x8d\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x48\x40\xb1\xd7\xeb\x6f\x9d\xfd\x4a\xfe\xf9\x89\x85\x11\xc5\xa3\xa4\x47\xfd\x80\xdd\xbb\x9e\x4b\x07\x85\xbe\x0e\xc8\x5f\x63\x12\x46\x43\x82\x1d\x12\x58\xe4\x57\x14\x60\x4b\xfe\x11\x8a\x62\xdd\x5f\xfc\x93\xff\xb4\x2e\xc9\x88\x45\xc4\x3a\x13\x09\xcc\x1f\x0f\x02\x36\xf6\xe3\x8f\x33\x5f\x7d\xe4\x6f\xcc\x1f\x8d\x43\x5e\xe7\x11\x31\x7e\xf7\x2d\x24\x41\xf2\xd9\x98\x46\xee\x88\x58\x36\xa3\xf7\xae\x68\x07\x9f\x3b\x2c\x70\xff\x2d\x46\xa9\xfd\x70\x18\xb6\x5d\xb6\xfd\xd8\xbd\x23\x11\xee\xbe\xd7\xa7\x5b\xae\x7b\x0f\xf6\xf6\x76\xd3\x57\x62\x42\x58\x58\xce\x08\xcb\x63\xec\x61\xec\xe7\xe7\x6b\x28\x27\x88\x75\x87\xed\x07\x42\xc5\x74\xe6\x8b\x20\xc9\x25\xf2\x42\xcb\x76\xfd\x21\x09\xac\x70\xec\x46\x72\x64\xae\xbf\x5c\xdd\x9e\x9d\x9c\x7e\x3a\xe3\xff\x7f\x75\x7c\xfb\xa3\x77\xfd\xe9\xf6\xf8\xec\xea\xb6\xbb\x73\x78\xfb\xf1\xe4\xeb\xed\xd5\xa7\xe3\x9d\xfd\x83\xad\xd2\x74\x3b\xfb\x07\x71\xba\xdd\xc3\x3d\x73\xba\x93\x4f\xc7\x27\x9f\x8e\x77\x3a\xb7\xfd\x8b\x2f\xff\xe8\xee\x76\xf6\xb5\x64\x97\xb5\x0a\xbd\xac\x55\xe4\x65\x69\x81\x2d\xde\x05\xbf\x53\x20\xf0\x48\xa4\x01\x41\xe9\x22\x9e\x11\x22\xf8\x43\x42\x23\xd7\x16\x83\x6f\x45\xec\x81\x50\xeb\xa7\x5c\x75\x85\xac\xf4\x79\x62\x8d\x98\x43\x78\x0a\xb5\x44\xe3\x44\xb6\x98\xbd\xa1\xe5\x93\xc0\xfa\x8b\xc9\x01\xd4\xf2\xb0\xa9\x6b\xdd\xb9\xd4\x72\xdc\x80\xbf\xda\x66\x7e\xb4\x6d\x53\x77\xfb\xce\xa5\x7a\x12\x3e\x39\x93\x34\x24\xb2\x45\x1a\x4a\xa2\xb6\x93\x82\xd7\x3d\x0b\x6c\x62\x51\xe6\x10\x8b\x77\x82\x8d\x23\x0e\x67\xfc\x8b\x24\xcd\x23\xa1\x91\xf5\x97\x1f\x66\xc0\x60\x84\x1f\x88\xe5\xfa\x22\x75\x68\x8d\x23\xd7\xb3\xec\x21\x56\xb8\xa7\xb7\x97\x92\xe8\x27\x0b\x1e\x14\x2c\xf2\xb7\x36\x75\xd3\xd5\x87\x1d\x8b\x51\xef\xa9\x88\x36\x01\x09\x99\xf7\x28\xda\x90\xd4\x5f\x3e\x6b\x8b\x67\xc9\x62\x08\x08\x1e\xb9\x74\xc0\x53\x52\x22\xa0\xcc\x72\x1d\x8f\x58\x7c\x7d\xb2\xb1\xc8\x74\xb7\x33\x82\xc5\xd1\xd9\x8f\xfb\xe0\x91\xb7\x79\x27\xf9\x8b\x79\xe3\x11\x51\xe3\x93\x4c\x97\x47\x1c\x6c\x7b\xee\xdd\xb6\x5a\x44\xdb\x32\x55\x2c\xdb\x72\xab\xcc\x0f\xd8\xaf\xa7\x74\x9d\x0d\x09\xf6\xa2\xe1\xbf\xad\xbc\xe4\xec\xee\xbc\x15\xcb\xae\x9b\xab\x48\x2e\xb7\x13\x46\xa3\x80\x79\x1e\x09\xea\x2e\x5d\x1b\x47\x6a\x0e\xdb\xae\x13\x14\xa6\xa0\x5c\xdd\x63\x1a\xe1\xc1\x80\x38\x96\xed\xb1\x71\x61\x85\x4b\x20\xe7\xc0\x2c\x5e\x5b\x01\x1b\xab\xc9\x91\x59\xe9\x4a\xda\x0f\x59\x18\xf9\x38\x1a\x5a\x7e\xc0\x1e\x5d\x2e\x63\x45\x65\xb3\x69\x3d\x25\xc5\x3c\x62\x47\x85\x55\xc1\x2b\x3b\x62\xd4\x8d\x18\x17\x55\xd8\x26\x7c\xad\xbb\x4c\xd4\x6b\xaf\x13\x26\xa2\x92\x39\x16\x79\x94\x12\x5a\x9f\xd1\xfb\x23\x2d\x4d\xa9\x38\x8d\x48\x30\x72\x29\x8e\x88\x63\xf1\x8c\x06\xb6\x15\x0d\x03\x12\x0e\x99\x27\xca\xe9\x76\x3a\x9d\xf2\xa1\x08\xed\x2
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-10 12:25:52 +00:00
info := bindataFileInfo{name: "data/data.json", size: 561861, 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, "/")...)...)
}