2017-11-22 13:40:54 +00:00
|
|
|
// Code generated by go-bindata.
|
|
|
|
// sources:
|
2018-03-18 13:13:41 +00:00
|
|
|
// rootfs/etc/nginx/lua/balancer.lua
|
|
|
|
// rootfs/etc/nginx/lua/configuration.lua
|
|
|
|
// rootfs/etc/nginx/lua/util.lua
|
2017-11-22 13:40:54 +00:00
|
|
|
// rootfs/etc/nginx/nginx.conf
|
|
|
|
// rootfs/etc/nginx/template/nginx.tmpl
|
|
|
|
// rootfs/ingress-controller/clean-nginx-conf.sh
|
|
|
|
// DO NOT EDIT!
|
|
|
|
|
|
|
|
package file
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2018-03-18 13:13:41 +00:00
|
|
|
var _etcNginxLuaBalancerLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x56\xdd\x8e\xdb\x36\x13\xbd\xd7\x53\x0c\x74\x25\xe1\xd3\x0a\xd9\x0f\xbd\x5a\xd4\x05\xf2\xb3\x05\x82\x24\x76\xe1\xa4\x05\x82\x22\x20\xb8\xd4\x58\x66\x4c\x93\x2a\x49\xad\xed\x06\x79\xf7\x62\x28\x89\x92\xbc\x4a\x17\xbd\x59\xaf\xc8\xe1\x99\x99\x33\x67\x86\x54\x46\x70\x05\xba\x3e\xb3\x07\xae\xb8\x16\x68\x61\x05\x16\xff\x6a\xa5\xc5\x2c\xd5\xf5\xb9\x1c\xd6\xd3\x3c\xe9\x8c\xbf\x3a\xa3\xa7\x46\x82\x16\xe2\xae\x30\x7a\x27\xeb\xd6\x72\x2f\xaf\xcc\xa6\x1b\xd1\xbc\xf5\x52\x4d\xad\xe8\x3b\x6e\x2a\xdb\x0a\x2e\xf6\x38\x35\xb0\xe8\xfc\xa5\x1c\x76\xa2\x69\x58\x66\xca\x88\xc3\x82\xb1\x11\x87\x34\x4f\x92\x9b\x1b\x38\x22\x77\xad\xc5\x0a\xa4\x06\x87\xc2\xe8\xca\xd1\xf2\xce\x58\xe0\x1a\xd6\xb5\xd4\x67\x38\x19\x7b\x40\x0b\xde\x40\x23\xc5\x01\xda\x06\xfc\x1e\x41\xe3\x09\x94\x74\x1e\xcc\x0e\xda\xc6\x79\x8b\xfc\x08\x0d\xa2\x75\x40\x08\xd2\xc3\x49\x2a\x05\x9e\x1f\x10\x7e\xa6\x03\x15\x2a\x7e\x81\x56\x53\x82\xc2\x68\x6f\x8d\x52\x68\xe1\xb7\xcd\xc7\x4f\x58\x05\xc8\x07\x2e\x0e\xa8\x2b\x30\x0f\x5f\x51\x78\x72\x48\xab\x5d\x10\xa8\xab\xc6\x48\xed\x7f\x81\xff\xc1\xab\x97\xaf\xdf\xdd\xaf\xdf\x7c\x64\x1f\x3f\xaf\x5f\xb3\xb7\xeb\x4f\xf7\xdb\x3f\x5e\xbe\xef\x13\x5f\xde\x84\x15\xdc\x26\xc9\x76\xf3\xfb\xfa\x0d\xdb\x6e\x5e\xbd\x5d\xb3\xf7\x9b\xd7\xef\xd8\xbb\xfb\xcf\xb0\x82\xd4\x9a\x56\x57\xcc\x9a\x07\xa9\xd3\x64\x20\x70\x5c\x63\xce\x73\x4f\xa4\x53\xf9\xdd\x9e\x5b\xac\xca\x27\xdb\xc3\x39\xf6\x01\x56\xf0\xed\xfb\x12\x4c\xac\xc6\x50\x9a\x3b\x8d\xa7\x2c\xa5\xff\x5c\x5a\xc0\x37\x2f\x8f\x68\x5a\x0f\x2b\x78\x51\x00\x9e\x1b\xfa\xa6\x8f\xf2\xf6\x7b\x3e\xe0\xf5\x1c\xb9\x02\xd0\x92\x34\x87\xc2\x97\x04\x75\xfb\xe2\xff\x3f\xe5\x89\xdc\x81\x36\x3e\x5a\x12\x89\x3a\x01\xb0\xe8\x5b\xab\xe9\x98\xb1\x59\xba\xe3\x52\x11\xed\x06\x84\x45\xca\x8e\xa8\xee\xc4\x45\xc5\x1f\x0e\xdf\x41\x0a\x65\x09\x19\x39\x33\x16\xd2\x56\x1f\xb4\x39\xe9\x34\xcf\x13\xd4\xd5\x10\xd4\xae\xd5\x22\xc8\xbb\xef\x8d\x2c\x4f\x00\x66\xf1\x32\xcd\x8f\x03\x83\x8f\xdc\x96\x8d\x35\xe7\x0b\x1b\x74\x13\x76\xaf\x8f\xc0\x6a\x8c\xa2\x46\x9f\x4d\x91\x08\xff\xe6\x06\xd4\x03\xe3\xaa\x86\x9d\x44\x55\x41\x65\xd0\x85\xc4\xf1\x4c\xb2\xa4\x2c\xa4\xae\x2d\x3a\x57\xbe\xea\x11\x9d\xb7\xad\xe8\xb6\xb4\x39\x15\xe0\x4c\x0f\xd1\xc1\x05\xc1\x72\x75\xe2\x17\x07\x0f\x38\x2d\x5d\x8c\xad\xf7\x18\x43\x2b\xfb\x05\xe2\x66\xae\x22\x00\xb9\x8b\xe6\x2b\x48\x65\xc3\xf6\xdc\xed\xd3\xa1\x1c\xc1\xe3\xa7\xcd\x9b\x4d\x86\xea\x51\x6a\xdc\xa1\xae\x64\x0e\xf2\xd8\x28\x3c\xa2\xf6\x10\x18\x89\x65\x1b\xfc\x0d\x7d\xe0\xfe\x7c\xf1\xa5\xe4\x55\x45\xf9\x15\xcb\xbb\x8d\xb1\x3e\x01\x08\x75\x0a\xde\xb6\x14\xe0\xcd\xb6\x4f\xe8\x5a\x99\x77\xf4\x67\xc6\x32\x55\x7e\xa9\x65\xc6\xea\x4a\x5d\xe1\x99\x24\x7d\xdd\x0d\x8b\x15\x9b\x9c\x29\x62\x43\x93\x28\xf0\x1c\x8d\xc7\x14\x8a\xce\x32\xef\x98\xa4\xc2\x76\xde\x22\x7f\x83\xf3\xdb\xf0\x35\xc1\x7b\xca\x46\x30\xfd\xd2\x93\x01\x0b\xe1\xba\xab\x70\x27\xce\x9f\xf0\xd4\xea\xff\xc0\xd4\xa4\xf1\xfa\x68\xc6\xaa\xc5\x95\x50\xa9\xa5\x7e\x72\x17\x2d\x58\xef\x68\x70\x48\x31\xc5\xc6\x98\xc4\x5d\x76\x71\x47\xab\xae\xe6\x5c\x39\x43\x13\x07\x7d\xe8\x70\x8b\xae\x41\xe1\xe5\x23\x42\xbc\xdf\xba\xe9\xe6\xa4\x16\xe3\x08\xde\x73\x07\x62\xcf\x75\x8d\xcb\x7c\x55\xa8\xd0\xe3\xcc\x75\xf0\x48\xfd\xad\x4c\x9d\xd1\xef\xdb\xf5\xaf\x9b\x02\x52\xca\xc1\x1a\x2d\xff\xee\x6e\x40\x61\x48\xe1\x1e\x2b\x6a\xc3\x7e\xbc\xcc\x61\x9e\x23\xc2\x3d\x1d\x2f\x8e\x55\xdc\x73\x58\xcd\x6f\xdb\xb2\x46\xcf\x66\x16\xd9\x44\x4d\xf3\xa3\x51\x55\x5d\xb5\xc6\xbe\xe9\xfc\x98\x43\x41\x37\x5e\x44\x83\x15\x34\x82\x2b\x95\xd1\x5d\x5f\x56\x28\x4c\x35\x72\xdf\x41\x4e\x5c\x99\xc3\x88\x3f\x65\xe8\x7e\xbb\x2d\x00\x52\x61\x5a\x55\x05\xc3\x86\x5b\x87\xe3\xe4\x26\x98\x9e\x22\x6f\x9c\xb7\x52\xd7\xd9\x34\x8a\x3c\x5f\x0c\x99\xe6\x1b\x9b\xc5\x4b\xd7\x7b\xc3\xa5\x75\xf3\xe3\x50\x99\x00\xf0\xaf\x73\x77\x72\xa2\x1c\x3a\xf9\x7a\xba\xf7\x52\x81\x15\x78\xdb\x62\xd2\xb5\xe7\x2e\x22\xc6\xe4\x61\xe1\x04\xe5\x4d\xaf\x9c\xb2\x42\x6c\x18\xc9\x83\xdb\xa8\xac\x59\x16\xf9\xd0\xe8\xd7\x0e\x22\xda\xc4\xd1\xac\x75\x16\x41\xba\xbf\x01\x2e\xea\x8c\x7d\x28\xa5\x96\x9e\x75\x6f\x9e\x20\x17\x36\x5c\xb5\x54\x31\xba\x92\x6d\x89\x8f\x68\x2f\xd9\xf2\
|
|
|
|
|
|
|
|
func etcNginxLuaBalancerLuaBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_etcNginxLuaBalancerLua,
|
|
|
|
"etc/nginx/lua/balancer.lua",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func etcNginxLuaBalancerLua() (*asset, error) {
|
|
|
|
bytes, err := etcNginxLuaBalancerLuaBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
info := bindataFileInfo{name: "etc/nginx/lua/balancer.lua", size: 3108, mode: os.FileMode(420), modTime: time.Unix(1521218836, 0)}
|
|
|
|
a := &asset{bytes: bytes, info: info}
|
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var _etcNginxLuaConfigurationLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x53\xc1\x8e\xdb\x46\x0c\xbd\xeb\x2b\x5e\x7d\x89\x17\xb0\x65\xb7\xc8\x29\x80\x2f\x45\x7b\x29\xb0\xd9\x22\xc9\x5d\xa0\x25\x4a\x9a\xee\x78\xa8\xe5\x70\xbc\x11\x8a\xf6\xdb\x8b\x19\x79\xdd\x38\xbb\x39\x19\x1e\x92\xef\x91\xef\x3d\x6d\xb7\x78\xe4\xf9\x5d\x04\x29\x83\xfc\x33\xcd\x11\x83\xb8\x30\xc0\x04\x47\x46\x18\xbe\xd6\x67\xd2\x7a\x52\xf9\x3a\x37\x69\x8a\xa6\x4c\xa7\x26\xd0\x89\x37\x20\xa4\xe0\x9e\x12\x27\x86\xeb\x38\x98\xeb\x1d\x2b\xa4\x07\x05\xd0\x34\xbd\x8b\xf8\x95\xda\x47\x0e\x1d\xe4\xf8\x17\xb7\x56\x6d\xb7\x68\x93\x2a\x07\xf3\x33\x9c\xc1\x45\x1c\x93\xf3\x06\x49\x65\x2e\xc3\x4e\x91\x5a\xde\x20\xb2\x9e\x5d\xcb\xe5\x09\x14\xba\xeb\xc3\x24\x5a\x80\xce\xe4\x33\x6f\xc4\x1f\x9f\x1f\x3e\x82\x43\x2b\x1d\x77\x70\x61\x50\x8e\xb1\xbe\x25\xfe\xee\xef\x06\xbd\x28\x4e\xa2\x0c\x17\x7a\x81\x72\xcf\x9a\x0f\x76\xc1\x58\x03\xf9\xdd\xee\x82\xb3\xb3\x79\xe2\x58\x0f\x52\x79\x69\xc9\xa3\x95\xd0\xbb\x21\x29\x99\x93\xd0\x74\x64\x84\x43\xd1\x28\x8e\xa4\xdc\xd5\xaf\xeb\xd5\x65\xb2\xb9\xc7\x01\x7f\xff\x53\x55\x7d\x0a\x6d\xae\xa2\xb9\xaf\x07\xb6\xe6\xb8\xac\x16\x4b\xf7\xfa\xae\x02\x94\x2d\x69\x78\x83\xeb\xc3\xc0\xb6\x5e\xbd\x0c\xac\xee\x2a\x0e\xdd\x0f\x01\x8b\x47\xb1\x00\x6e\xb7\xd8\x63\x64\x65\x9c\x98\x42\xc4\xc0\x06\xf2\x1e\x36\x72\x76\x3f\xe2\x79\x74\xed\x88\x96\x42\xb6\x3c\x7a\x79\x86\xeb\x73\x35\x67\x22\x4f\x51\x98\x4b\xe3\x82\xf5\xe5\xe1\xb7\x87\x35\xfb\xb3\x0b\xdc\x73\xe8\xdc\x1d\x6c\x74\xe1\x11\x74\x94\x64\x88\x26\x9a\xf3\xd3\xca\xe9\x44\x88\x3c\x91\x92\x71\x87\xcb\x5a\xc5\xd0\x08\x17\x40\x41\x32\x05\x3a\x57\xd6\x27\x9d\x8b\xcf\x29\x96\xf4\x8d\x64\x30\x59\x08\x7b\xb6\x76\x2c\xdb\x7a\x17\x2d\x07\xc5\x46\x3e\x2d\x17\xb9\x10\x33\xba\xf4\x38\x7a\x69\x1f\x97\x59\x06\xb5\x2d\xc7\x98\x3d\x5d\x9c\xf9\x86\xe5\x7f\x85\x6f\xa4\xcf\xe2\x36\xf9\xc8\xf5\xfe\x0d\x61\x5b\xf2\xbe\x68\xe9\xfa\xeb\x37\xa1\xfc\x94\x38\x5a\x73\x62\x1b\xa5\xc3\xbf\x07\xac\xfe\x7c\xf8\xfc\x65\x05\xd1\x57\x3d\x49\x5d\x69\xd8\xdd\xb8\xba\xbb\x7a\x99\x97\x0e\x15\x80\x25\x4d\x46\x96\x22\x0e\x78\xbf\x7f\x7f\x7d\x9c\xd4\x05\x5b\xaf\x3e\x8a\xa1\x97\x14\xba\x9f\x56\x77\x55\x29\x2e\xd7\x54\x40\xd9\x7a\x69\x56\x7e\xaa\x95\xa9\x6b\x8e\xd2\xcd\xeb\xd2\xb8\xe4\x30\xa6\xa2\xcc\x06\xac\x8a\xc3\x5b\x21\x8b\x37\x21\xdb\x5c\xe1\x4a\xb6\xa4\x9b\x2f\x41\x7d\x11\x43\xec\x05\xf3\xf6\x06\x2f\xc3\x3a\xff\xfe\xfe\xe9\xd3\x06\x2b\x56\x15\xcd\x39\xf3\x8c\x48\xe7\x25\x20\xdf\x50\x7f\xc0\x0a\x75\x0d\x93\x68\x39\x3d\x6b\x56\x2d\x0c\xaf\xf4\xd8\xff\xf0\xe4\x6b\xd3\x2f\xfb\x9f\x17\x03\x2f\x36\x37\xf7\xd5\x7f\x01\x00\x00\xff\xff\xf6\x6d\xd4\xcd\xe7\x04\x00\x00")
|
|
|
|
|
|
|
|
func etcNginxLuaConfigurationLuaBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_etcNginxLuaConfigurationLua,
|
|
|
|
"etc/nginx/lua/configuration.lua",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func etcNginxLuaConfigurationLua() (*asset, error) {
|
|
|
|
bytes, err := etcNginxLuaConfigurationLuaBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
info := bindataFileInfo{name: "etc/nginx/lua/configuration.lua", size: 1255, mode: os.FileMode(420), modTime: time.Unix(1521218836, 0)}
|
|
|
|
a := &asset{bytes: bytes, info: info}
|
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var _etcNginxLuaUtilLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x91\x4f\x8f\xd3\x30\x10\xc5\xef\xf9\x14\xef\xb6\xac\xd4\x36\x6b\x77\x11\xd2\x4a\x39\xc1\xb5\x37\xc4\x65\x85\x2c\x37\x99\x34\xa6\x8e\x1d\xec\x49\xaa\x0a\xc1\x67\x47\x76\xda\x6d\x8a\x04\x17\x4e\x51\x9e\xdf\xbc\xdf\xfc\xb1\xbe\xd6\x16\x6a\x87\x0a\x3f\x7e\x16\xc5\x7a\x0d\xee\x4c\x84\xe9\x07\x4b\x3d\x39\xd6\x6c\xbc\x83\x89\x60\x7d\x24\x87\x36\xf8\x3e\x99\x3a\xe6\x21\xbe\x94\xe5\x89\xf6\x1b\x1d\xea\xce\x4c\xb4\xf1\xe1\x90\xfe\x4b\xf9\x24\xb6\x42\xca\xf7\x4f\x1f\x9e\x9e\xb7\xcf\x65\xb2\xbe\x94\x65\x74\x66\x18\x88\xe3\xc6\x8e\xba\xf6\xcd\x6c\xbf\x8a\xe5\x27\xa2\x41\x7d\xf4\xfd\xa0\x83\x89\xde\x29\xdf\xaa\xcf\x27\xaf\xbe\x68\x3b\x52\x54\xdb\x84\xd4\xae\x41\xef\x1b\xd3\x1a\x6a\xd0\xfa\x80\x31\x12\x8c\x9b\xfb\x1d\x82\xff\x46\x35\x17\xf3\x38\xed\xe8\xea\xdc\x77\x93\x62\xeb\x1c\x4b\xef\x58\xac\xc0\x72\x05\x73\x70\x3e\x90\xea\xf9\xb1\x00\xe6\x02\x3e\x0b\x54\xe0\xf3\x90\x5c\x4b\x59\xbe\xc9\x32\xc9\xa6\xcd\xd6\x5f\x55\x7e\xe2\x8e\x1c\x02\xf1\x18\x1c\x5a\x6d\x23\x81\x5c\x53\x00\xeb\x35\x9c\x77\x6b\xd6\x7b\x4b\xb9\x3a\xa2\xd6\x0e\x7b\x42\x63\x02\xd5\x6c\xcf\xb8\xf4\xd4\xdc\x65\x3e\xe4\x8a\x87\x3c\x69\xca\x5f\x48\x4b\x14\x0b\x54\x15\x58\xde\x68\x3a\xe2\x44\xd6\xa6\x6f\xf6\x47\x9c\x3a\x53\x77\xe8\xf4\x44\xa9\x14\x3d\xb1\xee\x89\x3b\xdf\x40\x29\xfa\xfe\x36\x60\xcf\xa8\x70\x20\x4e\xef\xb9\xf2\x32\xbe\x69\xe1\x3c\xdf\x36\x35\x2f\xff\xfa\xd9\xa4\x8c\x7f\xb5\x94\xae\x73\x14\xab\x49\xa4\xfb\x0c\xda\x84\x98\x72\xd1\xf8\x02\xb8\xa2\xa7\xbc\x5a\xf9\x7a\x14\x5f\xb3\x6a\xda\x2c\x55\x70\xc6\xc2\x87\xcc\xbf\x3b\xdf\x24\x56\x93\x7c\xfc\xeb\xd2\x17\x64\xb9\x9a\xe4\x82\x2c\xff\x24\xe7\x5b\x8b\xd7\xa3\xbc\x91\xc5\x7f\x93\xaf\x9b\x08\x23\x15\x49\x51\xbb\xcd\x32\x04\xd5\x5d\x66\x51\x5c\xfc\x6a\x57\xfc\x0e\x00\x00\xff\xff\xb9\x73\x37\x07\x83\x03\x00\x00")
|
|
|
|
|
|
|
|
func etcNginxLuaUtilLuaBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_etcNginxLuaUtilLua,
|
|
|
|
"etc/nginx/lua/util.lua",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func etcNginxLuaUtilLua() (*asset, error) {
|
|
|
|
bytes, err := etcNginxLuaUtilLuaBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
info := bindataFileInfo{name: "etc/nginx/lua/util.lua", size: 899, mode: os.FileMode(420), modTime: time.Unix(1521218836, 0)}
|
|
|
|
a := &asset{bytes: bytes, info: info}
|
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
2017-11-22 13:40:54 +00:00
|
|
|
var _etcNginxNginxConf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2c\xca\x41\x0a\x83\x40\x0c\x85\xe1\xfd\x9c\xe2\x41\xf7\x7a\x00\x57\x3d\xca\xa0\x89\x06\x34\x19\x32\x4f\x69\x29\xbd\x7b\x69\xe9\xea\x5f\xfc\xdf\x0d\x77\x5c\x92\x4f\x74\x3b\xda\x2e\xf0\xd5\xfc\x81\x39\x5c\x6d\x3d\xb3\xd2\xc2\xa1\xb6\x0b\xb8\x55\x42\x23\x67\xe9\x7f\xc4\x40\x67\x4d\x0e\xa5\xd9\x82\x31\x4f\x1f\x7f\x63\x68\xb6\x4c\xa5\xc8\x25\xce\x8e\xd7\xbb\x6c\x64\xfb\x76\xa9\x72\x84\x23\x54\xa7\x4f\x00\x00\x00\xff\xff\x75\xb5\xe6\xb8\x77\x00\x00\x00")
|
|
|
|
|
|
|
|
func etcNginxNginxConfBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_etcNginxNginxConf,
|
|
|
|
"etc/nginx/nginx.conf",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func etcNginxNginxConf() (*asset, error) {
|
|
|
|
bytes, err := etcNginxNginxConfBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2018-03-18 16:30:05 +00:00
|
|
|
info := bindataFileInfo{name: "etc/nginx/nginx.conf", size: 119, mode: os.FileMode(420), modTime: time.Unix(1511087392, 0)}
|
2017-11-22 13:40:54 +00:00
|
|
|
a := &asset{bytes: bytes, info: info}
|
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
2018-03-18 16:30:05 +00:00
|
|
|
var _etcNginxTemplateNginxTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x7d\xff\x73\xdb\xb6\xf2\xe0\xef\xf9\x2b\x30\xb2\x6f\x62\x67\x22\xc9\x4e\xd3\xbc\x3e\x7b\x7c\x77\x8e\x9d\x3c\xfb\x9e\x93\x78\x2c\x27\x7d\xf3\xb9\xb9\xd1\x40\xe4\x4a\xc4\x33\x45\xb0\x00\x68\x5b\xcd\xf9\xfe\xf6\x1b\x7c\x25\x40\x82\x94\x9c\xa6\x49\x5f\xa7\xec\x4c\x6a\xe1\xcb\x62\xb1\x00\x16\x8b\xdd\xc5\xe2\xf3\x67\xb4\x8d\xf3\x1c\x1d\x1c\xa1\x11\x7a\x78\x78\x22\x7f\x73\x60\xb7\xc0\xb8\x4a\x9b\x98\xbf\x4d\x56\x32\x5f\xa8\xe4\x93\xf9\xc2\x26\x9d\xf3\xf3\xcb\x4f\xaf\xde\x14\x78\x96\x43\xaa\x32\xc3\x14\x53\x2c\x03\x9c\x8b\xec\xd7\x8f\x57\xe7\xaa\xcc\x59\xfd\xd3\x14\x98\xe1\xe4\x06\x8a\x54\x37\xfb\xda\xfe\x30\x99\x25\xa3\xf7\xab\x33\xc0\xa9\xc5\xeb\x52\x26\x4c\x40\xd8\x34\x53\x0e\xa7\xa9\x5f\xea\xb8\xfe\xf9\xf0\xf0\x44\x96\x20\x73\xd5\x89\x91\xc6\xee\x1d\x4d\x39\x24\x15\x23\x62\x25\x0b\xe4\x14\xa7\xd3\x25\x4d\xab\x1c\xd0\x18\x44\x32\x2e\x16\xa4\xb8\x1f\xeb\x14\x3e\x2e\x16\xf7\xd3\x4c\x88\x52\x16\xb1\xd5\x4c\xf1\x11\xa7\x87\x12\x3c\x14\xa9\x6d\x69\x56\x91\x3c\xfd\x50\x42\x21\x18\x4e\x48\xb1\xb8\xa0\x38\xd5\x04\x94\x05\x52\x0c\x4b\x5a\x20\x3a\x9f\x1f\x3e\x79\x72\x47\xd9\x0d\xb0\x69\xc9\x68\x02\x9c\x03\x47\x86\xd4\xa3\x9f\x55\xc6\xa5\x4b\x7f\x78\x38\x34\x9d\x58\x08\xb4\x93\x43\xe1\x17\x3b\x29\xab\xe3\xf9\x9c\x14\x44\xac\x76\xd1\x9e\x6c\xc5\xc0\x4d\xca\x6a\x8a\x4d\x4e\x03\xb4\x57\xc7\x02\xb7\x5d\x28\x49\x8a\xc6\xac\x2a\x34\x11\x46\x25\x49\x6d\xdb\x05\xa0\xd1\x3b\x7c\x2f\xfb\xf6\x96\xe4\xc0\x83\xc6\x58\x4e\x96\x44\x4c\x0b\x3a\x27\x39\xc8\xd6\xc2\xa2\x8d\x46\x3e\x7f\x1e\x3f\x43\x92\xa6\x07\x63\xd3\x0e\x65\x8b\x31\x14\xe3\x94\x26\x9a\xe0\x09\x65\x60\x89\x9c\x89\x65\xbe\x65\xda\xe1\x59\x25\x52\x7a\x57\x4c\x05\x59\x02\xad\x04\x7a\x36\x56\x73\x60\xfc\x0c\xe1\x5b\x4a\x52\x74\x87\x89\x20\xc5\x02\x09\x4a\x51\x4e\x8b\x05\x4a\x2b\x26\x7f\x63\xc4\x40\x0e\xb4\xae\xd0\x05\x2d\x24\xd3\xc4\x64\x5f\x9b\xdc\x87\x07\x74\xf8\xe4\x09\xdc\x42\x21\x38\xfa\xfc\x04\x21\x84\x96\x55\x2e\xc8\x14\x27\x09\x94\x02\x99\x8f\x16\x87\x2a\xcf\x8e\x03\x2d\x0a\x48\x04\xa1\x05\x47\xae\x81\x77\xf8\xde\x0c\x85\x97\x2b\xa9\x24\x2b\x56\x1c\x50\xf3\x83\x92\xe6\xf9\xe1\x93\x87\x27\x4f\x24\xdd\x4c\xeb\x79\x85\xa7\x25\x4e\x6e\xf0\x02\xa6\x49\x89\x45\x86\x06\xe3\x8a\xb3\x71\x4e\x13\x9c\x8f\x73\x32\x1b\xe7\x15\x1e\xff\x0f\x39\x4d\x75\x3a\x99\x8d\xef\x7f\x7a\x35\x7d\xf5\x72\x98\x93\xa2\xba\x1f\x2e\x8a\x4a\x15\xf9\x71\xb4\xaf\x8b\x1d\x0e\x0e\x5b\x90\x0d\xe0\x7a\x65\x68\xa0\x79\x85\x0f\x1b\x89\xb7\x50\xa4\x94\xd9\xbc\x18\x26\x32\x43\xb6\xe1\x1a\xe1\x19\x66\x90\x4e\x53\x92\x08\x94\xd0\x62\x4e\x16\x15\xc3\x92\x1c\xd3\x14\x0b\x8c\x7e\x7c\x77\x18\x2d\xca\x68\x55\xa4\x53\x46\x67\xa4\x98\x72\x81\x05\xa0\xfd\x8e\x92\x39\x4d\x6e\x38\xfa\x71\xff\xc5\x8d\x69\x55\x4e\xfb\xe9\x6c\x35\x95\x05\x67\x32\xd7\x10\x53\x7e\x0c\x7e\xa9\x08\x83\x9d\x01\x03\x2e\x56\x23\x39\x0b\x07\xbb\x2e\x37\xa1\x79\x0e\x89\x58\x60\x36\xc3\x0b\xd8\x19\x98\xdf\x83\xdd\x27\xae\xc8\x70\xa8\xe0\x23\xc3\x3c\x5c\xba\xa2\x03\xa2\x37\xcf\x11\x03\x5e\x17\x37\x09\xe8\x08\x95\x09\xce\xf3\x1d\xd3\xfe\x73\x34\x08\x68\xe1\xe1\x20\x17\x22\x15\x88\xde\x20\x91\x41\xf1\xc4\x9b\x20\x8c\x51\x26\x11\x57\x10\xd0\x1c\x93\x1c\xd2\x03\x34\x40\xa3\x11\x12\x94\x0b\xb9\x0a\x76\x18\xf0\xdd\x1a\x16\xe4\x1c\x3c\x08\x41\x93\xe8\x48\x61\xea\x8a\x16\xe9\x26\x58\xcf\x70\x8e\x8b\x04\xd8\xb7\x41\xd8\xb6\x16\xc1\x55\xfe\xff\xc1\x1b\x6f\xb3\x16\x3b\x86\xdd\x02\x1a\x79\x65\x77\x76\x7d\x20\x8a\xc3\xdc\x81\x5a\x9a\x22\x03\x74\x8b\xf3\x0a\x10\x9d\xab\x1f\x99\xda\x6c\xd0\xbf\x86\x6f\x29\xbb\xc3\x2c\x85\x54\xfe\x85\x04\x45\x33\x40\x72\xc3\x91\x7f\xda\x9a\x0b\xa0\x53\x52\x9a\x09\xa2\xb9\x91\x6e\xc0\x6d\x52\x1f\x39\xa8\x7d\xee\x92\x51\x41\x13\x9a\x23\x53\x84\x01\xce\xa7\xa4\x9c\x9a\xe6\xd4\xa7\x76\x48\xb9\x85\xa8\x92\x87\x16\x94\x24\x54\x5f\x35\xcb\x86\x1c\xc2\x6f\x29\xd3\x5b\xa6\x63\x42\x1e\xbb\xf6\xa1\x30\xb9\x03\x72\x72\x0b\x1e\xa3\xfb\xfc\x19\x31\x5c\x2c\x00\x6d\x0b\x56\x71\x01\xa9\xec\xe0\xc1\x91\x6e\x42\x75\xe5\x0a\x70\x7e\x7e\x79\x72\x7e\x7a\x65\xb1\xe2\x20\xa6\x16\xe6\x9c\xd1\xa5\xc5\xca\x83\xd0\x81\x49\x48\xa9\x7f\x00\x3d\xbf\x44\x8e\x88\xe3\x67\x48\xf2\x8d\x19\x96\xfb\x66\x
|
2017-11-22 13:40:54 +00:00
|
|
|
|
|
|
|
func etcNginxTemplateNginxTmplBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_etcNginxTemplateNginxTmpl,
|
|
|
|
"etc/nginx/template/nginx.tmpl",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func etcNginxTemplateNginxTmpl() (*asset, error) {
|
|
|
|
bytes, err := etcNginxTemplateNginxTmplBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2018-03-18 13:13:41 +00:00
|
|
|
info := bindataFileInfo{name: "etc/nginx/template/nginx.tmpl", size: 41105, mode: os.FileMode(420), modTime: time.Unix(1521218836, 0)}
|
2017-11-22 13:40:54 +00:00
|
|
|
a := &asset{bytes: bytes, info: info}
|
|
|
|
return a, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var _ingressControllerCleanNginxConfSh = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x64\x92\x41\x6b\xe3\x48\x10\x85\xef\xfa\x15\x6f\x2d\x83\x77\x17\x47\x9d\x78\x0f\x0b\xc9\xc9\x9b\x64\x19\x91\x60\x43\xe4\x4c\x08\x98\x40\xbb\x55\x96\x0a\xa4\x6e\x4d\x75\x2b\xb6\x99\x99\xff\x3e\xb4\xe2\xcc\xc4\x8c\x8e\x55\x4f\xfd\xbe\x7a\x55\xe9\x1f\x6a\xc3\x56\x6d\xb4\xaf\x93\x24\xc5\xb5\xeb\x0e\xc2\x55\x1d\x30\x3b\xbf\xf8\x17\xab\x9a\x70\xd7\x6f\x48\x2c\x05\xf2\x98\xf7\xa1\x76\xe2\xb3\x24\x4d\x52\xdc\xb3\x21\xeb\xa9\x44\x6f\x4b\x12\x84\x9a\x30\xef\xb4\xa9\xe9\xbd\x33\xc5\x67\x12\xcf\xce\x62\x96\x9d\xe3\xcf\x28\x18\x1d\x5b\xa3\xbf\xae\x92\x14\x07\xd7\xa3\xd5\x07\x58\x17\xd0\x7b\x42\xa8\xd9\x63\xcb\x0d\x81\xf6\x86\xba\x00\xb6\x30\xae\xed\x1a\xd6\xd6\x10\x76\x1c\xea\xc1\xe6\xf8\x48\x96\xa4\x78\x3e\x3e\xe1\x36\x41\xb3\x85\x86\x71\xdd\x01\x6e\xfb\x51\x07\x1d\x06\xe0\xf8\xd5\x21\x74\x97\x4a\xed\x76\xbb\x4c\x0f\xb0\x99\x93\x4a\x35\x6f\x42\xaf\xee\xf3\xeb\xdb\x45\x71\x7b\x36\xcb\xce\x87\x5f\x1e\x6d\x43\xde\x43\xe8\x4b\xcf\x42\x25\x36\x07\xe8\xae\x6b\xd8\xe8\x4d\x43\x68\xf4\x0e\x4e\xa0\x2b\x21\x2a\x11\x5c\xe4\xdd\x09\x07\xb6\xd5\x14\xde\x6d\xc3\x4e\x0b\x25\x29\x4a\xf6\x41\x78\xd3\x87\x93\xb0\xde\xe9\xd8\x9f\x08\x9c\x85\xb6\x18\xcd\x0b\xe4\xc5\x08\xff\xcd\x8b\xbc\x98\x26\x29\x9e\xf2\xd5\xa7\xe5\xe3\x0a\x4f\xf3\x87\x87\xf9\x62\x95\xdf\x16\x58\x3e\xe0\x7a\xb9\xb8\xc9\x57\xf9\x72\x51\x60\xf9\x3f\xe6\x8b\x67\xdc\xe5\x8b\x9b\x29\x88\x43\x4d\x02\xda\x77\x12\xf9\x9d\x80\x63\x8c\x54\xc6\xcc\x0a\xa2\x13\x80\xad\x7b\x03\xf2\x1d\x19\xde\xb2\x41\xa3\x6d\xd5\xeb\x8a\x50\xb9\x57\x12\xcb\xb6\x42\x47\xd2\xb2\x8f\xcb\xf4\xd0\xb6\x4c\x52\x34\xdc\x72\xd0\x61\xa8\xfc\x36\x54\x16\x6f\x69\x15\xd7\xe9\x8d\x70\x17\x20\xd4\xba\x57\xf2\x30\xce\x7a\x32\x7d\xe0\x57\x02\xb5\x5d\x38\xa0\x61\x4b\x3e\x26\x67\x2b\xb6\xfb\xcc\x38\xbb\x8d\xc1\xfb\xe8\x1a\xaf\x8b\x3d\x5a\x27\x04\x1f\x27\x88\xe0\xda\xa2\x1f\xba\x1a\x95\x83\x50\x45\xfb\x64\x98\xaa\x8c\xc7\xd2\x6a\x5b\xfa\xcb\x24\xc5\x45\x76\x34\x1d\xb8\x84\x42\x2f\x16\x46\x8b\x30\x09\x4c\xad\x45\x9b\x40\xa2\x7c\x92\x62\xf6\x53\xfa\x01\x29\x49\xf1\x4f\xac\x77\x8d\x36\x84\xb6\x6f\x02\x47\xff\x8f\x8a\x88\x77\x46\x98\x78\xb5\x16\xa5\xaa\x09\xbe\xe1\x57\xe9\x05\xf8\x7b\xac\xd6\x93\xf1\x64\x6d\x4f\x7b\xea\x65\xac\xbe\x2e\xae\xd4\xcb\xda\x8e\xd5\xcd\xd5\xf7\x49\xf2\x23\x00\x00\xff\xff\x3b\xba\x15\x8d\x85\x03\x00\x00")
|
|
|
|
|
|
|
|
func ingressControllerCleanNginxConfShBytes() ([]byte, error) {
|
|
|
|
return bindataRead(
|
|
|
|
_ingressControllerCleanNginxConfSh,
|
|
|
|
"ingress-controller/clean-nginx-conf.sh",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
func ingressControllerCleanNginxConfSh() (*asset, error) {
|
|
|
|
bytes, err := ingressControllerCleanNginxConfShBytes()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2018-03-18 13:13:41 +00:00
|
|
|
info := bindataFileInfo{name: "ingress-controller/clean-nginx-conf.sh", size: 901, mode: os.FileMode(493), modTime: time.Unix(1519920732, 0)}
|
2017-11-22 13:40:54 +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){
|
2018-03-18 13:13:41 +00:00
|
|
|
"etc/nginx/lua/balancer.lua": etcNginxLuaBalancerLua,
|
|
|
|
"etc/nginx/lua/configuration.lua": etcNginxLuaConfigurationLua,
|
|
|
|
"etc/nginx/lua/util.lua": etcNginxLuaUtilLua,
|
2017-11-22 13:40:54 +00:00
|
|
|
"etc/nginx/nginx.conf": etcNginxNginxConf,
|
|
|
|
"etc/nginx/template/nginx.tmpl": etcNginxTemplateNginxTmpl,
|
|
|
|
"ingress-controller/clean-nginx-conf.sh": ingressControllerCleanNginxConfSh,
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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{
|
|
|
|
"etc": &bintree{nil, map[string]*bintree{
|
|
|
|
"nginx": &bintree{nil, map[string]*bintree{
|
2018-03-18 13:13:41 +00:00
|
|
|
"lua": &bintree{nil, map[string]*bintree{
|
|
|
|
"balancer.lua": &bintree{etcNginxLuaBalancerLua, map[string]*bintree{}},
|
|
|
|
"configuration.lua": &bintree{etcNginxLuaConfigurationLua, map[string]*bintree{}},
|
|
|
|
"util.lua": &bintree{etcNginxLuaUtilLua, map[string]*bintree{}},
|
|
|
|
}},
|
2017-11-22 13:40:54 +00:00
|
|
|
"nginx.conf": &bintree{etcNginxNginxConf, map[string]*bintree{}},
|
|
|
|
"template": &bintree{nil, map[string]*bintree{
|
|
|
|
"nginx.tmpl": &bintree{etcNginxTemplateNginxTmpl, map[string]*bintree{}},
|
|
|
|
}},
|
|
|
|
}},
|
|
|
|
}},
|
|
|
|
"ingress-controller": &bintree{nil, map[string]*bintree{
|
|
|
|
"clean-nginx-conf.sh": &bintree{ingressControllerCleanNginxConfSh, 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, "/")...)...)
|
|
|
|
}
|
|
|
|
|