zwpanel/service/assets/assets.go
2024-04-08 17:41:05 +08:00

305 lines
12 KiB
Go

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