go-ethereum/cmd/faucet/website.go

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