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