2020-01-26 12:58:59 +01:00
|
|
|
|
// Code generated by vfsgen; DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
package api
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"bytes"
|
|
|
|
|
"compress/gzip"
|
|
|
|
|
"fmt"
|
|
|
|
|
"io"
|
|
|
|
|
"io/ioutil"
|
|
|
|
|
"net/http"
|
|
|
|
|
"os"
|
|
|
|
|
pathpkg "path"
|
|
|
|
|
"time"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// assets statically implements the virtual filesystem provided to vfsgen.
|
|
|
|
|
var assets = func() http.FileSystem {
|
|
|
|
|
fs := vfsgen۰FS{
|
|
|
|
|
"/": &vfsgen۰DirInfo{
|
|
|
|
|
name: "/",
|
2020-02-07 21:10:22 +01:00
|
|
|
|
modTime: time.Date(2020, 1, 29, 19, 31, 6, 269744700, time.UTC),
|
2020-01-26 12:58:59 +01:00
|
|
|
|
},
|
|
|
|
|
"/bundle.js": &vfsgen۰CompressedFileInfo{
|
|
|
|
|
name: "bundle.js",
|
2020-02-08 18:45:12 +01:00
|
|
|
|
modTime: time.Date(2020, 2, 8, 17, 45, 2, 298841500, time.UTC),
|
|
|
|
|
uncompressedSize: 221355,
|
2020-01-26 12:58:59 +01:00
|
|
|
|
|
2020-02-08 18:45:12 +01:00
|
|
|
|
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xfb\x73\xdb\xb8\xd2\x28\xf8\xfb\xfc\x15\x12\xef\x2c\x3f\xe2\x18\x56\x24\x7b\x26\x93\x50\xc1\xd1\x49\x1c\x7b\x92\x99\x3c\x7c\xe2\x64\x1e\x47\xa3\xeb\xa2\x49\x48\x62\x4c\x01\x1a\x10\xb4\xe3\x91\xf4\xbf\x6f\xa1\xf1\x20\x48\xd1\x49\xe6\xfb\x6e\x6d\x6d\x6d\x6d\x95\xcb\x02\x1a\x0f\x36\x5e\x8d\x46\xa3\xbb\xd1\x9f\x57\x2c\x95\x39\x67\x11\x45\x9b\x9b\x44\xf4\x24\xd9\xec\xc6\x16\xd8\x63\x91\x40\x9b\x7c\x1e\xc9\xa9\x98\x21\x41\x65\x25\x58\x4f\x85\x07\xf4\xd3\x9a\x0b\x59\x8e\x55\x11\x4e\x14\x88\x6c\xf2\x58\xe0\x22\xee\x8f\xb0\x49\x8c\x37\xbb\xdd\xd8\x14\xa2\xaa\x50\x9a\x14\x45\xc4\x6d\x59\xcc\x71\x1d\x66\x08\xf3\x41\x41\xfa\xc3\x1a\xb6\x63\x83\x15\xa1\x98\x0d\x52\x22\x31\x1b\x64\xa4\x46\x15\x4b\x2c\xd0\x86\x0d\xb8\x0a\xa2\xed\xf6\xed\xd5\x47\x9a\xca\x41\x46\xe7\x39\xa3\xe7\x82\xaf\xa9\x90\x77\x90\x6d\x43\x59\xb5\xa2\x22\xb9\x2a\x68\xdc\x1f\xe2\x05\x95\xb1\xd8\xa1\x1d\x66\x03\x41\xfc\xa6\x07\x15\xd3\xa5\xb3\xa0\x4f\xe4\xdd\x9a\xf2\x79\xef\xe2\x6e\x75\xc5\x8b\x30\xd4\xbf\x03\xc9\x2f\xa4\xc8\xd9\xe2\x7d\xb2\x08\xc3\xfb\xbe\xb8\x9f\x17\x6f\x6e\x92\xa2\xa2\x71\xf0\x9a\x67\x55\x41\x83\x1d\xc2\xf7\x15\x0e\x2e\x2f\x69\x69\xb2\xd9\x62\xfd\xa1\x46\x57\x36\x9a\x0f\x83\x32\x0a\x65\x18\x46\x94\xa8\x06\x20\xfc\x28\x94\x76\x84\xe8\x38\x9f\x47\xdf\xa9\xd4\x80\xc3\xa7\x02\x62\xdb\x44\xc3\x50\xfd\x0d\xea\x2f\xd5\x85\xd4\x58\x0a\x62\x90\x4b\x05\x4d\x24\x8d\x58\x55\x14\x48\x55\xc7\x06\x22\x12\xf7\xa1\x2e\x70\x90\xd1\x79\x52\x15\x32\x68\xf7\xb8\x6e\x05\xdd\x21\x7c\x04\x08\x95\xd0\x2f\x75\x27\x53\x34\xe7\x22\x82\x69\xd4\xcb\x59\x8f\x22\x36\xc8\x22\x81\x39\x76\xcd\x95\x68\xe3\x26\x91\x9c\xed\x06\x57\x39\xcb\x00\x2f\xcc\x11\xb2\xf3\x4b\xa8\x3e\x62\x64\x7f\x36\xb7\x5a\x3b\x71\x39\xea\x5a\x07\x06\xf7\x5d\xdc\x91\xe8\x66\xb0\xc2\x4b\xe2\x20\x09\xb0\x44\x58\xaa\xcf\xf1\xd6\x90\x98\x8c\xa6\x8b\xd6\x82\x4b\xae\x1a\x39\x58\x26\xe5\xdb\x5b\x66\x3b\x4b\xaf\x02\x55\x40\xd5\xb1\x26\xc1\x83\x00\xb3\x88\x0d\x4a\xf2\xfd\x08\xed\xa2\x69\x63\x96\x33\x35\x33\x4b\xda\x53\xbd\x96\xca\x60\x4c\xed\xe2\x20\x2c\x1a\x3d\x46\x3b\xdc\xce\xed\x67\x38\x3a\x46\x51\x47\x96\x7b\x2a\x6c\x66\xc3\x6a\x08\x72\x9c\xe0\x02\xa6\x5a\xdf\xf4\x67\xa5\xa6\xc2\x0d\xcf\xb3\xde\x90\x10\x22\x51\x45\x18\xbd\xed\x9d\x0a\xc1\x45\x14\xbc\xce\x59\x3e\xcf\x69\xd6\xa3\x9f\x52\xba\x06\xfa\xc1\xd3\xb4\x12\x82\x66\xe3\x9e\xfa\xa8\x5c\xd2\x1e\xe3\xec\x70\x65\x33\x66\xf4\xa6\x47\xd9\x4d\x2e\x38\x5b\x51\x26\x7b\x73\x2e\x20\xd3\xbc\x2a\x8a\x1e\x55\xb5\xf6\x56\xb4\x2c\x93\x05\xed\x25\x2c\xeb\x25\x59\x96\xab\x6a\x93\xa2\xb7\xa4\xc5\x7a\x5e\x15\xbd\xdb\x44\xb0\x9c\x2d\xca\x41\x80\xc6\xb4\x28\x29\x60\x59\x92\xa9\xd7\x80\x19\x4e\xc9\x70\x1c\xf9\xa8\xca\x81\xa0\xeb\x22\x49\x69\xf4\xe0\xff\x2a\x1f\x2c\x70\xb4\x3f\xf0\xe5\x34\x3d\x38\x98\xed\x10\x42\x68\xc0\x92\x15\x25\xc1\x4b\x76\x93\x88\x3c\x61\xb2\xf7\x4b\xce\x8b\x44\x65\x0f\x76\x72\x29\xf8\x6d\xaf\x1a\xcc\x45\xb2\xa2\xe5\x7b\x7e\xce\xd7\x64\x84\xab\xdd\xee\x0b\xfd\xee\xe8\x6e\x8f\x46\xd0\xc3\x5d\x04\xe8\xf2\xf2\xdd\xe9\xd3\x93\xf7\x97\xcf\x4f\x7f\x79\xff\xf6\xed\xab\x8b\xcb\x1f\x5f\xbd\x7d\xf6\xf4\xd5\xe5\x8b\xb7\x6f\x7f\xbe\xbc\x0c\xc3\xc0\x56\x52\xaf\xef\xcf\x17\x19\xa4\x4b\x9a\x5e\x3f\x3f\x39\x45\x9b\xe1\x58\x8a\xbb\xcd\x57\x66\x8f\x28\xda\xa5\x89\x4c\x97\x6a\x5d\xa5\x9c\x95\xbc\xa0\x03\x18\x1f\x95\xb2\xdb\x45\x08\x37\x26\xde\xb0\x35\xed\xfc\x79\xe9\x2f\x51\xbb\xb4\xaa\xa2\xe8\xab\x95\xba\x4f\xae\x3a\xfa\x11\xc8\xd4\xf8\x9b\x07\xff\xe8\x7f\xd3\xeb\x9d\xf0\xf5\x9d\xc8\x17\x4b\xd9\x8b\x52\xd4\x3b\x1a\x8e\x7e\xe8\xfd\x44\xb3\xde\xaf\x89\x2c\x39\x1b\x7c\xd3\xeb\xbd\xca\x53\xca\x4a\x9a\xf5\x54\xff\xea\xd9\xf5\xfa\xe5\x7b\x0b\xee\x45\xaf\x5f\xbe\x47\xb8\x57\x52\xfa\x4d\xaf\xb7\x94\x72\x1d\x3f\x78\xf0\x91\x66\xb7\xba\xfc\x22\x97\xcb\xea\x6a\x90\xf3\x07\x69\x91\x94\xa5\x9a\x07\xe5\x37\xff\x78\xd0\xf7\xa6\x4b\x63\x54\x15\x6a\x8c\x6c\x76\xad\x25\x5f\xef\xa7\x3c\x42\x1b\x4b\xef\x28\x99\xce\xb0\x24\xc3\xb1\x7c\x92\x88\x45\xa5\x16\x40\x39\x28\x28\x5b\xc8\xe5\x58\x1e\x1c\x98\x86\x12\x97\x36\x95\x33\xb5\xfa\x84\x4e\xc8\x6d\x17\x09\x05\xb4\x64\x95\x10\x92\x6f\xb7\x01\xab\x56\x57\x54\x40\x0c\xd1\xc1\xba\
|
2020-01-26 12:58:59 +01:00
|
|
|
|
},
|
|
|
|
|
"/index.html": &vfsgen۰CompressedFileInfo{
|
|
|
|
|
name: "index.html",
|
2020-02-08 18:45:12 +01:00
|
|
|
|
modTime: time.Date(2020, 2, 8, 11, 44, 1, 15190800, time.UTC),
|
|
|
|
|
uncompressedSize: 411,
|
2020-01-26 12:58:59 +01:00
|
|
|
|
|
2020-02-08 18:45:12 +01:00
|
|
|
|
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x6c\x91\xb1\x6e\x23\x21\x10\x86\x7b\x3f\xc5\x1c\xd7\x7a\xbd\xba\xab\x5c\xc0\x36\x77\x69\xd2\x24\x52\xd2\xb8\xc4\x30\x36\x93\xb0\x33\x2b\x98\x5d\x2b\x6f\x1f\xe1\x8d\x25\x47\x0a\x14\x68\x7e\x3e\x7d\xbf\x10\xf6\xd7\xff\xa7\x7f\xaf\x87\xe7\x07\x48\x3a\xe6\x61\x63\xdb\x01\xd9\xf3\xd9\x19\x64\xd3\x02\xf4\x71\xd8\x00\x00\xd8\x11\xd5\x43\x48\xbe\x54\x54\x67\x66\x3d\x75\x7b\x73\x7f\xc5\x7e\x44\x67\x16\xc2\xcb\x24\x45\x0d\x04\x61\x45\x56\x67\x2e\x14\x35\xb9\x88\x0b\x05\xec\xae\xc3\x16\x88\x49\xc9\xe7\xae\x06\x9f\xd1\xfd\xd9\x42\x4d\x85\xf8\xbd\x53\xe9\x4e\xa4\x8e\xe5\x07\xb5\x26\x1c\xb1\x0b\x92\xa5\xdc\xd9\x7f\xff\xdd\xb7\x7d\xe3\x95\x34\xe3\x90\xe5\x5c\xd1\x97\x90\x6c\xbf\x06\x1b\xdb\xaf\x4f\xb1\x47\x89\x1f\x5f\x2c\x4b\x0d\x85\x26\x5d\xc7\xb6\x0e\x32\x03\x23\x46\x50\x01\x64\x7f\xcc\x08\x8f\x7e\xf1\x2f\x57\xac\x85\x65\x66\xd0\x44\x15\xfc\x34\xed\x56\x4b\xff\x5d\x63\x23\x2d\x40\xd1\x99\x22\xa2\x66\xb0\x7d\xa4\xa5\xd5\xaf\xbd\x76\x45\xa1\x96\xe0\xcc\x71\xe6\x98\x71\xf7\x56\x1b\x76\x73\xd8\xfe\xfa\x17\x9f\x01\x00\x00\xff\xff\x14\x1e\x33\x63\x9b\x01\x00\x00"),
|
2020-01-26 12:58:59 +01:00
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
|
|
|
|
|
fs["/bundle.js"].(os.FileInfo),
|
|
|
|
|
fs["/index.html"].(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
|
|
|
|
|
}
|