alertmanager/template/internal/deftmpl/bindata.go

238 lines
16 KiB
Go
Raw Permalink Normal View History

2015-12-01 17:39:57 +00:00
// Code generated by go-bindata.
// sources:
// template/default.tmpl
// DO NOT EDIT!
package deftmpl
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
}
2017-01-03 18:44:04 +00:00
var _templateDefaultTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x1b\x7b\x6f\xdb\x36\xfe\x7f\x7d\x8a\xdf\x34\x1c\xd6\x00\x96\xe5\xb4\x5b\xb1\x38\x76\x0e\xae\xa3\x34\xc2\x39\x72\x20\x2b\xed\x8a\x61\x18\x68\x89\xb6\xd9\x4a\xa4\x46\x52\x49\xbc\xcc\xdf\xfd\x40\x4a\x7e\xc8\x96\x53\x27\xe8\x12\xdf\x2d\x09\xda\x48\x14\x7f\xef\x27\x45\xea\xee\x0e\x22\x3c\x22\x14\x83\xf9\xfb\xef\x28\xc6\x5c\x26\x88\xa2\x31\xe6\x26\xcc\x66\x1d\x75\x7f\x91\xdf\xdf\xdd\x01\xa6\x11\xcc\x66\xc6\x56\x90\x2b\xbf\xa7\xa0\xee\xee\xa0\xee\xdc\x4a\xcc\x29\x8a\xaf\xfc\x1e\xcc\x66\xf6\xf7\xb6\x9e\x27\xfe\xcd\x71\x88\xc9\x35\xe6\x6d\x35\xc9\x2f\x6e\x72\x98\x02\x7b\x19\xbd\xc8\x86\x9f\x71\x28\x15\xda\x5f\x15\xc8\x40\x22\x99\x09\xf8\x0b\x24\xbb\x4a\xd3\x39\x28\x19\x01\xfe\x63\xf1\xd0\x1c\x11\x4e\xe8\x58\xc1\x34\x15\x8c\x96\x42\xd4\xcf\xf4\x28\xfc\x05\x31\xa6\xab\x14\x7f\x03\x35\xe9\x3d\x67\x59\xda\x43\x43\x1c\x8b\xfa\x80\x71\x89\xa3\x4b\x44\xb8\xa8\x7f\x40\x71\x86\x15\xc1\xcf\x8c\x50\x30\x41\x61\x85\x9c\xe4\x58\xc2\x2b\x85\xab\xde\x65\x49\xc2\x68\x0e\x7c\x50\x8c\xad\xe0\x3b\x80\xd9\xec\xd5\xdd\x1d\xdc\x10\x39\x29\x4f\xae\xfb\x38\x61\xd7\xb8\x4c\xdd\x43\x09\x16\x85\x1a\xab\xa8\x2f\x18\x3f\x58\x5c\x6d\xb1\x4d\x84\x45\xc8\x49\x2a\x09\xa3\xe6\x3d\x3a\x96\xf8\x56\xe6\x76\xfc\x3d\x26\x42\x16\x53\x39\xa2\x63\x0c\x75\x98\xcd\x72\xbe\x9a\xc6\x72\x70\x53\x4f\x4a\x2b\x96\x56\xa4\x62\x5f\xdd\xb5\x61\x21\x40\xc1\x58\x4e\xbc\x43\x29\x93\x48\xf1\x54\x42\xb9\x32\xfc\x38\xbc\x03\x96\xf1\x10\x37\x73\x63\x62\x8a\x39\x92\x8c\xe7\xee\x67\x54\x28\xaa\xa4\x03\x11\xa3\xf0\x4b\x3d\xc2\x23\x94\xc5\xb2\x2e\x89\x8c\x71\xa1\x05\x89\x93\x34\x46\xb2\xec\x8b\xf5\x6d\x2a\x2f\xe3\xc9\x84\x0a\x81\xa4\x0a\x55\x39\xd0\x76\xc4\x37\x42\x71\x3c\x44\xe1\x97\x0d\x7c\x95\xec\x2b\xa4\xf0\x17\x7c\x6d\x62\x4c\xe8\x97\x9d\x39\x48\x39\x56\xce\x62\xee\x36\x7b\x05\xff\xbd\x0a\xd0\x69\x63\x47\x0e\x48\xc8\x28\x4e\xd8\x67\xb2\x23\x0f\x6a\x7e\xc6\xe3\x5d\x39\xde\x10\xae\xe4\x26\x13\x92\x86\x13\x24\x97\x06\xe1\x2c\x79\xbc\x71\xd7\xb1\x25\x58\x08\x34\x7e\x80\xe3\x95\x78\x4b\x15\xb5\x28\x93\xd3\x05\xbe\xcd\xe8\x7f\x98\x33\x6f\x62\x0c\x63\x82\xa9\x7c\xbc\xc4\xdb\x30\x2e\xeb\xc6\xe3\x5c\x64\x13\x2f\xa1\x42\x22\x1a\x62\x51\x81\x77\x23\xdd\xdd\xa3\x55\x96\x8a\x31\xa6\x04\x3f\xde\x48\xf7\x21\xdb\xb4\x50\x51\x1d\xb6\x24\xc3\xca\x72\x60\xac\x15\xa3\x52\xb5\x3b\x80\x06\x58\xb3\x99\x91\x0f\x42\x3e\xa8\xd3\xee\xfd\x1a\x29\x97\x4c\x4d\xc4\x5a\x91\xa8\x82\x9e\x8f\x05\x8b\xaf\x71\xb4\x46\x71\x3e\xbc\x3b\xcd\x39\xc4\x06\x55\x6b\x17\x95\x0a\x5d\x05\x1e\xee\x4d\x25\xab\x5f\x93\x50\x32\xce\x52\xf1\x50\xb3\xaf\xe7\xdb\x87\x38\xf1\x26\xd1\x47\xa4\x97\x92\x18\x38\x41\x24\x5e\x6a\x66\xd9\x49\x3d\xd8\x73\xcb\x98\x26\x32\xd1\x09\xd5\x68\x7d\x77\xda\xef\x06\x9f\x2e\x1d\x50\x43\x70\x79\xf5\xae\xe7\x76\xc1\xb4\x6c\xfb\xe3\x9b\xae\x6d\x9f\x06\xa7\xf0\xcb\x79\x70\xd1\x83\xc3\x7a\x03\x02\x8e\xa8\x20\xca\xa7\x51\x6c\xdb\x8e\x67\x82\x39\x91\x32\x6d\xda\xf6\xcd\xcd\x4d\xfd\xe6\x4d\x9d\xf1\xb1\x1d\xf8\xf6\xad\xc2\x75\xa8\x80\x8b\x4b\x4b\xae\x40\xd6\x23\x19\x99\x27\x46\xeb\x3b\xcb\x32\x06\x72\x1a\x63\x40\x34\x02\x4d\x24\xc2\x9c\x28\xbf\x51\x6a\x03\x85\x5a\x34\x6d\x7b\x4c\xe4\x24\x1b\xd6\x43\x96\xd8\x4a\x86\x71\x46\x6d\x8d\x0e\x85\x39\x3e\x4b\x8b\x66\xcd\xd5\x21\x0c\xc3\x08\x26\x18\x2e\xdc\x00\x7a\x24\xc4\x54\x60\x78\x75\xe1\x06\x07\x86\xd1\x65\xe9\x94\x93\xf1\x44\xc2\xab\xf0\x00\x5e\x37\x0e\x7f\x84\x8b\x1c\xa3\x61\x5c\x62\x9e\x10\x21\x08\xa3\x40\x04\x4c\x30\xc7\xc3\x29\x8c\x39\xa2\x12\x47\x35\x18\x71\x8c\x81\x8d\x20\x9c\x20\x3e\xc6\x35\x90\x0c\x10\x9d\x42\x8a\xb9\x60\x14\xd8\x50\x22\x42\x55\x98\x21\x08\x59\x3a\x35\xd8\x08\xe4\x84\x08\x10\x6c\x24\x6f\x10\xcf\x25\x44\x42\xb0\x90\x20\x89\x23\x88\x58\x98\x25\x98\xe6\xf9\x01\x46\x24\xc6\x02\x5e\xc9\x09\x06\x73\x50\x40\x98\x07\x9a\x48\x84\x51\x6c\x10\x0a\xea\xd9\xfc\x91\x6e\x42\x59\x26\x81\x63\x21\x39\xd1\x5a\xa8\x01\xa1\x61\x9c\x45\x8a\x87\xf9\xe3\x98\x24\xa4\xa0\xa0\xc0\xb5\xe0\xc2\x90\x0c\x32\x81\x6b\x9a\xcf\x1a\x24\x2c\x22\x23\xf5\x17\x6b\xb1\xd2\x6c\x18\x13\x31\xa9\x41\x44\x14\xea\x61\x26\x71\x0d\x84\x1a\xd4\x7a\xac\x29\x39\x6c\xc6\x41\xe0\x38\x36\x42\x96\x12\x2c\x40\xcb\xba\xe4\x4e\xcf
2015-12-01 17:39:57 +00:00
func templateDefaultTmplBytes() ([]byte, error) {
return bindataRead(
_templateDefaultTmpl,
"template/default.tmpl",
)
}
func templateDefaultTmpl() (*asset, error) {
bytes, err := templateDefaultTmplBytes()
if err != nil {
return nil, err
}
2017-01-03 18:44:04 +00:00
info := bindataFileInfo{name: "template/default.tmpl", size: 16246, mode: os.FileMode(420), modTime: time.Unix(1483467521, 0)}
2015-12-01 17:39:57 +00:00
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){
"template/default.tmpl": templateDefaultTmpl,
}
// 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
}
2015-12-01 17:39:57 +00:00
var _bintree = &bintree{nil, map[string]*bintree{
"template": &bintree{nil, map[string]*bintree{
"default.tmpl": &bintree{templateDefaultTmpl, 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, "/")...)...)
}