-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindata.go
260 lines (231 loc) · 11.6 KB
/
bindata.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
// Code generated by go-bindata.
// sources:
// data/server.key
// data/server.pem
// DO NOT EDIT!
package main
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 _dataServerKey = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x6c\xd3\xb7\xb6\xab\x46\x00\x85\xe1\x9e\xa7\x38\xbd\x96\x97\x24\x40\x81\xe2\x16\x33\xe4\x9c\x41\xd0\x91\x73\x90\x10\x0c\xc3\xd3\xdb\x3e\xf5\xdd\xed\x6e\xfe\xe6\xfb\xe7\xff\x41\x5e\x94\x8d\x1f\xc7\x05\x3f\x96\x23\x07\xc0\xe3\x7f\x54\x3e\xfa\x7d\x08\x5d\x96\xd9\x10\xc9\x10\x00\x15\x56\x36\x57\xa3\xdd\x1f\x55\x16\xf5\x6e\x12\x02\x74\x98\x90\xd4\x5c\x29\x28\x2a\x45\xda\x1e\x1c\x17\x0e\xcd\xe8\x55\x34\x3a\x34\x6d\x29\x4f\x9a\xfd\x1c\x63\x22\x9d\xdb\x72\xbc\x6d\x95\x7c\xec\xec\xea\xd4\xb4\x33\x33\x76\xa4\xdf\x84\xba\xfc\x28\x2f\x06\x65\x51\x82\xac\xb3\xe4\xa5\xca\x63\x7e\x68\x81\x6d\x92\x76\x04\xac\x53\xd2\xe9\x9e\xb4\x57\xea\xaa\x13\xf0\x08\x82\xd3\x89\x42\xa1\x37\xa9\x65\x10\xfb\xad\xf0\x7a\x8e\xa5\x57\x8a\xba\x88\x42\x20\x29\xdc\xd8\xf3\xe2\xe8\xd3\xdf\x9e\xf1\xd7\x76\x62\x03\x9a\x37\x94\xef\x21\x4c\xb6\xcc\x01\x1b\x40\x02\x4c\x22\x50\x4e\xf7\x7a\x3e\x8c\x0f\x49\x63\xcf\x8e\xbf\x42\x68\xcf\xdc\xcc\x63\x61\xee\xf3\x5c\x55\x74\x73\xe7\x70\x42\xb9\xcc\x3c\xab\xd4\xe6\x85\x1f\x59\xf6\x02\x72\x37\xb2\x35\x43\x0f\x99\xc8\x0a\x2f\xcd\xf1\x47\x5c\x70\xbb\xf8\x97\xb3\x94\xb3\x99\x5c\x32\x78\x20\xdb\x72\x10\x35\x1f\x0d\xb8\xee\xbf\x6a\x80\x2e\x76\x94\x09\xf0\xf2\xd2\xba\xec\x32\xca\xb7\x68\xe3\xa3\xa9\x08\xb8\x8a\x98\x86\x58\x7e\x8d\x57\x9e\xe2\xc3\xd3\xe2\xca\xa1\x9b\x76\xfa\xca\xa4\x11\xd9\x2d\x5f\xf5\xe5\x90\x7e\x3c\xe8\x55\xc8\x7d\x07\xc8\x5b\x7a\xc2\xb3\xb6\xcd\xdd\xb1\x47\x7b\x20\xd6\x6f\xb5\x08\x53\x22\x6b\xa0\x5a\xe9\xbe\x75\xb7\x90\x59\x5b\xb5\xa9\x5b\xf2\xd6\xb4\xe6\xed\x02\x9a\xf5\xde\xac\x6c\xf0\x7c\xf6\x57\x5b\xc6\xd4\xb3\x0a\x83\x7a\x6f\x8d\xcf\xfb\x6e\x51\xf4\xbd\xa5\x65\x58\x9d\x3a\x48\x30\x49\x8f\x66\xd6\xe4\x40\xc7\x83\xdb\xe8\x8e\x03\xd3\xdd\x71\x17\x15\x76\x68\xb8\x97\xd2\x08\x1b\xa7\x19\xd9\xbc\x27\x29\xf0\x58\x17\x4e\x74\x57\x55\xed\x87\xcb\x95\x69\xa6\x41\x39\x3b\x55\x4e\xe8\x2a\x67\xce\x97\xf7\x99\x34\xa7\xe5\x9b\x7e\x0b\x33\xd4\x49\xdd\x11\x4a\xba\xd5\x25\x0a\xe1\x80\x45\x0a\x28\x41\xde\x2a\xcf\xe5\x98\x0c\xd5\x73\xdc\xa4\x72\xd3\x9a\xd9\x42\x5c\x8d\x90\xdc\x08\x19\xe2\xec\xde\xd3\x9e\xb7\xc6\xb6\xe2\x88\x07\xbb\x15\x49\x79\x30\xfd\xb4\xad\x90\x0a\xa7\x9a\x05\x30\xb7\x9d\x9c\x59\x3b\xf6\xa5\x91\xec\xbc\xf0\xf3\xfb\xe8\x92\xd2\xb4\x15\xa0\xf8\x6d\x46\xf8\x6e\x91\x73\xfd\x9b\x3a\xc4\x18\x45\xfa\x35\x42\xcf\xfc\xe9\xac\xcd\x07\xfa\x42\x6c\xbc\x95\xa2\x8f\x92\xe6\x34\x3a\x11\xdb\x73\x9d\x13\x08\x55\x7a\xc3\xdd\x32\x45\x38\x4b\xdf\x37\x6f\x17\x27\x22\x28\xde\xaa\xb9\x55\xd6\xdc\xd2\x4e\x68\x49\xbd\xf6\x5f\xb2\xe8\xeb\x1d\x95\xbe\x3d\xe6\xba\x43\x9f\x1d\x35\x67\x39\x6f\xe5\xc4\xce\xd2\x5c\xdd\x0b\x8c\x6c\x0f\x72\x20\xb8\xef\x1d\x3e\xe8\x84\x70\x24\x4a\x7e\x9c\x4f\xb8\xa5\xe2\xdd\x21\x95\x29\x94\x2a\x1f\xc5\x8f\x3e\xee\xae\xc1\x58\x97\xa5\x80\x8b\x87\x0b\x5f\x38\xa9\xfe\xfc\x21\x7e\xf9\xf0\x06\xf7\x77\x56\xff\x06\x00\x00\xff\xff\x8c\x8d\x56\x78\x77\x03\x00\x00")
func dataServerKeyBytes() ([]byte, error) {
return bindataRead(
_dataServerKey,
"data/server.key",
)
}
func dataServerKey() (*asset, error) {
bytes, err := dataServerKeyBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "data/server.key", size: 887, mode: os.FileMode(420), modTime: time.Unix(1467124545, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _dataServerPem = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x64\x93\x49\x93\xb3\x36\x10\x86\xef\xfc\x8a\xdc\xa7\x52\x16\x78\x19\x7c\xc8\x41\x42\x62\x33\xc2\x23\x2c\xc0\x70\x63\xb7\x59\x8c\x6d\x66\x2c\xf0\xaf\x8f\x99\xc9\x97\xaa\xe4\x53\x95\x2e\x6f\xb7\x5a\x5d\xcf\xdb\xfd\xe7\x7c\x10\x31\x2c\xf7\x0f\x8d\x78\xdc\xd2\x2d\x0d\x72\xf2\xad\x4a\xd4\xb2\xb4\xee\xa9\x69\xb0\x3a\x54\x50\x58\x08\x56\xaf\xfb\x84\x2e\xaa\x9a\xdb\xa9\x39\x1b\x5b\x01\x10\x64\xbe\x0e\x31\x0a\x29\x1b\x84\xc6\x22\x1c\x30\x66\x10\x61\xa3\x80\x13\x2e\xd1\x57\x61\x28\xfb\x44\x83\x62\xe7\x2b\xdb\xcf\xf8\x20\xf3\xdc\xd0\x41\xcc\xc9\x89\x22\xf5\x27\x56\x89\xe8\x10\xae\x41\x7c\xb4\xbf\xe2\x23\xab\x02\xa5\x6d\x62\xa5\x05\xd9\x84\x98\x94\x9b\x4d\xc5\x4d\xaf\xa1\x4c\x15\xf8\xa7\x3a\xc6\x30\x7e\x25\xbb\x20\x52\x88\x30\x4f\x99\x4b\x39\x13\xee\xd3\x9a\x28\x8e\x04\xc5\xfe\x32\x9c\xb5\x7a\xd6\xc8\x5a\xfa\x57\xac\x51\xf3\xbf\x16\x03\xff\x49\x3c\x0a\xff\xe9\x02\x51\xeb\x10\x8e\x43\x12\xae\x1f\xc9\x91\x8e\x04\xc3\x3d\xaa\xdc\x40\x42\x30\xe3\x08\xb8\x7d\x12\xba\xa7\x58\x51\x47\x1d\xc3\xc3\x1c\x40\xb0\xe7\x1a\xc8\x1f\xa9\x92\x0f\xf1\x01\xd9\x69\x47\xbf\xa8\xd7\x0b\x03\xfe\x74\xa9\x23\x72\x73\x2e\x5e\x2b\x65\x4b\xf6\x15\x2b\xdb\x47\xac\x8c\xad\xd3\xb9\x8f\x94\x6b\xe8\xf2\x1b\x44\xa2\xc3\xd7\x87\x35\x83\xa2\x8a\x1a\xad\x8a\x08\x5c\x65\x34\xb0\xa7\x6a\x90\x6c\xbf\x6b\x2b\x4a\x9f\x55\x7e\x06\x27\xf9\xd8\x6b\xde\xfb\x9b\x10\xf2\xb5\xbf\x82\xd5\x9e\xd2\x69\x7a\x37\x17\x67\xf0\x61\x2b\xe1\x26\x5a\xae\xdf\xd2\x95\x46\x55\x76\x6f\xa2\x82\x24\xa5\x6f\xe0\xbd\xe4\x45\xc7\xcd\x14\x2c\x32\xd3\x30\x06\xbc\x18\x81\x32\x15\x9b\x62\x92\x7d\xfc\xd9\x18\x10\x2f\xba\x2b\x26\xa3\x1a\x69\xf7\x1a\x66\x72\x50\x3e\x3e\x55\xbd\xd9\x68\x17\x39\x0c\xac\x31\x58\xd8\x4b\x20\x2d\xc7\x1a\x0d\x7a\x85\x26\xb6\x5e\x7b\xe8\x2a\xef\x9d\xb8\x0c\x9c\x7e\x03\xdb\x02\xe1\x43\x9a\x8d\xc9\xec\x30\x81\x30\x71\xef\xd4\x68\x7e\x20\x7b\x80\x23\x68\x09\x88\xa1\x23\xcd\xc0\x4c\xa6\x12\x04\xa9\x86\x0a\x28\xb8\xf8\x4e\xf0\x10\xa9\x84\xd7\x5b\x6c\x77\x5e\x7f\x5b\xea\x74\xbf\x80\xae\xbb\xac\xb7\xa2\x5c\xd1\xe7\xb9\xd8\x48\xa9\xb2\xbd\xce\x34\xff\x0b\xd3\x6e\xab\x93\x75\xfb\xa5\x17\xe1\x56\xce\xcd\xe0\xfc\x7a\x5c\xa7\x8a\x62\x22\xaa\xf5\x90\xd1\x79\x6e\x6c\x69\xd7\xc7\xd6\xe9\x91\xb9\x33\x69\xc4\x20\x9e\x09\x53\xc5\x3a\x03\xa7\xe2\x46\x6a\xcb\xf5\xaa\xbf\x1d\xb7\xe9\x18\x64\x63\xf7\xb6\xf0\xd6\x51\xa9\xf6\x67\x90\xc4\x37\x6e\xb7\x17\x27\x3a\x48\xe2\x98\xa1\xa9\x19\xf9\x28\xab\xf2\xf0\x1e\x4e\xa5\xbd\xda\x86\xe2\x1e\x1d\xfb\x77\xf5\xc9\x31\xbc\x94\x72\x97\x80\xf2\xe3\xb6\x2c\x56\xdd\x75\xb8\x3e\xa6\x4b\xee\x9c\xe4\xe4\x6d\x9f\xdc\xcd\x44\x2e\xa4\x84\x03\x6c\x59\x51\xf3\x7e\x7b\x19\x23\x47\x59\xd0\xd6\xa3\xb2\x9b\x9c\x1c\xdc\x65\x84\x60\x79\x17\x93\x91\x90\x8f\xa0\xb0\x59\x10\x85\xc9\xde\xf6\x7c\x45\x14\x8b\x1d\x5e\xf5\x75\xb9\x1d\xfe\x92\xbe\x77\x92\xb8\xf8\xf7\x3d\xfd\x3b\x00\x00\xff\xff\x2a\xc7\xc8\x57\xc4\x03\x00\x00")
func dataServerPemBytes() ([]byte, error) {
return bindataRead(
_dataServerPem,
"data/server.pem",
)
}
func dataServerPem() (*asset, error) {
bytes, err := dataServerPemBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "data/server.pem", size: 964, mode: os.FileMode(420), modTime: time.Unix(1467124545, 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){
"data/server.key": dataServerKey,
"data/server.pem": dataServerPem,
}
// 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{
"server.key": &bintree{dataServerKey, map[string]*bintree{}},
"server.pem": &bintree{dataServerPem, 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, "/")...)...)
}