justlog/api/assets_vfsgen.go

209 lines
279 KiB
Go
Raw Normal View History

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