zitadel/internal/protoc/protoc-gen-authoption/templates.go

238 lines
7.7 KiB
Go
Raw Normal View History

2020-03-23 10:53:12 +00:00
// 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
}
2020-03-25 09:54:45 +00:00
var _templatesAuth_method_mappingGoTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x92\xc1\x6e\xdb\x30\x0c\x86\xcf\xd5\x53\x10\x86\x0f\x4d\x90\x4a\xd8\x35\x40\x0f\x43\xba\x0e\x3d\xb4\x09\xd0\x6c\xd7\x40\xb5\x19\x45\x88\x2d\x09\x94\x9c\xa1\x15\xf4\xee\x83\x6c\x77\x71\xd6\x0e\x98\x4f\x32\x45\xf2\xe7\x47\xfd\x42\xc0\xca\xd6\x08\x0a\x0d\x92\x0c\x58\xc3\xcb\x2b\x38\xb2\xc1\x56\x37\x0a\xcd\x8d\xec\xc2\xa1\xc5\x70\xb0\x35\x87\xbb\x35\x3c\xad\xb7\xf0\xed\xee\x61\xcb\x19\x73\xb2\x3a\x4a\x85\x10\x23\xbf\xd7\x0d\xf2\xef\x76\x73\x54\xfc\x49\xb6\x98\x12\x63\x4c\xb7\xce\x52\x80\x6b\x06\x00\x50\x28\x6b\x55\x83\x5c\xd9\x46\x1a\xc5\x2d\x29\xa1\xc8\x55\x45\x7f\xc9\xae\xba\xa0\x1b\xbf\xcb\x52\x50\x28\x1d\x0e\xdd\x0b\xaf\x6c\x2b\x2a\x69\xbd\x78\xd3\x41\xd6\xd8\x08\x6d\x02\x92\x91\x8d\x90\x4e\x8b\x9c\x5a\xb0\xab\xff\x4b\xce\x4a\xc2\x23\x9d\x90\x44\xab\xeb\xba\xc1\x5f\x92\xb0\x60\x33\xc6\x62\x04\x92\x46\x21\x94\x1e\x96\xb7\x30\x80\x3c\x23\x9d\x74\x85\x1e\x32\x87\x98\xcf\x19\xcc\x21\xc6\xd2\xbf\xb3\xc1\x5c\x30\x76\x92\x34\x0d\xee\xbe\x76\xe1\xf0\xd8\xef\xc9\xc3\x2d\x9c\x81\xf8\x10\x7c\x94\xce\x69\xa3\x20\xf6\xc4\x67\xd9\x36\xcb\x96\x7e\xcc\xca\xcd\xc7\x2f\x46\x28\xdb\xdc\x74\xed\x42\xce\xb1\x2e\x68\x6b\xa0\x6c\xf9\xba\x3f\x79\x28\x32\x31\x1f\x89\x79\xaf\xc8\x4f\x5f\x78\x16\xdd\x0d\xd9\x05\x5c\x36\xd4\x7b\x90\xa6\x9e\xf4\xfd\x73\xe2\x1b\xa4\x56\x7b\x9f\x25\x26\x35\xfd\xd3\x89\x18\xcb\x61\x31\x9b\xe1\xc5\x53\xe2\x13\x72\x11\xe3\x78\x2a\x96\x53\xee\x61\xcc\x78\xd1\x2b\x7f\x67\xa5\x25\x14\x31\x7e\x36\x42\x4a\xc5\xe2\x43\xdd\xea\x80\xd5\x71\x23\x49\xb6\x7f\xd5\xf5\x17\xf7\x1a\x9b\x7a\x1c\xe3\xb2\x36\x2d\x26\x2b\x40\xf3\xbe\xe3\x18\x61\xf8\x49\x8c\xed\x3b\x53\x7d\x78\x4c\x4b\xfa\x4d\x66\x84\xdd\x43\x36\x53\x85\x2e\x58\xba\x3e\x21\xe9\xbd\x46\x9a\x92\x6e\xed\x11\xcd\xcf\xf1\x62\x01\x39\xb6\xb2\x66\x0f\xf3\x49\x4e\x0e\x68\x35\x83\xec\x45\xfe\xc3\x48\x7a\x7d\xee\x0d\x39\xe9\x3d\x7a\x83\x30\x74\x64\xe0\x6c\x54\x7e\x31\xcd\x67\xc3\x9c\x35\x17\xff\xf2\xe4\x2c\x73\x0e\xcc\x90\xd2\xef\x00\x00\x00\xff\xff\xf3\xc0\x3d\x9c\xf5\x03\x00\x00")
2020-03-23 10:53:12 +00:00
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: 1013, mode: os.FileMode(420), modTime: time.Unix(1585815980, 0)}
2020-03-23 10:53:12 +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){
"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
}
2020-03-23 10:53:12 +00:00
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, "/")...)...)
}