quorum/cmd/faucet/website.go

236 lines
20 KiB
Go
Raw Normal View History

// Code generated by go-bindata.
// sources:
// faucet.html
// DO NOT EDIT!
package main
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
)
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
var buf bytes.Buffer
_, err = io.Copy(&buf, gz)
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
if clErr != nil {
return nil, err
}
return buf.Bytes(), nil
}
type asset struct {
bytes []byte
info os.FileInfo
}
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
}
func (fi bindataFileInfo) Name() string {
return fi.name
}
func (fi bindataFileInfo) Size() int64 {
return fi.size
}
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}
func (fi bindataFileInfo) IsDir() bool {
return false
}
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _faucetHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x7a\x6d\x73\xe3\x36\x92\xf0\x67\xcf\xaf\xe8\xf0\x19\xaf\xa4\xc7\x22\x29\xdb\x33\xb3\x3e\x89\x54\x6a\x76\x36\x9b\x9d\xab\xbb\x24\x95\x4c\xea\x6e\x2b\x9b\xba\x02\x89\x96\x88\x31\x08\x30\x00\x28\x59\x71\xe9\xbf\x5f\x01\x20\x29\xea\xc5\x1e\xcf\xcb\xdd\xc5\x1f\x64\x12\x68\x74\x37\xfa\x1d\x0d\x26\x5f\xfd\xf5\xfb\x37\xef\xfe\xf1\xc3\x37\x50\x98\x92\xcf\x9f\x25\xf6\x1f\x70\x22\x96\x69\x80\x22\x98\x3f\x3b\x4b\x0a\x24\x74\xfe\xec\xec\x2c\x29\xd1\x10\xc8\x0b\xa2\x34\x9a\x34\xa8\xcd\x22\xbc\x09\x76\x13\x85\x31\x55\x88\xbf\xd5\x6c\x95\x06\xff\x19\xfe\xfc\x3a\x7c\x23\xcb\x8a\x18\x96\x71\x0c\x20\x97\xc2\xa0\x30\x69\xf0\xf6\x9b\x14\xe9\x12\x7b\xeb\x04\x29\x31\x0d\x56\x0c\xd7\x95\x54\xa6\x07\xba\x66\xd4\x14\x29\xc5\x15\xcb\x31\x74\x2f\x63\x60\x82\x19\x46\x78\xa8\x73\xc2\x31\xbd\x0c\xe6\xcf\x2c\x1e\xc3\x0c\xc7\xf9\xfd\x7d\xf4\x1d\x9a\xb5\x54\xb7\xdb\xed\x14\x5e\xd7\xa6\x40\x61\x58\x4e\x0c\x52\xf8\x1b\xa9\x73\x34\x49\xec\x21\xdd\x22\xce\xc4\x2d\x14\x0a\x17\x69\x60\x59\xd7\xd3\x38\xce\xa9\x78\xaf\xa3\x9c\xcb\x9a\x2e\x38\x51\x18\xe5\xb2\x8c\xc9\x7b\x72\x17\x73\x96\xe9\xd8\xac\x99\x31\xa8\xc2\x4c\x4a\xa3\x8d\x22\x55\x7c\x1d\x5d\x47\x7f\x8e\x73\xad\xe3\x6e\x2c\x2a\x99\x88\x72\xad\x03\x50\xc8\xd3\x40\x9b\x0d\x47\x5d\x20\x9a\x00\xe2\xf9\xa7\xd1\x5d\x48\x61\x42\xb2\x46\x2d\x4b\x8c\x5f\x44\x7f\x8e\x26\x8e\x64\x7f\xf8\x71\xaa\x96\xac\xce\x15\xab\x0c\x68\x95\x3f\x99\xee\xfb\xdf\x6a\x54\x9b\xf8\x3a\xba\x8c\x2e\x9b\x17\x47\xe7\xbd\x0e\xe6\x49\xec\x11\xce\x3f\x0b\x77\x28\xa4\xd9\xc4\x57\xd1\x8b\xe8\x32\xae\x48\x7e\x4b\x96\x48\x5b\x4a\x76\x2a\x6a\x07\xbf\x18\xdd\x87\x74\xf8\xfe\x50\x85\x5f\x82\x58\x29\x4b\x14\x26\x7a\xaf\xe3\xab\xe8\xf2\x26\x9a\xb4\x03\xc7\xf8\x1d\x01\xab\x34\x4b\xea\x2c\x5a\xa1\xb2\x96\xcb\xc3\x1c\x85\x41\x05\xf7\x76\xf4\xac\x64\x22\x2c\x90\x2d\x0b\x33\x85\xcb\xc9\xe4\x7c\x76\x6a\x74\x55\xf8\x61\xca\x74\xc5\xc9\x66\x0a\x0b\x8e\x77\x7e\x88\x70\xb6\x14\x21\x33\x58\xea\x29\x78\xcc\x6e\x62\xeb\x68\x56\x4a\x2e\x15\x6a\xdd\x10\xab\xa4\x66\x86\x49\x31\xb5\x16\x45\x0c\x5b\xe1\x29\x58\x5d\x11\x71\xb4\x80\x64\x5a\xf2\xda\xe0\x01\x23\x19\x97\xf9\xad\x1f\x73\xde\xdc\xdf\x44\x2e\xb9\x54\x53\x58\x17\xac\x59\x06\x8e\x10\x54\x0a\x1b\xf4\x50\x11\x4a\x99\x58\x4e\xe1\x55\xd5\xec\x07\x4a\xa2\x96\x4c\x4c\x61\xb2\x5b\x92\xc4\xad\x18\x93\xd8\x07\xae\x67\x67\x49\x26\xe9\xc6\xe9\x90\xb2\x15\xe4\x9c\x68\x9d\x06\x07\x22\x76\x01\x69\x0f\xc0\xc6\x21\xc2\x44\x3b\xb5\x37\xa7\xe4\x3a\x00\x47\x28\x0d\x3c\x13\x61\x26\x8d\x91\xe5\x14\x2e\x2d\x7b\xcd\x92\x03\x7c\x3c\xe4\xcb\xf0\xf2\xaa\x9d\x3c\x4b\x8a\xcb\x16\x89\xc1\x3b\x13\x3a\xfd\x74\x9a\x09\xe6\x09\x6b\xd7\x2e\x08\x2c\x48\x98\x11\x53\x04\x40\x14\x23\x61\xc1\x28\x45\x91\x06\x46\xd5\x68\xed\x88\xcd\xa1\x1f\xfe\x1e\x88\x7e\xc5\x65\xcb\x57\x4c\xd9\xaa\xd9\x56\xef\xf1\x60\x87\x0f\x6f\xe2\x06\x9a\x07\xb9\x58\x68\x34\x61\x6f\x4f\x3d\x60\x26\xaa\xda\x84\x4b\x25\xeb\xaa\x9b\x3f\x4b\xdc\x28\x30\x9a\x06\xb5\xe2\x41\x13\xfe\xdd\xa3\xd9\x54\x8d\x28\x82\x6e\xe3\x52\x95\xa1\xd5\x84\x92\x3c\x80\x8a\x93\x1c\x0b\xc9\x29\xaa\x34\xf8\x49\xe6\x8c\x70\x10\x7e\xcf\xf0\xf3\x8f\xff\x06\x8d\xca\x98\x58\xc2\x46\xd6\x0a\xbe\x31\x05\x2a\xac\x4b\x20\x94\x5a\x73\x8d\xa2\xa8\xc7\x88\xb3\xdd\x63\x56\xc3\xcc\x88\x1d\xd4\x59\x92\xd5\xc6\xc8\x0e\x30\x33\x02\x32\x23\x42\x8a\x0b\x52\x73\x03\x54\xc9\x8a\xca\xb5\x08\x8d\x5c\x2e\x6d\xa6\xf3\x9b\xf0\x8b\x02\xa0\xc4\x90\x66\x2a\x0d\x5a\xd8\x56\x87\x44\x57\xb2\xaa\xab\x46\x8b\x7e\x10\xef\x2a\x22\x28\x52\xab\x73\xae\x31\x98\x7f\xcb\x56\x08\x25\xfa\xbd\x9c\x1d\x9a\x44\x4e\x14\x9a\xb0\x8f\xf4\xc8\x30\x92\xd8\x33\xe3\xb7\x04\xcd\x5f\x52\xf3\x16\x53\xb7\x85\x12\x45\x0d\x7b\x6f\xa1\xb2\x71\x25\x98\xdf\xdf\x2b\x22\x96\x08\xcf\x19\xbd\x1b\xc3\x73\x52\xca\x5a\x18\x98\xa6\x10\xbd\x76\x8f\x7a\xbb\xdd\xc3\x0e\x90\x70\x36\x4f\xc8\x63\xe6\x0d\x52\xe4\x9c\xe5\xb7\x69\x60\x18\xaa\xf4\xfe\xde\x22\xdf\x6e\x67\x70\x7f\xcf\x16\xf0\x3c\xfa\x11\x73\x52\x99\xbc\x20\xdb\xed\x52\xb5\xcf\x11\xde\x61\x5e\x1b\x1c\x8e\xee\xef\x91\x6b\xdc\x6e\x75\x9d\x95\xcc\x0c\xdb\xe5\x76\x5c\xd0\xed\xd6\xf2\xdc\xf0\xb9\xdd\x42\x6c\x91\x0a\x8a\x77\xf0\x3c\xfa\x01\x15\x93\x54\x83\x87\
func faucetHtmlBytes() ([]byte, error) {
return bindataRead(
_faucetHtml,
"faucet.html",
)
}
func faucetHtml() (*asset, error) {
bytes, err := faucetHtmlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "faucet.html", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not found", name)
}
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
}
// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("AssetInfo %s not found", name)
}
// AssetNames returns the names of the assets.
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
}
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"faucet.html": faucetHtml,
}
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
cannonicalName := strings.Replace(name, "\\", "/", -1)
pathList := strings.Split(cannonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
}
}
if node.Func != nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}
type bintree struct {
Func func() (*asset, error)
Children map[string]*bintree
}
2017-11-08 02:45:52 -08:00
var _bintree = &bintree{nil, map[string]*bintree{
2017-11-08 02:45:52 -08:00
"faucet.html": {faucetHtml, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
if err != nil {
return err
}
return nil
}
// RestoreAssets restores an asset under the given directory recursively
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
}
func _filePath(dir, name string) string {
cannonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}