-
Notifications
You must be signed in to change notification settings - Fork 1
/
vfsdata.go
202 lines (179 loc) · 11.9 KB
/
vfsdata.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
// Code generated by vfsgen; DO NOT EDIT.
// +build !dev
package templates
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
pathpkg "path"
"time"
)
// FileSystem contains project templates.
var FileSystem = func() http.FileSystem {
fs := vfsgen۰FS{
"/": &vfsgen۰DirInfo{
name: "/",
modTime: time.Date(2019, 12, 18, 15, 11, 57, 406558413, time.UTC),
},
"/control.tmpl": &vfsgen۰CompressedFileInfo{
name: "control.tmpl",
modTime: time.Date(2022, 1, 28, 10, 19, 54, 642097629, time.UTC),
uncompressedSize: 1352,
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x9c\x53\xcd\x8e\xdc\x36\x0c\xbe\xfb\x29\x54\x17\x5d\xb4\x40\xc7\xde\xb9\x15\x5d\x5b\xc5\x62\x8b\x9e\x8a\x62\xb0\x53\xf4\xce\xb5\x69\x5b\x5d\x59\x12\x24\xda\xb3\x13\xc1\xc0\xe6\x09\xe6\x90\x9c\x72\x48\x9e\x20\xc9\x39\xaf\x33\x4f\x90\x47\x08\xe4\x1f\x60\x80\xec\x04\x49\x4e\x32\xc9\xef\x23\xf9\x91\x66\xf6\x43\xa9\x0b\xda\x1b\x64\x0d\xb5\x92\x47\x59\x78\x98\x04\x55\xe7\xa8\x78\x94\xb5\x48\xc0\x8a\x06\xac\x43\xca\x3b\xaa\x56\xbf\x2d\x4e\x05\x2d\xe6\xbd\xc0\x9d\xd1\x96\x58\xa1\x15\xa1\xa2\x3c\xde\x89\x92\x9a\xbc\xc4\x5e\x14\xb8\x1a\x8d\x5f\x85\x12\x24\x40\xae\x5c\x01\x12\xf3\x75\xcc\xa3\x8c\x04\x49\xe4\xd7\x5d\x09\x85\xd0\x9d\x63\x37\x5a\x91\xd5\x92\x6d\x40\xa1\x64\xc7\xc7\x17\x6c\x6b\xb4\xbd\xcf\xd2\x09\x18\x65\x52\xa8\x7b\x66\x51\xe6\x8e\xf6\x12\x5d\x83\x48\xac\xb1\x58\xe5\xb1\xf7\xe0\x1c\xd2\x06\xa8\x61\x71\xaa\xb4\x6d\x41\x8a\x67\x98\xb4\x42\x25\x85\x73\xf1\x30\xc4\xdf\xc0\x77\xf7\x28\x91\xb4\xfa\x4e\x7a\x31\xe9\xf8\x2a\x66\x43\x64\xdc\xef\x69\x5a\x69\x45\x2e\xa9\xb5\xae\x25\x82\x11\x2e\x29\x74\x9b\x16\xce\xfd\x51\x41\x2b\xe4\x3e\xbf\x05\x89\x3b\xd8\x5f\x40\x6b\xae\x4a\xe1\x8c\x84\x7d\xee\x76\x60\x42\xf6\x16\x84\x62\x85\x04\xe7\xf2\x50\x1a\x84\x42\x1b\x96\xb8\x3e\x37\xdb\x2c\x6d\xd6\x3c\xca\x4a\xd1\x9f\xd0\xac\x96\x8e\x47\x19\x4c\x8d\x2d\x22\x5c\x6a\x2c\xf6\x6c\xdc\x40\xbe\xb1\xd8\x87\x6c\xfc\x78\x78\x97\xa5\xf0\x14\xda\x91\x36\x33\x7a\x4b\xda\xf0\xe3\xe1\xc3\x19\x64\x90\x60\xa0\x73\xb8\x24\x97\xb0\x4f\x37\xc1\xc1\x8f\x87\xf7\x67\x48\x0a\x1f\x68\xc6\xff\x83\x0f\xc4\x8f\x87\xb7\x23\xf2\x42\xdd\x39\x73\xf5\x04\xc1\xa2\x41\x58\x28\xb7\x93\x51\x02\xc1\x8a\x74\x5d\x4b\x64\xde\xaf\x98\xa8\x58\x32\x85\x86\x61\x1e\x48\x0c\x05\x89\x1e\x63\xef\x51\x95\xc3\xc0\x3f\xbe\x79\xf9\xfc\x9c\xe2\xa6\xab\x2a\xb9\xa8\xd8\xce\xd6\x53\x35\xe6\xd8\x97\x8a\x3c\x4e\x45\xee\xc2\xfe\x84\x32\x1d\xb1\x70\x96\xb9\x05\x55\x23\x6b\x85\xca\x2f\x59\x0b\x0f\xf9\xfa\xf2\x92\xf5\x20\x3b\x0c\xbf\x5e\xf2\x9f\x96\x5d\x8b\xc3\x10\xcf\x3d\x9c\xfa\x7e\x8a\xe7\x62\xfd\xe8\xe0\x51\x96\x96\xa2\xe7\x51\x66\x66\xbf\xd3\xaa\xe6\xde\x87\xfe\xfe\x0d\xec\x61\xf0\x7e\xf9\x62\x3f\x7b\xff\x57\xb8\x25\xfa\x1b\x55\x4d\x0d\x4b\xa6\x77\x18\x7e\x99\x7b\xce\x52\x73\x92\x0b\xad\xd5\x96\x4f\xbe\x65\x4e\x61\xcd\x52\x38\xe2\xd7\xa3\x58\xb6\x99\xed\x20\x74\xbc\xf1\xcf\x90\x3f\x16\x9d\xb5\xa8\x88\xdf\x4c\x2f\xdb\x6a\x55\x8f\xf0\x05\x1a\xa7\xa5\xde\x29\xa9\xa1\x4c\xbd\x4f\x36\xda\x9d\x68\xff\x73\x8e\x78\xbf\x13\xa1\xe3\x45\x8a\xf7\x49\x90\x36\x76\x1d\xf3\xe3\xeb\x57\xd3\xa4\xd3\x70\x3c\x3c\xca\x5c\x61\x85\x21\x56\x62\x85\x76\x9a\x79\xab\xcb\x4e\x22\x73\xb6\x38\x73\xdf\x2e\xf9\x7f\xba\xef\x2c\x9d\xd8\xfc\x53\x00\x00\x00\xff\xff\xf6\x37\xfa\x1c\x48\x05\x00\x00"),
},
"/error.tmpl": &vfsgen۰CompressedFileInfo{
name: "error.tmpl",
modTime: time.Date(2019, 12, 18, 15, 14, 36, 222199627, time.UTC),
uncompressedSize: 656,
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x9c\x91\x3d\x8e\x14\x31\x10\x85\xf3\x3e\x85\xe9\x80\x88\xe9\xd6\x64\x68\xb1\x4d\x40\x0c\x42\xec\x5e\xa0\xe4\xae\x19\x97\xc6\x7f\x72\xd5\x6e\xd3\x58\x2d\x71\x07\x6e\xc8\x49\x90\x67\xb5\x01\x09\x62\x36\xb2\xfd\xfc\xbe\xb2\xf5\x9e\x7e\xb3\x64\x27\x5b\x41\xe5\x25\x06\x3b\xe8\xbe\xa8\x00\xe9\x6c\x30\xd9\x41\x47\x14\x50\xce\x43\x65\x14\xf3\x28\xa7\xc3\xfb\x17\x31\x41\x44\xf3\x44\xb8\x96\x5c\x45\xb9\x9c\x04\x93\x98\x71\xa5\x45\xbc\x59\xf0\x89\x1c\x1e\xae\x87\x77\x94\x48\x08\xc2\x81\x1d\x04\x34\xc7\xd1\x0e\x5a\x48\x02\xda\xd6\xa6\x7b\x01\x79\xe4\x4f\x79\xc1\x7d\x57\xad\x79\x91\xf2\x2c\x3d\xe0\x77\x51\x7f\x5f\xff\xfe\xf9\x4b\xdd\x97\x5c\x2f\x7a\x7e\xe6\x07\x1d\x28\x5d\x54\xc5\x60\x58\xb6\x80\xec\x11\x45\xf9\x8a\x27\x33\xb6\x06\xcc\x28\x5f\x41\xbc\x1a\xe7\x94\x6b\x84\x40\x3f\x70\x8a\x94\x26\xc7\x3c\xee\xfb\x78\x03\xcf\x17\x0c\x28\x39\xbd\x12\xc7\x5a\x73\xfd\x2f\xae\x07\xc0\x77\xf3\x7c\xca\x49\x78\x3a\xe7\x7c\x0e\x08\x85\x78\x72\x39\xce\x8e\xf9\xe3\x09\x22\x85\xcd\x7c\x83\x80\x2b\x6c\x6f\x21\x96\x0f\x0b\x71\x09\xb0\x19\x5e\xa1\xf4\xe9\x11\x28\x29\x17\x80\xd9\xf4\x5a\x80\x12\xd6\xde\xec\xf1\xc6\xc0\xf5\xec\x8f\x76\xd0\xc5\xb6\xb6\x92\x78\x35\x3d\x6c\xa5\xcb\x2e\x2f\xd7\xee\xba\xe3\xba\xbf\x53\xad\x61\x5a\xf6\xfd\xc5\xf8\x05\x62\x1f\xff\x4f\xe7\xf4\x19\x99\xe1\x7c\x7d\xa7\xd8\x41\xcf\xfd\xdb\xf6\x4f\x00\x00\x00\xff\xff\x13\x90\x92\x35\x90\x02\x00\x00"),
},
"/playlist.tmpl": &vfsgen۰CompressedFileInfo{
name: "playlist.tmpl",
modTime: time.Date(2022, 1, 28, 10, 11, 34, 691031220, time.UTC),
uncompressedSize: 1112,
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x9c\x54\xcd\x6e\x14\x3d\x10\xbc\xcf\x53\xf4\x37\x8a\x3e\x81\x94\x1d\x93\x03\x02\x2d\xb6\x51\x24\xe0\x84\x10\x02\x2e\x1c\x9b\x99\xde\x1d\x27\xfe\xc3\xee\xcd\xb2\x58\x23\xf1\x0e\xdc\x38\xf0\x70\x79\x12\xe4\x9d\x4d\xf6\x12\x22\xe0\x64\xb5\x5d\x5d\x6e\x57\xd5\x8c\xfc\x6f\x08\x3d\xef\x22\xc1\xc8\xce\xea\x46\xd6\x05\x2c\xfa\xb5\x22\xaf\x1b\xe9\x88\x11\xfa\x11\x53\x26\x56\x1b\x5e\x2d\x9e\xde\x6c\x7a\x74\xa4\xae\x0c\x6d\x63\x48\x0c\x7d\xf0\x4c\x9e\x55\xbb\x35\x03\x8f\x6a\xa0\x2b\xd3\xd3\x62\x5f\x9c\x1a\x6f\xd8\xa0\x5d\xe4\x1e\x2d\xa9\x47\xdd\x93\xc7\xad\x6e\x24\x1b\xb6\xa4\x4b\xe9\xde\xa0\xa3\x69\x82\xeb\x6f\xdf\xe1\x7d\x0c\xe9\x52\x8a\xf9\xa8\x91\xd6\xf8\x4b\x48\x64\x55\xe6\x9d\xa5\x3c\x12\x31\x8c\x89\x56\xaa\x2d\x05\x73\x26\x7e\x8b\x3c\x42\x2b\x7c\x48\x0e\xad\xf9\x4a\x9d\x33\xbe\xeb\x73\x6e\xa7\xa9\xfd\x8b\xfe\x7c\x49\x96\x38\xf8\x7f\x6c\x8f\x16\x77\xd6\x64\xfe\xa3\xd6\x91\x39\xe6\xa5\x10\xab\xe0\x39\x77\xeb\x10\xd6\x96\x30\x9a\xdc\xf5\xc1\x89\x3e\xe7\xe7\x2b\x74\xc6\xee\xd4\x3b\xb4\xb4\xc5\xdd\xff\xe8\xe2\xb3\xc1\xe4\x7a\x87\xca\x5b\x8c\x95\xdd\xa1\xf1\xd0\x5b\xcc\x59\x55\xdd\xd1\x78\x4a\xd5\xba\xb3\xa3\x9c\x52\x8c\x67\xba\x91\xf1\x00\xa3\x94\x42\xd2\x52\x44\xdd\xc8\x60\x0f\x9b\x37\x73\xeb\xa6\x94\x05\x24\xf4\x6b\x82\x13\x33\x7c\x39\x85\x13\xf2\x9c\x76\xb0\x54\xd0\xbd\xf4\x9c\x0c\xe5\x69\xaa\x8f\x2a\xc5\xac\x80\x3e\xef\x51\x70\xd2\x9d\xf7\x6c\xae\xaa\x77\x33\x1f\xee\x4b\x30\x83\x6a\xfb\x4d\x4a\xe4\xb9\x2d\x85\xfc\x30\x4d\xba\x91\x03\x31\x1a\x9b\x75\x23\xf3\xc6\x39\x4c\x3b\x2d\xf1\x20\x89\xb8\xd8\xb8\x28\x4a\xa9\xac\x55\xbe\x52\xba\x0f\x35\x01\xf5\x15\xa8\xe1\x41\x29\xaf\xaa\xc1\xfc\x9a\xfc\x9a\x47\xe8\xe6\x75\x9a\x1e\xc2\x91\x62\x08\x5b\x6f\x03\x0e\x47\x1a\xd8\xa7\x48\xb5\x2f\x0e\x27\x70\xa4\x6d\xf5\xf5\xcf\x1f\x95\x5b\x8a\x9b\x61\x9a\x52\xb6\xa6\x92\x57\xf9\x60\x31\x4d\x00\x32\xea\x3d\x7e\x09\xb5\xb5\x0e\x13\xf5\xe1\x3d\xb7\xe8\xf3\xc4\x26\x73\xc5\xcb\xa8\xe7\x62\x79\x0f\xda\x7e\xda\xb8\x3d\x79\x45\xd7\xe2\x3e\xee\x8f\x84\xe9\x76\x92\x5a\x2c\xe1\x0e\xb4\x8c\x7a\xd6\xa3\xde\x7b\xb7\x4e\xb3\xed\xe2\xe8\x80\xb0\x66\xf6\xfc\x40\x21\x42\xfd\xf2\x45\x8d\x55\xf5\xa7\x4f\x26\x32\x0c\xb4\xa2\x04\xf5\xd7\xa0\x5c\x18\x36\x96\x20\xa7\xfe\xb7\xd1\xbf\x98\x93\x2f\xc5\xdc\xad\x7f\x05\x00\x00\xff\xff\x2d\x10\x5d\x4c\x58\x04\x00\x00"),
},
}
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
fs["/control.tmpl"].(os.FileInfo),
fs["/error.tmpl"].(os.FileInfo),
fs["/playlist.tmpl"].(os.FileInfo),
}
return fs
}()
type vfsgen۰FS map[string]interface{}
func (fs vfsgen۰FS) Open(path string) (http.File, error) {
path = pathpkg.Clean("/" + path)
f, ok := fs[path]
if !ok {
return nil, &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist}
}
switch f := f.(type) {
case *vfsgen۰CompressedFileInfo:
gr, err := gzip.NewReader(bytes.NewReader(f.compressedContent))
if err != nil {
// This should never happen because we generate the gzip bytes such that they are always valid.
panic("unexpected error reading own gzip compressed bytes: " + err.Error())
}
return &vfsgen۰CompressedFile{
vfsgen۰CompressedFileInfo: f,
gr: gr,
}, nil
case *vfsgen۰DirInfo:
return &vfsgen۰Dir{
vfsgen۰DirInfo: f,
}, nil
default:
// This should never happen because we generate only the above types.
panic(fmt.Sprintf("unexpected type %T", f))
}
}
// vfsgen۰CompressedFileInfo is a static definition of a gzip compressed file.
type vfsgen۰CompressedFileInfo struct {
name string
modTime time.Time
compressedContent []byte
uncompressedSize int64
}
func (f *vfsgen۰CompressedFileInfo) Readdir(count int) ([]os.FileInfo, error) {
return nil, fmt.Errorf("cannot Readdir from file %s", f.name)
}
func (f *vfsgen۰CompressedFileInfo) Stat() (os.FileInfo, error) { return f, nil }
func (f *vfsgen۰CompressedFileInfo) GzipBytes() []byte {
return f.compressedContent
}
func (f *vfsgen۰CompressedFileInfo) Name() string { return f.name }
func (f *vfsgen۰CompressedFileInfo) Size() int64 { return f.uncompressedSize }
func (f *vfsgen۰CompressedFileInfo) Mode() os.FileMode { return 0444 }
func (f *vfsgen۰CompressedFileInfo) ModTime() time.Time { return f.modTime }
func (f *vfsgen۰CompressedFileInfo) IsDir() bool { return false }
func (f *vfsgen۰CompressedFileInfo) Sys() interface{} { return nil }
// vfsgen۰CompressedFile is an opened compressedFile instance.
type vfsgen۰CompressedFile struct {
*vfsgen۰CompressedFileInfo
gr *gzip.Reader
grPos int64 // Actual gr uncompressed position.
seekPos int64 // Seek uncompressed position.
}
func (f *vfsgen۰CompressedFile) Read(p []byte) (n int, err error) {
if f.grPos > f.seekPos {
// Rewind to beginning.
err = f.gr.Reset(bytes.NewReader(f.compressedContent))
if err != nil {
return 0, err
}
f.grPos = 0
}
if f.grPos < f.seekPos {
// Fast-forward.
_, err = io.CopyN(ioutil.Discard, f.gr, f.seekPos-f.grPos)
if err != nil {
return 0, err
}
f.grPos = f.seekPos
}
n, err = f.gr.Read(p)
f.grPos += int64(n)
f.seekPos = f.grPos
return n, err
}
func (f *vfsgen۰CompressedFile) Seek(offset int64, whence int) (int64, error) {
switch whence {
case io.SeekStart:
f.seekPos = 0 + offset
case io.SeekCurrent:
f.seekPos += offset
case io.SeekEnd:
f.seekPos = f.uncompressedSize + offset
default:
panic(fmt.Errorf("invalid whence value: %v", whence))
}
return f.seekPos, nil
}
func (f *vfsgen۰CompressedFile) Close() error {
return f.gr.Close()
}
// vfsgen۰DirInfo is a static definition of a directory.
type vfsgen۰DirInfo struct {
name string
modTime time.Time
entries []os.FileInfo
}
func (d *vfsgen۰DirInfo) Read([]byte) (int, error) {
return 0, fmt.Errorf("cannot Read from directory %s", d.name)
}
func (d *vfsgen۰DirInfo) Close() error { return nil }
func (d *vfsgen۰DirInfo) Stat() (os.FileInfo, error) { return d, nil }
func (d *vfsgen۰DirInfo) Name() string { return d.name }
func (d *vfsgen۰DirInfo) Size() int64 { return 0 }
func (d *vfsgen۰DirInfo) Mode() os.FileMode { return 0755 | os.ModeDir }
func (d *vfsgen۰DirInfo) ModTime() time.Time { return d.modTime }
func (d *vfsgen۰DirInfo) IsDir() bool { return true }
func (d *vfsgen۰DirInfo) Sys() interface{} { return nil }
// vfsgen۰Dir is an opened dir instance.
type vfsgen۰Dir struct {
*vfsgen۰DirInfo
pos int // Position within entries for Seek and Readdir.
}
func (d *vfsgen۰Dir) Seek(offset int64, whence int) (int64, error) {
if offset == 0 && whence == io.SeekStart {
d.pos = 0
return 0, nil
}
return 0, fmt.Errorf("unsupported Seek in directory %s", d.name)
}
func (d *vfsgen۰Dir) Readdir(count int) ([]os.FileInfo, error) {
if d.pos >= len(d.entries) && count > 0 {
return nil, io.EOF
}
if count <= 0 || count > len(d.entries)-d.pos {
count = len(d.entries) - d.pos
}
e := d.entries[d.pos : d.pos+count]
d.pos += count
return e, nil
}