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