-
Notifications
You must be signed in to change notification settings - Fork 0
/
command_center_assets.go
318 lines (280 loc) · 9.74 KB
/
command_center_assets.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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
package main
import (
"bytes"
"compress/gzip"
"encoding/base64"
"io/ioutil"
"net/http"
"os"
"path"
"sync"
"time"
)
type _escLocalFS struct{}
var _escLocal _escLocalFS
type _escStaticFS struct{}
var _escStatic _escStaticFS
type _escDir struct {
fs http.FileSystem
name string
}
type _escFile struct {
compressed string
size int64
local string
isDir bool
data []byte
once sync.Once
name string
}
func (_escLocalFS) Open(name string) (http.File, error) {
f, present := _escData[path.Clean(name)]
if !present {
return nil, os.ErrNotExist
}
return os.Open(f.local)
}
func (_escStaticFS) prepare(name string) (*_escFile, error) {
f, present := _escData[path.Clean(name)]
if !present {
return nil, os.ErrNotExist
}
var err error
f.once.Do(func() {
f.name = path.Base(name)
if f.size == 0 {
return
}
var gr *gzip.Reader
b64 := base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(f.compressed))
gr, err = gzip.NewReader(b64)
if err != nil {
return
}
f.data, err = ioutil.ReadAll(gr)
})
if err != nil {
return nil, err
}
return f, nil
}
func (fs _escStaticFS) Open(name string) (http.File, error) {
f, err := fs.prepare(name)
if err != nil {
return nil, err
}
return f.File()
}
func (dir _escDir) Open(name string) (http.File, error) {
return dir.fs.Open(dir.name + name)
}
func (f *_escFile) File() (http.File, error) {
type httpFile struct {
*bytes.Reader
*_escFile
}
return &httpFile{
Reader: bytes.NewReader(f.data),
_escFile: f,
}, nil
}
func (f *_escFile) Close() error {
return nil
}
func (f *_escFile) Readdir(count int) ([]os.FileInfo, error) {
return nil, nil
}
func (f *_escFile) Stat() (os.FileInfo, error) {
return f, nil
}
func (f *_escFile) Name() string {
return f.name
}
func (f *_escFile) Size() int64 {
return f.size
}
func (f *_escFile) Mode() os.FileMode {
return 0
}
func (f *_escFile) ModTime() time.Time {
return time.Time{}
}
func (f *_escFile) IsDir() bool {
return f.isDir
}
func (f *_escFile) Sys() interface{} {
return f
}
// FS returns a http.Filesystem for the embedded assets. If useLocal is true,
// the filesystem's contents are instead used.
func FS(useLocal bool) http.FileSystem {
if useLocal {
return _escLocal
}
return _escStatic
}
// Dir returns a http.Filesystem for the embedded assets on a given prefix dir.
// If useLocal is true, the filesystem's contents are instead used.
func Dir(useLocal bool, name string) http.FileSystem {
if useLocal {
return _escDir{fs: _escLocal, name: name}
}
return _escDir{fs: _escStatic, name: name}
}
// FSByte returns the named file from the embedded assets. If useLocal is
// true, the filesystem's contents are instead used.
func FSByte(useLocal bool, name string) ([]byte, error) {
if useLocal {
f, err := _escLocal.Open(name)
if err != nil {
return nil, err
}
return ioutil.ReadAll(f)
}
f, err := _escStatic.prepare(name)
if err != nil {
return nil, err
}
return f.data, nil
}
// FSMustByte is the same as FSByte, but panics if name is not present.
func FSMustByte(useLocal bool, name string) []byte {
b, err := FSByte(useLocal, name)
if err != nil {
panic(err)
}
return b
}
// FSString is the string version of FSByte.
func FSString(useLocal bool, name string) (string, error) {
b, err := FSByte(useLocal, name)
return string(b), err
}
// FSMustString is the string version of FSMustByte.
func FSMustString(useLocal bool, name string) string {
return string(FSMustByte(useLocal, name))
}
var _escData = map[string]*_escFile{
"/bam.css": {
local: "public/bam.css",
size: 2187,
compressed: `
H4sIAAAJbogA/5RV207rOBR971dYVPMyaqKkpC1NpZGYXjRP8w+uvZNauHZkO0AP4t+PHcdJmhZ0gBey
ve9rrc3f6GOC0FG+R5r9YqLM7d+KgoqsaTP5nBwlvXgXTF5KJWtBIyK5VDmaAimSIt3Yx0IKExX4zPgl
Rw//AX8FwwhG/0MND7Pue/asGOYzjYWONChWdLG2OOQozaqm6CltSjYvb8DKk8nRKklG3vN4AWfnPiXW
iJkA1YS9MWpOOVonf7mAM36PWstqkbj8CFWYUjtrpHzqdHFt5lAMrGesSiaCL66NHFi9qzd+TmreNMCZ
tj2aC7dNCilgkDtHSR+dI1vCGT4nnKEPFPaKMd4gly12mdA/yL0Oc6TJsLUmzaZB0SFnn21WLTmjaEoI
6V8ihSmrdY7aNQ8LxKUCELaJ1tUPtugzpfhI1mTcV3wBzuXbN3FFSrKkuIlTQL8JglVGHm+LlQpfvok6
Uhu0aqMwMUwK3W+PMl1xbPnJBGcjUBbdQkIYO5dDMqVLv+JXUI7IPMKclXbzZ0YpBxeLZwjnr0wz4yaz
rgHNJFllu7ULNvBuIgpEKuyK9OToteVtSEEF2CBNlOQcJfbXKCuaCisQpqkWG2Y49DJpJeEEMRLOwgvH
zRydWlsap0PCH6Ux8tytoWNDV6UbpmdBj/2tV495i/StS49wwPXWp8czrmrOvQTte8EltkM0n+51EoNS
sjlZI50EYdzersN8t9/tB9oID/t/t9tds51geV5nWTa/L7ArWL7S2aC902PTYRBuMmahvwZTDViRUzdQ
IGHiT1pAMVte3S1/FzqqDu/qkzeNOPDofr5q++452W63o/7yQpJat/9Erha5XD4f9utm/hOjcK1Bz3z7
pA02tY5ULYQdYYaCQRtZVa2SbvBsj2+g7Tz5quE/gKeVZatnYj1B3ensStKtCu4za3c4JLunO8wKUX3u
4ZAjYfyQtSHK5vYXLDrWdjniHn06EI5ckpcfEejqsGT+sNxb3w8o1Yrcdv47AAD//73tIoCLCAAA
`,
},
"/bam.js": {
local: "public/bam.js",
size: 342,
compressed: `
H4sIAAAJbogA/0yQQW8CIRCF7/wKbrCxEu+0h5r00KS3Hjd7QBh3SRAsDEbT+N87iJqeIG/me+/ByWRe
wGS7bNOZv3GXbD1ARDUDfgRo1+3l00nRl9a7dBaDZg0zx2P5T/xUyJdvCGAx5fcQpAh+dAbNmjanRrF9
jRZ9ivdIOfBfxnkzi8nBC4/mAJqUfcpcNtlTwEbT8XqLUwHijAsJq1Vn+Y2krTYe/aS7Rj6ktZEyiNnv
KkIZxaONmNTJhAr66aBsMKV8+YIK0zwHkGLxDkTvpO59nz/V8YFqbYZmcmVXxh6P0uwvAAD//0JT8xxW
AQAA
`,
},
"/images/info.png": {
local: "public/images/info.png",
size: 566,
compressed: `
H4sIAAAJbogA/wA2Asn9iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgI
fAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdhJREFUWIXF1z9rFEEYBvDfrQeaSLwPYKWexkJIsLJO
qfZC8IPkC4inIdiKKDaKWIuxSmlh50m0jI1IiChE8kc9QYvZI5v1crezt+c+8MIyM+/7zMzOvO8zDcVx
CtexgDmcxUza9x0f0cUaXqZtlWAWj7GPPwVtD49wfhziaazgdwRx3npYxlQs+QW8H4M4b+/QLkp+GV8q
JO/bFuaLrHwS5NlJHLkTJ1W77cN+x8AzsVIi2C3har6I9LubJ58Vf9qfZ/yP41uEb0/6K5I0wBKODdqW
IdjJfPfwM8K3mXKClrgk07cfWMQZ3CvhvyvNpIslnKuyG00ht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`,
},
"/images/start.png": {
local: "public/images/start.png",
size: 334,
compressed: `
H4sIAAAJbogA/+oM8HPn5ZLiYmBg4PX0cAkC0rJArMDBBiTflRfXACmWYifPEA4gqOFI6QDyOQs8IosZ
GLiFQZiRYdYcCaDgB08XxxCPzr3XFXWOBoqwP8hPSw4W8byc4bLKR+3yyRSjmQ6Kk5+KZ24JD4gLvPdt
2/bt2gXmyXLP/tel/376/t27d3OqK1YXn+G8rrzrxtEIId33mYmKvWJfNvR/VIkqbl9qEnXhuKLa5Iyz
zGGXMg4yHJ/htcg0d82yi7OCfZZfbEpfs/ziLO8zSy428ZldzjhrmnY54yD3NiCr1z/Z2PCY1r+lbqV7
ow/7XTapUv0xwerGD85sob0COXz+Eb+5v8V/cdnwcDur+20G9ybnP3KnfRP2O/62OOAy+YHBF7Fu3+T7
C23fcNZti54hr/pN8G2Se0GjlXCMaDzjxu+FufUZMfJAvzN4uvq5rHNKaAIEAAD//1HixQJOAQAA
`,
},
"/images/stop.png": {
local: "public/images/stop.png",
size: 140,
compressed: `
H4sIAAAJbogA/+oM8HPn5ZLiYmBg4PX0cAkC0gogzMEGJIurqr4AKZZiJ88QDiCo4UjpAPI5CzwiixkY
uIVBmJFh1hwJoKCep4tjSETr23OGjAwGPA0GUf/nmUvWNjEaXX29Ye8cZgYUEFKrKMRof7XzQT2I5+nq
57LOKaEJEAAA///mDrgYjAAAAA==
`,
},
"/": {
isDir: true,
local: "public",
},
"/images": {
isDir: true,
local: "public/images",
},
}