rclone/cmd/serve/http/data/assets_vfsdata.go

187 lines
29 KiB
Go
Raw Normal View History

2018-12-23 01:16:50 +01:00
// Code generated by vfsgen; DO NOT EDIT.
2021-09-09 14:25:25 +02:00
//go:build !dev
2018-12-23 01:16:50 +01:00
// +build !dev
package data
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"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, 5, 5, 16, 40, 6, 115915195, time.UTC),
2018-12-23 01:16:50 +01:00
},
"/index.html": &vfsgen۰CompressedFileInfo{
name: "index.html",
modTime: time.Date(2020, 5, 5, 16, 40, 5, 919909715, time.UTC),
uncompressedSize: 15424,
2018-12-23 01:16:50 +01:00
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x7b\x6d\x73\xdb\x46\xf2\xe7\x6b\xe9\x53\x4c\x98\xcd\x8a\x4a\xc0\xe1\x3c\x3f\x48\xa4\xf6\x6c\xc6\x59\xbb\x56\x71\x52\xb1\x9d\xad\x6c\x2a\x2f\x20\x62\x48\xe2\x0c\x02\x0c\x00\xea\xc1\x3a\x55\xdd\x87\xb8\x4f\x78\x9f\xe4\xaa\x67\x00\x12\x90\x28\x27\x7b\xf5\xdf\xbf\xec\xa2\x80\x9e\x99\x9e\x7e\xf8\x75\x4f\x37\x08\x4d\xbe\x18\x8d\xd0\xf1\x78\x8c\x66\xc5\xe6\xae\x4c\x97\xab\x1a\x31\x42\x25\xfa\x3e\xae\xeb\x95\xbb\x41\xaf\x8b\xac\x46\x71\x9e\xa0\xf7\x2b\x87\x66\x71\x92\xdc\xa1\x17\xdb\x7a\x55\x94\xd5\xf1\x78\x0c\xeb\x2e\xd3\xb9\xcb\x2b\x97\xa0\x6d\x9e\xb8\x12\xd5\x2b\x87\x5e\x6c\xe2\xf9\xca\xb5\x23\x11\xfa\xd9\x95\x55\x5a\xe4\x88\x61\x82\x86\x30\x61\xd0\x0c\x0d\x4e\xcf\x81\xc5\x5d\xb1\x45\xeb\xf8\x0e\xe5\x45\x8d\xb6\x95\x43\xf5\x2a\xad\xd0\x22\xcd\x1c\x72\xb7\x73\xb7\xa9\x51\x9a\xa3\x79\xb1\xde\x64\x69\x9c\xcf\x1d\xba\x49\xeb\x95\xdf\xa7\xe1\x82\x81\xc7\x2f\x0d\x8f\xe2\xaa\x8e\xd3\x1c\xc5\x68\x5e\x6c\xee\x50\xb1\xe8\x4e\x44\x71\xdd\x08\x0d\x3f\xab\xba\xde\x9c\x8d\xc7\x37\x37\x37\x38\xf6\x02\xe3\xa2\x5c\x8e\xb3\x30\xb5\x1a\x5f\xbe\x99\xbd\x7a\xfb\xee\xd5\x88\x61\xd2\x2c\xfa\x90\x67\xae\xaa\x50\xe9\x7e\xdf\xa6\xa5\x4b\xd0\xd5\x1d\x8a\x37\x9b\x2c\x9d\xc7\x57\x99\x43\x59\x7c\x83\x8a\x12\xc5\xcb\xd2\xb9\x04\xd5\x05\x08\x7d\x53\xa6\x75\x9a\x2f\x23\x54\x15\x8b\xfa\x26\x2e\x1d\xb0\x49\xd2\xaa\x2e\xd3\xab\x6d\xdd\xb3\x59\x2b\x62\x5a\xf5\x26\x14\x39\x8a\x73\x34\x78\xf1\x0e\xbd\x79\x37\x40\x2f\x5f\xbc\x7b\xf3\x2e\x02\x26\xff\x7c\xf3\xfe\xf5\x0f\x1f\xde\xa3\x7f\xbe\xf8\xe9\xa7\x17\x6f\xdf\xbf\x79\xf5\x0e\xfd\xf0\x13\x9a\xfd\xf0\xf6\xdb\x37\xef\xdf\xfc\xf0\xf6\x1d\xfa\xe1\x3b\xf4\xe2\xed\x2f\xe8\x1f\x6f\xde\x7e\x1b\x21\x97\xd6\x2b\x57\x22\x77\xbb\x29\x41\x83\xa2\x44\x29\x58\xd3\x25\xde\x74\xef\x9c\xeb\x89\xb0\x28\x82\x48\xd5\xc6\xcd\xd3\x45\x3a\x47\x59\x9c\x2f\xb7\xf1\xd2\xa1\x65\x71\xed\xca\x3c\xcd\x97\x68\xe3\xca\x75\x5a\x81\x57\x2b\x40\x07\xb0\xc9\xd2\x75\x5a\xc7\xb5\x27\x3d\xd1\x0b\xa3\xe3\xef\x8b\x04\xb8\x85\x19\x67\x08\xbd\x48\xe2\x4d\x1d\x4c\x55\xce\xb3\x22\x77\x68\x1d\x97\x1f\xb7\x1b\x34\x1a\x5d\x1c\x1f\x4f\xbe\xf8\xf6\x87\xd9\xfb\x5f\x7e\x7c\x85\x56\xf5\x3a\xbb\x38\x9e\x84\x5f\x47\x93\x95\x8b\x93\x8b\xe3\xa3\xa3\x49\x9d\xd6\x99\xbb\xb8\xbf\x87\x01\x84\xdf\xc6\x6b\xf7\xf0\x30\x19\x07\x2a\x8c\xaf\x5d\x1d\xa3\xf9\x2a\x2e\x2b\x57\x4f\x07\xdb\x7a\x31\x32\x83\xfd\x40\x1e\xaf\xdd\x74\x70\x9d\xba\x9b\x4d\x51\xd6\x03\x34\x2f\xf2\xda\xe5\xf5\x74\x70\x93\x26\xf5\x6a\x9a\xb8\xeb\x74\xee\x46\xfe\x26\x42\x69\x9e\xd6\x69\x9c\x8d\xaa\x79\x9c\xb9\x29\xc5\xe4\x09\xa3\x65\x51\x2c\x33\xd7\x61\x93\x17\x75\x19\xe7\x55\x16\xd7\x6e\x70\x71\x3c\xa9\xea\x3b\x10\xeb\x6b\x74\x8f\x36\x71\x92\xa4\xf9\xf2\x0c\x91\x73\xd0\x78\x99\xe6\xfe\xf2\xe1\xf8\xaa\x48\xee\xd0\xfd\xf1\xd1\xa2\xc8\xeb\xd1\x22\x5e\xa7\xd9\xdd\x19\xaa\xe2\xbc\x1a\x55\xae\x4c\x17\xe7\xc7\x47\xb5\xbb\xad\x47\xa5\x03\xe3\x7a\x0e\xc5\xa6\x4e\xd7\xe9\x27\x57\x6d\x9c\x4b\xce\x8f\x8f\xae\xe2\xf9\xc7\x65\x59\x6c\xf3\x64\x34\x2f\xb2\xa2\x3c\x43\x5f\x2e\xfc\xcf\xf9\xf1\xc3\x71\x0c\xbc\x5b\x32\x21\xca\x25\xbc\x65\x99\xb8\x79\x51\x7a\xc7\x9c\xa1\xbc\xc8\x9d\x9f\x7e\xb6\x02\x6f\x47\xc7\x2b\x8a\x9a\xeb\x2e\x03\x4e\xed\x3c\xf0\x05\x87\xc0\xbc\x2f\xab\xed\x7a\x1d\x97\x5e\x85\x46\xc7\x51\xe6\x16\xf5\x19\x92\x5f\x9d\xef\x49\x3e\xc7\x04\xda\xc3\x71\xbd\x3a\x5b\xa4\x65\x55\x8f\xe6\xab\x34\x4b\xa2\xe3\x3a\xe9\xde\x03\x27\xef\x81\x33\x44\xbf\x3a\x47\xe3\xaf\x51\x0d\x8b\x5d\xe9\x21\xba\x2e\xae\x20\x45\x7c\x3d\x0e\x7c\xb2\xb8\xc7\x66\x7f\xfb\xe7\xb9\x04\x4d\xba\xf2\xd7\xc5\xe6\x0c\x31\xb9\xb9\xed\x28\x70\x55\xd4\x75\xb1\x3e\x43\x34\x90\x0f\xd9\x9c\xc1\x3f\x6f\x1b\xba\x73\x68\x95\x7e\x72\x67\x88\x11\xbf\xc8\x53\x6e\x5c\x30\x45\x5e\x94\xeb\x38\x3b\x3f\x3e\xba\x59\xa5\xb5\x1b\x55\x9b\x78\xee\x80\x7a\x53\xc6\x9b\xf3\xe3\x23\xb0\xfc\x22\x2b\x6e\x46\xb7\x67\x68\x95\x26\x89\xcb\x5b\xb7\xb5\x23\x67\xc8\x65\x59\xba\xa9\xd2\xea\x7c\xef\x20\x6b\x6d\x23\xc1\x23\xc7\x93\xf3\xe3\xa3\x1d\xee\x90\x00\x79\x1e\x1e\x39\xf9\x09\x28\x7c\x3c\x67\x69\x40\x86\x9f\xfb\xc8\x4d\x7b\x20\x1f\x3f\x1c\xaf\x21\x03\xdf\x1f\x1f\x25\x69\xb5\xc9\xe2\xbb\x33\x74\x95\x15\xf3\x8f\x30\
2018-12-23 01:16:50 +01:00
},
}
fs["/"].(*vfsgen۰DirInfo).entries = []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(io.Discard, f.gr, f.seekPos-f.grPos)
2018-12-23 01:16:50 +01:00
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
}