mirror of
https://github.com/rclone/rclone.git
synced 2024-11-26 10:25:03 +01:00
be8c23f0b4
As more assets are added, using vfsgen makes things a bit easier.
195 lines
12 KiB
Go
195 lines
12 KiB
Go
// Code generated by vfsgen; DO NOT EDIT.
|
||
|
||
// +build !dev
|
||
|
||
package data
|
||
|
||
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(2019, 5, 26, 16, 46, 1, 175147337, time.UTC),
|
||
},
|
||
"/ConnectionManager.xml": &vfsgen۰CompressedFileInfo{
|
||
name: "ConnectionManager.xml",
|
||
modTime: time.Date(2019, 5, 26, 17, 2, 39, 88414029, time.UTC),
|
||
uncompressedSize: 6158,
|
||
|
||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xdc\x58\x4b\x6f\xda\x4e\x10\xbf\xe7\x53\x58\xbe\xf3\x77\x22\xfd\x0f\x55\xb4\x38\x4a\xc9\x43\xa8\x8d\x82\x12\x82\xd4\x53\xb4\x5d\x4f\xc8\x36\xf6\xac\xb5\x3b\x86\xe4\xdb\x57\xc6\xb8\x7e\x60\x90\x29\x6b\x97\xf6\xe6\x9d\x9d\xc7\x6f\x1e\xcc\xcc\xc2\x2e\xde\xa3\xd0\x59\x80\x36\x52\xe1\xd0\x3d\xfb\xef\xd4\x75\x00\x85\x0a\x24\xce\x87\xee\xd3\xf4\x66\xf0\xc9\xbd\xf0\x4f\x98\x11\x71\xe0\xbc\x47\x21\x9a\xa1\x9b\x68\x3c\x37\xe2\x15\x22\x6e\x06\x49\x8c\xf1\x40\xe9\xf9\xb9\x01\xbd\x90\x02\x06\x67\x83\x53\xd7\x3f\x71\x1c\x66\x62\x10\xb3\x4c\x6f\x7a\x76\x1c\x16\xf1\x1f\x4a\xfb\x67\xcc\xcb\x3e\xd6\x44\x89\x4a\xfb\xa7\xcc\xcb\x3e\x52\x49\xaf\x26\xca\xb8\x20\xa9\xf0\xab\x34\xb4\x16\xca\x08\xd9\xc1\x71\x18\xf2\x08\xfc\x5b\xa0\x89\x56\xa4\x84\x0a\xc7\xf8\xa2\x98\xb7\xa2\xe6\x2c\x5c\xcf\x93\x08\x90\x0a\x25\x15\x72\x41\xca\xd5\x3d\xaa\x44\x0b\xa8\x6a\x59\xdd\x06\x52\x43\x66\x5e\x25\xc4\xbc\xe2\x58\x66\xd2\x10\x72\x82\xe0\x91\x38\xc1\x8c\x6b\xc9\xbf\x87\xb9\xca\x2a\xc8\x46\xc6\x02\x9f\xb7\x09\x70\x17\x66\x89\x6f\x76\x11\x4b\x7c\x3b\x0c\x6f\x41\x29\xa5\xcf\x2b\xe7\xaf\x31\x99\x13\x0d\x31\xd7\x70\xa3\xf4\x48\x21\x66\x70\x0f\xcd\xe8\x03\x44\x8a\x60\x7b\x8d\xd4\x62\x25\x71\xaf\x50\x5d\x3e\x5f\x3e\xdc\x3e\x4f\xbf\x4d\xae\x9f\x3b\xcc\xf0\x04\xa0\x14\x91\x3b\x8e\x7c\x0e\xba\x23\x37\x1a\xec\x74\xe8\xcb\xf8\xaa\x73\x37\x52\x13\x56\x3d\xb8\xca\x01\x75\x04\xbd\xa4\xdf\x2a\xee\xd6\x51\xdf\xb7\x5f\xf4\x13\xf6\xcb\xd9\x54\x73\x34\xb1\xd2\xd4\x1d\xfe\x9a\x11\xab\x0e\x3c\x08\xd3\x1d\xf0\xb5\xf2\x9e\x1a\x75\x91\xe6\x91\x8a\xe2\x10\x08\x0e\x6d\xd3\x47\xdf\x12\x7e\x33\x52\xb7\x40\xa3\x44\x6b\x40\x2a\x9b\x37\x36\xc3\x65\xac\xd6\x54\x33\xda\x3f\x19\x2d\x0b\x6b\xdd\xd1\x57\xd7\x5f\xd7\x38\xfe\xed\x56\xdd\x7a\x5d\x3c\x00\xff\x51\xed\x8b\x56\x46\xfe\x11\x2c\x8c\xc7\xb9\xba\xb4\xdb\x18\x0f\xc0\xde\xd5\xca\x98\x6a\x49\xec\xce\x97\xc6\x88\xe7\x76\x6c\x8f\x99\xfc\x3b\xbf\x65\xeb\xff\x2b\x56\x06\xa6\x85\x76\x66\xca\x16\x1d\x03\x18\x5c\x2f\x00\xc9\x0c\xdd\x0f\x30\x6e\x75\x48\x35\x3d\xe8\x2b\xe3\x29\xe0\xc4\xa7\x1f\x31\xf8\x86\xb4\xc4\x39\xf3\x7e\x11\xd6\x00\xcd\xa6\x7f\xfb\x21\xd8\x78\xa0\xf7\x6b\xbf\xc5\x46\x63\x19\x03\xaa\x1a\x84\x9d\x65\xb4\x0f\x92\xb4\xfe\xc3\x50\x2d\x21\x98\xf1\x30\x81\xfa\x4a\x51\xba\xf2\xef\xbf\x30\xaf\x42\xd8\xc2\x37\x52\x48\x80\x74\xa3\x74\xc4\xe9\x4e\x9a\x88\x93\x78\x6d\x27\x3a\x46\x93\xbc\xbc\x48\x21\x01\xe9\x33\xc7\x60\x29\x03\x6a\x29\xfa\x84\x1a\xc2\x55\xe4\x46\xaf\x1c\x11\xc2\xb6\x62\x6f\xa8\x96\xd8\xcc\x5c\xa5\x96\x7f\x63\x5d\xa4\xaf\x71\x50\xf5\x59\x49\x5b\xfa\xb4\xc5\x12\x1a\x63\x9c\xf6\xcb\x36\x89\xb9\x4f\x68\x2b\x6f\x1f\x79\xe9\xaf\xc1\xb4\xab\x8e\xfa\xe4\x2f\x50\xc8\xff\xbb\x44\xb0\x63\x99\xed\x0b\x42\xc3\x03\x60\x4f\xd3\xcc\x6b\x98\x7c\xcc\x33\x22\x0e\xfc\x93\x9f\x01\x00\x00\xff\xff\xaf\xba\x86\xe4\x0e\x18\x00\x00"),
|
||
},
|
||
"/ContentDirectory.xml": &vfsgen۰CompressedFileInfo{
|
||
name: "ContentDirectory.xml",
|
||
modTime: time.Date(2019, 5, 26, 17, 1, 45, 727183890, time.UTC),
|
||
uncompressedSize: 14655,
|
||
|
||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x51\x6f\xa3\x38\x10\x7e\xef\xaf\x88\xf2\xde\xa3\x95\xee\x69\x45\xb3\xda\x4b\x69\x15\xa9\x6d\x22\x92\xad\x74\x4f\x95\x0b\xb3\x89\x57\x60\x73\xe3\xa1\x4d\xff\xfd\x89\x00\x09\xa1\x84\xa6\xc1\x78\xc9\x6e\xde\xc0\xe0\x99\xcf\x1f\xe3\xf9\x6c\x33\xf6\xd7\x65\x18\xf4\x5e\x00\x15\x97\xe2\xaa\x7f\xf9\xd7\x45\xff\xeb\xe0\xcc\x56\x5e\xe4\xf7\x96\x61\x20\xd4\x55\x3f\x46\xf1\x45\x79\x0b\x08\x99\x3a\x8f\x23\x11\x9d\x4b\x9c\x7f\x51\x80\x2f\xdc\x83\xf3\xcb\xf3\x8b\xfe\xe0\xac\xd7\xb3\x55\x04\xde\x63\x6a\x26\xb9\xef\xf5\xec\x90\xfd\x94\x38\xb8\xb4\xad\xf4\x22\x6b\xe4\x42\xe2\xe0\xc2\xb6\xd2\x8b\xa4\xa7\x55\xea\x6a\x33\x8f\xb8\x14\x77\x5c\x51\xd6\x29\x6d\x48\x6f\x7a\x3d\x5b\xb0\x10\x06\xb7\x40\x53\x60\xe8\x2d\x86\x2c\x62\xcf\x3c\xe0\xc4\x41\xd9\xd6\xea\x59\xfe\x22\xc3\x79\x1c\x82\xa0\x8d\xa9\xad\xe6\x4d\x53\x6e\x74\x6d\xb1\x64\x69\xf5\x86\xcf\x11\x52\x20\x32\x26\xdb\xda\xdc\x16\x5f\x42\x08\x18\x81\x3f\x25\x46\xf0\xc8\x90\xb3\xe7\xa0\x60\xb6\x00\xb4\xf2\xc5\x0d\x46\xab\x0c\x72\xd3\x52\x20\xc6\x2a\x32\xb3\x93\x26\x89\xa4\x95\xa4\xd4\x9e\x66\x8a\xde\x81\x34\x4b\x90\xb3\x24\x10\x49\x04\xea\x66\xaa\x68\x58\x3f\x65\x3b\x60\x9b\xe3\xee\x06\x18\xc5\x08\x49\xb7\xa6\x6c\xed\x34\xd5\x90\xa7\x2d\xbb\x06\xa3\xea\x4d\x11\x84\xdf\x23\x9f\x11\x8c\xae\x9b\x92\x33\xf2\xf5\xc6\x4e\x09\x9c\x21\x5a\xfe\x41\xf9\xaa\xa0\x29\x17\xe3\xe7\x9f\xe0\x51\x99\xd3\x12\x23\x5c\x7c\x8a\x90\x6f\x4f\xdf\xdc\xdb\xa7\xd9\xbf\x13\xe7\x69\x63\xfe\xb3\xac\xd4\xa2\x4e\xc7\x7e\x13\xb0\x79\x4b\xb8\x8b\x0e\xb4\x22\xbf\xe1\x01\x01\xb6\x84\x3a\x37\xae\x15\xf1\x94\x18\x12\x17\xf3\x91\xf0\x61\xd9\x12\xf0\xcc\xb6\x56\xdc\x2e\xfc\x17\x83\x22\xf0\x87\x32\x16\xf5\x59\xf0\x70\xe0\x99\x6d\xbd\x84\x27\xf2\x8d\x9c\x00\x39\x6b\x09\xf6\xb6\x0b\xcd\xb4\xab\x38\xd0\x2b\x3a\x05\xe0\xb9\x75\xad\x90\x1f\xe2\xf0\x19\xd0\x05\x8a\x51\x80\x5e\x6d\x68\x39\x54\x66\x92\x58\x70\xcf\xc8\x5b\x94\x17\x58\xdd\xc6\x5d\xad\xe4\xfa\x30\x1b\x17\xe3\x74\x57\xd2\x54\x8c\x87\x52\x10\xe3\x02\xf0\xd8\xf4\x38\xdb\x94\xb5\x9c\xb4\x4a\x4e\x4e\xba\x7c\xd2\xe5\x93\x2e\x9f\x74\xb9\x83\xfa\x76\xd2\xe5\x8e\xe8\xf2\x10\x81\x11\xa4\xaa\xf7\xc7\xaa\xb3\x13\x40\xf2\xa0\x3e\x12\x0f\x47\xdd\xca\xdc\xdf\xeb\x5c\xa2\x41\x24\xb6\x44\x75\x37\xb3\xec\x81\x93\xe7\x1a\x14\xa1\x7c\xd3\x33\x7b\x3a\x7b\xd0\x74\x20\x39\x69\x2a\xfb\xcd\xb9\xa9\xcf\x87\x31\x22\x08\x9a\xb1\xf9\x23\x0b\x62\x68\x09\x7c\x6e\xfe\xb0\x23\xe7\xfa\xf5\x05\xbc\x76\x1a\xfc\x81\x91\x79\x2f\x5f\xfe\xe8\xb8\x7c\x80\xd7\x09\x4b\x22\xf3\x08\x81\x77\x57\xf6\x0e\x0c\xc6\x51\x18\x49\x24\x17\x94\x8c\xd1\x6b\xfc\xb7\x62\xba\xb2\xf2\xdd\x1d\xb5\xf4\x61\x57\x96\xb5\x7e\xd3\x44\x43\xb9\x60\x09\x92\x63\x82\x3d\x43\x26\xd4\x8f\x0f\x97\xba\x0d\x22\xb1\xe8\xc1\x50\x2c\x3a\xcb\x53\x2c\x9e\x62\xb1\x1b\xb1\x38\x25\x19\xe5\x6e\x75\x45\xe4\x9e\x44\x35\x58\xce\x98\xe7\xe9\x1a\x02\x20\xd0\xc5\x50\x6e\xa7\x63\xe1\x7f\x78\x61\x44\xfe\x45\x26\x28\xe7\x08\xaa\x71\x95\x4d\xa7\x43\x68\x2f\xe4\x89\xb5\xb8\xb5\x43\xb7\xb2\x97\x56\x86\x70\x07\x62\x4e\x8b\xb6\x87\x90\x7b\x69\x65\x08\xab\x03\xd0\xb6\x47\x90\x39\x31\x7a\x94\xe8\xc2\x0f\x40\x10\xcd\x53\xd1\xd1\x9e\x26\x1e\xed\xa6\xf0\x18\x77\x55\xf9\x75\xfe\xd4\xce\x6a\x85\x57\x0e\x66\x1b\xeb\xb6\x2a\x7a\xec\x29\x10\xbe\xf3\x02\x82\xd4\x55\x5f\xc8\x7e\x69\xe9\xf1\x51\xa9\xaf\xcf\x88\xcd\xde\x22\x18\x28\x42\x2e\xe6\xb6\xb5\x6e\xc8\xf0\xa9\xf7\xc3\xfb\x14\x80\xfa\x22\x5a\x13\xee\xf7\x29\x51\xd5\x8c\xe3\x0d\x54\x19\x48\x5d\x55\xe3\xda\x59\xcc\xff\xd6\xef\x7a\x9d\x7d\x72\xef\xc6\x07\xbf\x59\x08\x98\xfe\xfe\xbb\xcb\x6c\xdb\xf6\x5c\x99\x32\x7e\x15\x82\xaa\x5f\x15\x26\xfd\xd7\xd5\x8c\x98\xc4\xb1\xab\x96\xf4\x23\x0c\x89\xdc\x04\x81\x7c\x05\x7f\x7d\xc4\x5b\x54\xa2\xc2\xa3\xac\x5c\xf5\x1e\x88\x25\x26\x6c\x6b\xeb\x61\x6d\x9f\xeb\x95\x1e\x0d\x17\x3c\xf0\x11\x44\x75\xcf\xed\xd6\xa2\x8e\xe8\x23\xa9\xaa\x3c\xc6\x68\xb0\xec\xac\xbd\x30\x89\xa2\xa2\xd4\x46\x6b\x9e\xae\xf3\x5d\x51\x2d\x63\xcc\xb7\x01\x89\xaa\x73\xbf\x6b\x53\x6a\x1c\x40\xd5\xde\x52\x63\x9a\x18\x8e\xef\x27\x77\xce\xcc\xb9\xde\x2f\x43\x38\xae\x3b\x76\xf7\x7b\x75\xf4\xf0\x34\x71\xc7\xb7\xae\x33\x9d\xee\xd7\x61\x3a\x1b\x4f\x26\xbb\x80\x98\x48\x38\x75\x7b\x61\x93\x53\xbe\x66\x43\x6b\x14\xc6\xd6\x8f\xc4\x5f\x85\xe2\xdd\xb1\x59\x61\x06\x22\xdf\xc3\xb3\x6d\x55\xec\x5f\x6c\x4b\x79\x91\x3f\x38\xfb\x3f\x00\x00\xff\xff\x12\x95\x88\xd8\x3f\x39\x00\x00"),
|
||
},
|
||
}
|
||
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
|
||
fs["/ConnectionManager.xml"].(os.FileInfo),
|
||
fs["/ContentDirectory.xml"].(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
|
||
}
|