go-ethereum/cmd/faucet/website.go

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