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