mirror of
https://github.com/paralus/paralus.git
synced 2026-05-11 10:56:49 +00:00
* restructure rcloud-base as a single base controller * updated master.rest * moved sentry from internal to pkg as it is used by relay * removing unused rpc and it's dependencies * Fix usermgmt tests * Don't redefine variables in rest file Co-authored-by: Abin Simon <abin.simon@rafay.co>
201 lines
16 KiB
Go
201 lines
16 KiB
Go
// Code generated by vfsgen; DO NOT EDIT.
|
||
|
||
package fixtures
|
||
|
||
import (
|
||
"bytes"
|
||
"compress/gzip"
|
||
"fmt"
|
||
"io"
|
||
"io/ioutil"
|
||
"net/http"
|
||
"os"
|
||
pathpkg "path"
|
||
"time"
|
||
)
|
||
|
||
// Fixtures statically implements the virtual filesystem provided to vfsgen.
|
||
var Fixtures = func() http.FileSystem {
|
||
fs := vfsgen۰FS{
|
||
"/": &vfsgen۰DirInfo{
|
||
name: "/",
|
||
modTime: time.Date(2021, 11, 29, 20, 16, 39, 198479970, time.UTC),
|
||
},
|
||
"/agent_templates.yaml": &vfsgen۰CompressedFileInfo{
|
||
name: "agent_templates.yaml",
|
||
modTime: time.Date(2021, 11, 29, 20, 16, 39, 198236468, time.UTC),
|
||
uncompressedSize: 4282,
|
||
|
||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xe4\x57\x4d\x8f\x9b\x30\x10\xbd\xf7\x57\x8c\xb8\x43\xe9\xa9\x12\xb7\x88\x54\x6a\x0f\xdb\x56\xd9\xed\x0f\x70\xcd\x40\x2d\x19\x1b\xd9\x26\x5a\xb4\xda\xff\x5e\xd9\x98\x14\x04\x49\xa0\x9b\x0f\xaa\xe6\x06\x9e\x19\x66\xfc\xde\x73\x9e\x99\xc1\x52\x27\xef\x00\x42\x28\xd1\x90\x8c\x18\x62\x9f\xec\x4f\x90\x12\x13\x50\x24\x27\x4d\xa8\x51\x18\xd5\x84\x15\xa2\x62\xa2\x08\x35\xaa\x3d\x2a\x1f\x97\x31\x5d\x71\xd2\x7c\x75\xe1\xc1\xce\xc6\xc3\xa3\x8b\x87\xef\x6d\x3c\x3c\xba\xf8\xc0\x25\xe8\x0a\x69\xf7\x09\x26\x72\x45\x76\x98\x4f\x7f\xc6\x07\x91\xda\xc8\x1d\x16\x4c\x1b\x54\x09\x18\x55\x63\x6f\x61\x53\x55\x4a\xee\x71\xf0\x9e\x15\x42\x2a\x7c\xa8\xb9\x61\x15\xc7\xc9\x54\x83\x65\xc5\x89\xc1\xa7\xa6\xb2\x4d\xf7\xfb\x03\xf8\x25\xb5\xd1\x09\xf8\x27\xbb\x35\xf6\x4d\x02\xc1\xcb\x0b\x44\x6d\x8b\x7e\xb0\xcf\x52\x1b\x78\x7d\x0d\x0e\xa1\x00\xa6\xad\x68\x57\x6c\xf1\x4f\xcf\x06\x95\x20\x3c\x18\x57\xeb\x8f\x9c\x7c\x8c\xe3\x0f\x27\xca\x7c\x11\xb3\xca\x44\xfe\xa1\xd1\x06\x4b\x57\x13\x2e\x5c\x34\xd2\x7b\x1a\x51\x5e\xdb\x1d\x8d\xb8\xa4\x84\x2f\x6d\x9d\x89\xb4\x4d\x7f\xf2\x18\x24\x10\x74\x6b\xb2\x36\xdf\xf2\xe9\xe5\x45\xfc\xa4\x9c\xa1\x30\xab\xa5\x5b\xea\xda\xbb\xea\x86\x50\xa9\x30\x54\xc8\xdd\x94\x67\xc4\x9a\x4a\x85\xb0\xb3\xb1\x30\x14\x02\x27\x3f\x91\xeb\xe4\x80\xad\x2b\x1d\x65\xb8\x7f\x4f\xa5\x10\x48\x8d\xec\x37\x65\xe7\x3d\x2f\xf1\x3f\x8d\xdd\x57\xde\xd3\xea\xb6\xdd\xb9\x9d\x68\x53\x96\xeb\xfb\xda\x60\x92\xa2\x23\xf6\x29\x78\x32\xcc\x49\xcd\x8d\x9b\xe4\x52\xc8\xe4\x84\xeb\x6b\x4b\xe1\xe4\xc9\xbb\x7a\x6c\x6a\x7d\x5e\x66\x3f\x34\xaa\xd9\x2a\xf3\x30\xda\x9c\x01\x8a\xc3\x28\xfb\xd9\x49\x19\x1e\x91\xec\xc6\x52\xa8\x97\x30\xcd\xb1\x25\x7c\xe9\x4f\x7e\x03\x39\x3f\xb0\x67\xcc\x96\x51\xc6\x6e\xe1\x9a\x08\x43\xb3\x05\x9c\x49\xb7\xfe\x74\xb6\x53\xcc\x66\x4d\xba\x1d\xf1\xc6\xa1\x09\xa7\xe0\x9c\xea\xeb\x3e\x88\x1e\x07\x34\xdd\xbe\x01\xd2\x91\xc7\xa1\x59\xcb\x77\x6b\x63\xe2\xb7\x98\xa5\xae\xd0\xc8\x83\xc5\x70\xf1\xb2\xd3\x2e\x2c\xbe\xb7\x0b\x1b\x52\x68\x9e\xef\x38\x90\x7b\x74\x47\x98\x45\xd4\xb5\x9a\x08\x4f\xd2\xb4\x3b\x74\x57\x79\xf8\xf4\xcd\xc4\x79\x80\x36\x45\xef\x9f\x7a\xc6\xf1\x73\xc4\x7d\xfc\x3d\xac\xb7\x73\x20\xff\x1c\xae\xfe\x26\x43\xb3\xff\xe7\x0a\xf4\x3b\x00\x00\xff\xff\xcf\x9c\x3f\x88\xba\x10\x00\x00"),
|
||
},
|
||
"/relay_agent_template.yaml": &vfsgen۰CompressedFileInfo{
|
||
name: "relay_agent_template.yaml",
|
||
modTime: time.Date(2021, 11, 29, 20, 16, 39, 198406454, time.UTC),
|
||
uncompressedSize: 3897,
|
||
|
||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xd4\x57\x5f\x6f\xdb\x36\x10\x7f\xd7\xa7\x20\xfc\xd2\x97\xc9\x4e\x9a\xb5\x28\x04\xf4\x41\xb5\x93\xc6\x98\xff\x08\xb6\xb3\xb5\x18\x06\xe3\x42\x9e\x6d\x22\x14\x29\x90\x27\x27\x42\x90\xef\x3e\x50\xb2\x6c\x39\x71\xb6\x2c\x75\x36\x8c\x4f\xd1\xfd\xfd\xdd\x8f\x17\xf3\x0e\x32\xf9\x2b\x5a\x27\x8d\x8e\x18\x64\x99\xeb\xac\x4f\x83\x1b\xa9\x45\xc4\x7a\x98\x29\x53\xa4\xa8\x29\x48\x91\x40\x00\x41\x14\x30\xa6\xe0\x1a\x95\xf3\x7f\x31\x66\x31\x0b\x41\x08\xef\xbb\x7e\x1f\x5a\x54\x50\x84\xb0\xf4\x1e\xb5\x96\xab\xdc\x11\xda\x88\xb5\xee\xef\x59\xbb\x67\x6e\xb5\x32\x20\x7a\x40\xd0\xee\x56\xaa\x7e\x8f\x3d\x3c\xb4\x02\xc6\x34\xa4\x18\xb1\xd6\x4d\x7e\x8d\x61\x66\xcd\xdd\x26\x54\xf8\x22\x47\x97\x01\xc7\x88\x59\x58\x40\x11\xba\xc2\x11\xa6\x81\xcb\x90\x7b\x9c\x99\x35\x4b\x8b\xce\xf5\x10\x84\x92\x1a\xa7\xc8\x8d\x16\x2e\x62\xa7\x9f\x4e\x4e\x82\x12\xa7\x92\x1c\xbc\xa0\xfc\x5a\x4b\x4f\xc7\xa5\x74\x64\x6c\x31\x90\xa9\xa4\x88\x9d\x7a\x43\x87\x0a\x39\x19\x5b\x15\x9f\x02\xf1\xd5\xa0\xc1\x06\xf3\x04\xbe\xaa\x02\xc2\x34\x53\x40\xb8\x09\xdc\x60\xdb\x1f\xb5\x97\xe3\xf5\x59\x18\xab\x19\xf1\x87\x1b\x4d\x20\x35\xda\x6d\xe4\x90\x81\x5d\x36\xf2\x84\x2c\x0c\x53\x23\xf0\x33\x57\xb2\xbe\xd3\x5a\xae\xcc\x32\x54\xb8\x46\xf5\xf9\x6c\x2b\x47\xbd\x6e\x3a\x57\xf7\x99\x8c\x7b\xf3\x51\x3c\x3c\xdf\x2a\x18\x5b\x83\xca\xf1\xc2\x9a\x34\x6a\x08\x19\x5b\x48\x54\x62\x82\x8b\x7d\xa9\x2f\x77\xd7\xa1\xeb\xd3\x47\xca\xd2\x29\x01\x5a\x45\x5b\xda\xda\x3e\xf1\xb3\x38\xa6\x49\xdc\xfd\xb7\xc1\x94\xcd\xf9\x04\xd1\x30\xfe\x36\xef\xf5\xe3\xc1\xf4\xef\xd1\x70\xa3\x17\x72\x39\x84\xec\x17\x2c\x0e\x80\xba\xc1\x22\x62\x29\xdc\xf5\x24\x28\xf7\x48\xf7\xdc\x7f\x55\x15\xf2\x25\x4d\xb3\x3b\x26\x23\x69\x34\xa8\x88\x91\xcd\x9f\x16\x34\x39\x1f\xc4\xdf\xe7\xdd\xf1\xe8\xa2\xff\x75\x18\x27\x07\xaf\xfd\xc7\xa1\xd4\xd9\x3c\x75\xe3\xab\xd9\x3c\x99\x8c\xbf\x7d\x3f\x0e\x85\x2b\xa2\xcc\x25\x1e\xd9\x41\x12\x2b\xcc\x55\xa0\x7f\xc6\xcc\x1e\xd6\x79\x7c\x35\xbb\x3c\x1f\xcd\xfa\xdd\x78\xd6\x1f\x8f\x8e\x03\xbd\xc4\x16\xe7\xb4\x3a\x32\xf2\xcb\xd9\x2c\x39\x36\xc5\x6f\xc1\xb0\xc7\x39\xfd\x5f\xf4\xc2\x68\x7c\x4c\x98\xda\xbc\x05\xc6\x78\x30\x18\xff\x36\xef\x8f\xa6\xe7\xdd\xab\xc9\xf9\xfc\xcb\x78\x3c\x9b\xce\x26\x71\x72\x1c\xcc\xa0\x94\xb9\xed\x6b\x87\x3c\xb7\xf8\xc5\x18\x72\x64\x21\x3b\x52\x09\x32\x85\x25\x1e\x1a\x37\x26\x7e\x3a\xe9\x7b\xed\xde\xcf\x49\x69\x9f\xe4\x4a\x25\x46\x49\x5e\x44\xac\xbf\x18\x19\x4a\x2c\xba\xe6\x93\xf7\xea\xd9\xa4\x3a\x84\x36\x95\x1a\x3c\xe0\x21\x3a\xe7\x33\x96\xaf\x44\x47\xe0\xba\xd3\x50\xfa\x67\xf5\xaf\x9c\x36\x10\x2f\xa4\xda\x15\xbc\x36\x2a\x4f\x71\x68\x72\x4d\x7b\x6f\x77\xea\x25\x9b\x34\x48\xbc\xf3\x84\xc4\x63\xbc\x0c\x52\x4b\xea\x1e\x18\x24\xb8\x49\x53\xd0\xa2\x89\xc7\xad\x9a\x03\x04\x6f\x7c\xe4\xca\xcf\x58\x2c\xd4\xec\xe3\x87\x0f\x67\x1f\x1f\x5f\xa5\xc5\xa5\x74\x64\x8b\x76\x35\xdc\xa1\x58\x62\x5b\x23\x75\xca\xcf\xce\x75\xee\x8a\x6b\x73\x17\x9d\xb6\xcf\xce\x5e\x75\xa9\x0e\x29\x2c\x01\xec\x5e\x4e\x8b\xce\xe4\x96\xa3\x8b\xd8\xfd\xc3\x56\x5a\xf6\xab\xa4\xc2\xd7\x8b\x77\xd4\x6c\xed\xcc\xca\xb5\x54\xb8\x44\xf1\xa8\x1b\xdf\xee\xe2\x33\x2b\x4d\x89\x46\x81\x73\xa3\xb2\x92\x8a\x9f\xcd\xc4\x1d\x72\x2b\x49\x72\x50\xc1\xb6\x26\x02\x4b\x75\xa4\x58\xdd\x42\x51\x57\xec\xf8\x0a\x45\xae\xd0\x56\x71\x04\x2e\x20\x57\x14\x6e\xc5\xc1\x61\x02\x76\xe4\x34\x10\x7f\xb5\xc0\x31\x41\x2b\x8d\xd8\xcd\xd9\x27\x41\xb3\x57\xf7\xfa\x64\xf3\x73\xd1\x64\x73\x93\x7f\x68\x04\x46\xec\xe7\xf7\x27\xc1\xb1\xa7\x99\x1f\x8b\x12\x84\x61\x18\x3c\x9a\x03\xab\x8d\xa9\x5b\x57\x13\xd4\xe3\x3b\xaf\x3d\x5f\xb2\x00\xd5\x13\x5c\xc4\x5a\x9f\x5a\xe5\x26\xa2\xa0\x70\x11\x7b\xf7\xfb\x7d\x8b\xcc\x0d\xea\x56\xf4\x34\xc8\xcc\x2b\x7c\x80\x9f\x5a\x20\x84\x3d\x64\x32\x45\x4d\xb6\x88\x85\xb0\x95\x1d\x6a\x91\x19\xa9\xe9\x90\xed\xa5\x71\xe4\xbb\xa0\xb2\xf4\x44\x1d\x4c\xba\xd9\x57\x76\x96\xf5\x06\x33\x7b\x16\x67\xd3\xc0\xfb\x3c\xfc\xf1\xee\xbf\xdd\x2b\x5f\xda\x33\xcf\xac\x97\x7f\x06\x00\x00\xff\xff\xb7\xd7\x69\x49\x39\x0f\x00\x00"),
|
||
},
|
||
"/relay_template.yaml": &vfsgen۰CompressedFileInfo{
|
||
name: "relay_template.yaml",
|
||
modTime: time.Date(2021, 11, 29, 20, 16, 39, 198578457, time.UTC),
|
||
uncompressedSize: 5954,
|
||
|
||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\x97\x5f\x6f\xa3\x38\x10\xc0\xdf\xf9\x14\x56\xdf\x49\xbb\xda\xd5\x69\x85\xb4\x0f\x5c\x92\xb6\x51\xb7\x04\x11\xda\x55\x9f\x22\x2f\x4c\x53\xab\xc6\xf6\xd9\x43\x7a\x68\xb5\xdf\xfd\x64\x02\x04\x52\xa8\xa2\x1c\x5a\xdd\xea\x9a\xa7\xc4\x9e\x3f\xbf\x99\x8c\xed\x19\xd7\x75\x1d\xaa\xd8\x3d\x68\xc3\xa4\xf0\xc8\xf6\x83\xf3\xcc\x44\xea\x91\x80\x66\x60\x14\x4d\xc0\xc9\x00\x69\x4a\x91\x7a\x0e\x21\x9c\x7e\x07\x6e\xec\x37\x42\x12\x29\x50\x4b\xee\x2a\x4e\x05\x78\xf5\x4f\x0e\xda\xcd\xa8\xa0\x1b\xd0\x0e\x21\x82\x66\xe0\x11\x4d\x1f\x69\xe1\x9a\xc2\x20\x64\x8e\x63\x5d\xf6\xfb\x0c\xed\x8a\x41\x10\x78\x2f\x79\x9e\xc1\x94\x53\x96\x75\xfc\xb7\xed\x3d\xe7\xdf\xc1\x55\x5a\xfe\x5d\xb8\x34\x4f\x19\x56\xdb\x25\xf4\x81\x4f\xa3\x20\xb1\xea\x34\x49\xc0\x98\x5b\x99\x42\x19\x83\x4b\x22\xa0\xe9\x37\xcd\x10\x96\x22\x01\x87\x10\x0d\x46\xe6\x3a\x81\x2a\x44\x0d\x7f\xe5\x60\xb0\xfa\x45\x88\x41\xa9\xe9\x06\x3c\xf2\xe1\x8a\x39\x84\x6c\x4b\x4a\x6b\xce\x23\x97\x8c\x43\xe5\x8d\x38\x87\x59\xa5\x4a\x99\xf3\x26\xcc\x19\x28\x2e\x8b\x0c\x04\x0e\xe6\x96\x2a\xf5\x3a\xcc\xc1\xf8\x8f\x88\x5c\x83\xe2\x2c\xa1\xc6\x23\x1f\x1c\x42\x94\x96\x1b\x0d\xc6\xcc\x80\xa6\x9c\x09\x58\x41\x22\x45\x6a\x37\x3f\x5f\x5c\x38\x84\x18\xe0\x90\xa0\xd4\x3b\x98\x8c\x62\xf2\xf4\xb5\x45\x37\xcc\x87\x90\x29\x4e\x11\x2a\xc5\x56\x74\xf6\xc3\x3b\x36\x86\xad\x10\x52\x63\xd7\x75\x46\x99\x00\xdd\x68\xba\x84\xea\x4d\xcb\x8e\x4b\x5c\x37\x93\x29\x7c\x31\xa0\xb7\x65\xdd\xed\xd7\xb9\xdc\xb8\x1c\xb6\xc0\xbf\x7c\x6c\xd6\x41\x6c\xdb\xca\xbb\xa4\x86\xcb\xd9\x3a\xf0\x6f\xe7\xcd\x06\x21\x5b\xca\x73\xb8\xd4\x32\xf3\x5a\x8b\x84\x3c\x32\xe0\x69\x04\x8f\xdd\x55\x1b\x4e\xa7\xa6\xbb\x9b\xa5\x52\x48\xf1\xc9\x6b\xd2\x32\xb1\x8e\x07\x39\x56\xa1\x3f\xfd\xd5\x30\xbb\x03\x7f\x48\x14\xf9\x97\xfe\xc3\x3a\x9a\x7f\xf5\x1f\xd6\xe1\x7c\x1e\xad\xe6\xd1\xfd\xe2\x18\xb6\x44\x8a\x47\xb6\xb9\xa5\xea\x06\x8a\x1e\xc4\x67\x28\x3c\x62\x40\xa0\x2e\x26\x0a\x40\x33\xb1\x99\x3c\x49\x83\x07\x62\x03\x67\x7e\x67\xfc\x15\xec\x6a\x1e\xc4\xd1\xc3\xda\x9f\xcd\xa2\x51\x01\x69\x9a\xea\x7f\x05\xf6\xe7\x72\x19\xaf\xe2\xc8\x0f\xff\x83\x6c\xfb\xff\x76\x11\x5c\xad\xe3\xe5\xcd\x3c\x18\x07\xd0\xfe\xad\x13\x94\xcf\x20\x46\xe0\xbb\x5b\xcd\xa3\x31\xe1\x72\x33\x36\xdc\xf5\x72\x15\xaf\xc3\x65\x14\x8f\x08\x68\x4f\xc4\x44\x49\x8d\x23\x40\x4e\x97\x41\x30\x9f\xc6\xcb\x51\xd3\x98\x48\x21\xca\xd7\x62\xb4\x5c\xee\x31\x47\x4e\xe8\x1e\x75\xcc\xac\x06\xf3\xf8\xdb\x32\xba\x59\x2f\x66\xe3\x50\x6a\xe0\xb4\x10\x80\x2f\x52\x3f\x4f\x58\x7a\x12\xe1\xee\xf3\x0a\xd8\xbf\x9b\x2d\xe2\x75\xe8\xc7\xd7\xe3\xa0\x96\x8d\xd7\x44\x51\x7c\x3a\x89\x92\x65\x65\x37\x75\xf6\xe3\x07\x99\xcc\xe4\x8b\xe0\x92\xa6\x33\xfb\x18\x45\x36\x05\x0b\xbb\x4b\x7e\xfe\x3c\xeb\xca\x87\x39\xe7\xa1\xe4\x2c\x29\x3c\xb2\x78\x0c\x24\x86\x1a\xec\x45\xe8\xbc\xed\xbb\xd9\x46\xd0\x19\x13\x14\x99\x14\xb7\x60\x8c\xb5\x58\xbe\x84\xe7\x29\x6c\xcf\x5b\x9b\xb6\x75\x78\x4b\xa9\x42\xb0\x8d\x5f\x23\x56\x77\x84\xb9\xc0\x4e\x7f\x92\xd9\x95\xca\x8d\x54\x78\x5e\xc2\x9d\xd7\x6d\x6b\x17\xbc\xbd\x9a\x0a\x53\xfb\x99\xf2\xdc\x20\xe8\x4b\xa6\x9b\x17\x52\x83\x41\xaa\xb1\x96\xf0\xf9\x0b\x2d\x8c\xf3\x0a\xf8\x4a\xd3\x04\x42\xd0\x4c\xa6\x4d\xa3\xf7\xf1\xc2\x69\x13\xb7\x5a\xab\xd7\x10\x84\xa8\xbe\xc6\xbc\x5d\x10\x89\x5d\x08\xde\x6a\xce\x9d\xc1\x49\x63\x5a\xd7\xd9\x31\x9d\x7e\x53\x40\x43\x0d\x6f\xad\xbf\xaf\x4c\x8f\x9c\x1d\xe6\xfc\xac\xec\x71\x9b\xb7\xb3\xaf\x02\x57\xe5\xb6\x9f\xa6\xba\xaa\xc0\x9e\x46\xa5\x4f\x2f\x04\xd0\xd7\xd2\x60\xa5\xb5\x7f\x00\x87\x84\x63\xbb\x59\x49\xef\x5f\xa4\x3e\xe9\x3b\xd3\x95\x3e\xb8\x78\xfb\x54\xa6\xb5\x48\xbf\x5e\x73\x0b\x0e\x9e\x41\x1b\x4a\x28\x35\xb6\x01\xdf\xd4\xb2\x90\x07\x4a\x07\xf7\xd9\xa0\xaf\x60\x27\xb2\x98\x95\x7a\xc3\x05\xb3\x02\xbd\x65\x07\x83\xe9\xc9\x83\x91\x8d\xa3\x1a\x06\x77\x36\x30\x51\x6e\x49\x5c\x96\xf7\x2e\xcc\x4f\x9f\x76\xc3\x83\xd2\x12\x65\x22\xb9\x47\xe2\x69\x58\xae\x20\xd5\x1b\x28\x83\xad\xa5\x6a\x3b\x4f\x88\x95\x21\x37\x93\x82\xa1\xb4\x65\xd3\xb2\xf9\xf9\xe2\xe2\x18\xa3\x95\x58\x77\x22\xeb\x1f\x9c\x4e\x1b\x3b\xa9\x10\x12\xcb\x7b\xc2\x1c\x35\x85\xba\x48\x19\x1f\x3e\xa0\xad\xdd\x37\xd3\x3e\x34\x81\xfe\x51\x0e\xa0\xdd\x71\xf5\xb4\x71\xb4\x46\x19\x61\x26\xad\x4d\x9d\x3c\x98\x36\xfa\xef\xe3\xe7\xfb\xf8\xf9\x3e\x7e\xfe\x66\xe3\xe7\xff\xb8\x6b\x76\x3b\x37\xd7\xef\xd4\x3a\xff\xaa\xc6\xf6\x9f\x00\x00\x00\xff\xff\xe2\x5d\x18\x2b\x42\x17\x00\x00"),
|
||
},
|
||
}
|
||
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
|
||
fs["/agent_templates.yaml"].(os.FileInfo),
|
||
fs["/relay_agent_template.yaml"].(os.FileInfo),
|
||
fs["/relay_template.yaml"].(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
|
||
}
|