Files
zitadel/internal/protoc/protoc-gen-authoption/templates.go
T
2020-03-23 16:28:35 +01:00

238 lines
7.6 KiB
Go

// Code generated by go-bindata.
// sources:
// templates/auth_method_mapping.go.tmpl
// 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 _templatesAuth_method_mappingGoTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x92\xc1\x6e\xdb\x30\x0c\x86\xcf\xd3\x53\x10\x86\x0f\x8d\x91\x4a\xd8\x35\x40\x0f\x43\xba\x0e\x3d\xb4\x09\xb0\x6c\xd7\x40\xb5\x19\x59\x88\x2d\x09\x92\x1c\xa0\x15\xf4\xee\x83\x6c\x67\x76\xd2\x0c\x98\x4f\xb2\xc8\x9f\x3f\x3f\x8a\x8c\xc1\x5a\x57\x08\x02\x15\x5a\xee\xb1\x82\xb7\x77\x30\x56\x7b\x5d\xde\x0b\x54\xf7\xbc\xf3\x75\x8b\xbe\xd6\x15\x85\xc7\x0d\xbc\x6e\x76\xf0\xfd\xf1\x79\x47\x09\x31\xbc\x3c\x72\x81\x10\x02\x7d\x92\x0d\xd2\x1f\x7a\x7b\x14\xf4\x95\xb7\x18\x23\x21\x44\xb6\x46\x5b\x0f\x77\x04\x00\x20\x13\x5a\x8b\x06\xa9\xd0\x0d\x57\x82\x6a\x2b\x98\xb0\xa6\xcc\xfa\x20\xf9\xd2\x79\xd9\xb8\x7d\xb2\x82\x4c\x48\x5f\x77\x6f\xb4\xd4\x2d\x2b\xb9\x76\xec\x43\x7a\x5e\x61\xc3\xa4\xf2\x68\x15\x6f\x18\x37\x92\xb1\x94\x9b\x9d\x85\xa9\xd4\x7f\x0a\x07\xd7\x05\x21\x21\x80\xe5\x4a\x20\xe4\x0e\x56\x0f\x30\x20\xfc\x44\x7b\x92\x25\x3a\x48\x04\xac\x28\x08\x14\x10\x42\xee\xce\x54\x50\x30\x42\x4e\xdc\xce\x2f\xf7\xdf\x3a\x5f\xbf\xf4\x13\x72\xf0\x00\x13\x0a\x9d\x02\x2f\xdc\x18\xa9\x04\x84\x9e\x77\xb2\x6e\x93\x75\xee\xe8\x90\x95\x0c\xc6\x2f\x04\xc8\xdb\xa4\xdf\x18\x9f\x72\xb4\xf1\x52\x2b\xc8\x5b\xba\xe9\x4f\x0e\xb2\xc4\x48\x47\x46\xda\xbb\xd2\xd3\x57\x9a\x8c\xf7\x43\x76\x06\x97\x05\xe5\x01\xb8\xaa\x66\x75\xff\x9e\xe8\x16\x6d\x2b\x9d\x4b\x16\x33\x4d\xff\x70\x2c\x84\x7c\x18\xce\x76\x78\xef\x18\xe9\x8c\x9e\x85\x30\x9e\xb2\xd5\x35\xfb\xd0\x6a\xb8\xa8\x97\xbe\xc9\x6d\x05\x59\x08\xb7\xda\x88\x31\x5b\x7e\xd2\xad\x6b\x2c\x8f\x5b\x6e\x79\x7b\xa5\xeb\x03\x4f\x12\x9b\x6a\x6c\xe5\x52\x1b\x97\xb3\x31\xa0\x3a\xcf\x39\x04\x18\x7e\x22\x21\x87\x4e\x95\x9f\x1e\x55\x5b\xf9\xc1\x13\xc2\xfe\x39\xad\x50\x89\xc6\x6b\x7b\x77\x42\x2b\x0f\x12\xed\x9c\x76\xa7\x8f\xa8\x7e\x8f\x81\x25\xa4\xbb\xb5\x56\x07\x28\xae\x26\x92\x2e\xa5\x58\x40\xda\x42\xfa\x4b\x71\xfb\x9e\x36\x0e\xed\xac\xfe\xb8\x23\x16\x7d\x67\x15\x4c\xfb\x4d\x2f\x3a\xba\xd5\xd0\xe4\xbb\xfc\xd7\x7e\x2e\x12\xeb\xc0\x0d\x31\xfe\x09\x00\x00\xff\xff\x12\xdf\x14\x2b\xfb\x03\x00\x00")
func templatesAuth_method_mappingGoTmplBytes() ([]byte, error) {
return bindataRead(
_templatesAuth_method_mappingGoTmpl,
"templates/auth_method_mapping.go.tmpl",
)
}
func templatesAuth_method_mappingGoTmpl() (*asset, error) {
bytes, err := templatesAuth_method_mappingGoTmplBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "templates/auth_method_mapping.go.tmpl", size: 1019, mode: os.FileMode(420), modTime: time.Unix(1584977173, 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){
"templates/auth_method_mapping.go.tmpl": templatesAuth_method_mappingGoTmpl,
}
// 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{
"templates": &bintree{nil, map[string]*bintree{
"auth_method_mapping.go.tmpl": &bintree{templatesAuth_method_mappingGoTmpl, 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, "/")...)...)
}