github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/booking/data/bindata.go (about)

     1  // Code generated by go-bindata.
     2  // sources:
     3  // data/customers.json
     4  // data/locations.json
     5  // data/profiles.json
     6  // data/rates.json
     7  // DO NOT EDIT!
     8  
     9  package data
    10  
    11  import (
    12  	"bytes"
    13  	"compress/gzip"
    14  	"fmt"
    15  	"io"
    16  	"io/ioutil"
    17  	"os"
    18  	"path/filepath"
    19  	"strings"
    20  	"time"
    21  )
    22  
    23  func bindataRead(data []byte, name string) ([]byte, error) {
    24  	gz, err := gzip.NewReader(bytes.NewBuffer(data))
    25  	if err != nil {
    26  		return nil, fmt.Errorf("Read %q: %v", name, err)
    27  	}
    28  
    29  	var buf bytes.Buffer
    30  	_, err = io.Copy(&buf, gz)
    31  	clErr := gz.Close()
    32  
    33  	if err != nil {
    34  		return nil, fmt.Errorf("Read %q: %v", name, err)
    35  	}
    36  	if clErr != nil {
    37  		return nil, err
    38  	}
    39  
    40  	return buf.Bytes(), nil
    41  }
    42  
    43  type asset struct {
    44  	bytes []byte
    45  	info  os.FileInfo
    46  }
    47  
    48  type bindataFileInfo struct {
    49  	name    string
    50  	size    int64
    51  	mode    os.FileMode
    52  	modTime time.Time
    53  }
    54  
    55  func (fi bindataFileInfo) Name() string {
    56  	return fi.name
    57  }
    58  func (fi bindataFileInfo) Size() int64 {
    59  	return fi.size
    60  }
    61  func (fi bindataFileInfo) Mode() os.FileMode {
    62  	return fi.mode
    63  }
    64  func (fi bindataFileInfo) ModTime() time.Time {
    65  	return fi.modTime
    66  }
    67  func (fi bindataFileInfo) IsDir() bool {
    68  	return false
    69  }
    70  func (fi bindataFileInfo) Sys() interface{} {
    71  	return nil
    72  }
    73  
    74  var _dataCustomersJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8a\xe6\x52\x00\x82\x6a\x30\x09\x02\x4a\x99\x29\x4a\x56\x0a\x86\x3a\x08\x81\xc4\xd2\x92\x8c\x90\xfc\xec\xd4\x3c\xa0\xb8\x52\x98\xa3\x8f\xa7\x4b\x7c\x88\xbf\xb7\xab\x9f\x12\x58\x49\x2d\x57\x2c\x17\x20\x00\x00\xff\xff\x2b\x28\xf3\x0d\x44\x00\x00\x00")
    75  
    76  func dataCustomersJsonBytes() ([]byte, error) {
    77  	return bindataRead(
    78  		_dataCustomersJson,
    79  		"data/customers.json",
    80  	)
    81  }
    82  
    83  func dataCustomersJson() (*asset, error) {
    84  	bytes, err := dataCustomersJsonBytes()
    85  	if err != nil {
    86  		return nil, err
    87  	}
    88  
    89  	info := bindataFileInfo{name: "data/customers.json", size: 68, mode: os.FileMode(420), modTime: time.Unix(1445724030, 0)}
    90  	a := &asset{bytes: bytes, info: info}
    91  	return a, nil
    92  }
    93  
    94  var _dataLocationsJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8a\xe6\x52\x00\x82\x6a\x30\x09\x02\x4a\x19\xf9\x25\xa9\x39\x9e\x29\x4a\x56\x0a\x4a\x86\x4a\x3a\x08\xf1\x9c\xc4\x12\xa0\x98\xa9\xa1\x9e\xa9\x81\x91\xa5\xb9\x31\xb2\x4c\x7e\x1e\x50\x46\xd7\x40\xcf\xd0\xd0\xc4\xdc\xc8\x18\x2c\x51\xab\x83\xc7\x5c\x23\x1a\x99\x6b\x4c\x23\x73\x4d\x68\x64\xae\x29\x8d\xcc\x35\xa3\xc0\x5c\xae\x58\x2e\x40\x00\x00\x00\xff\xff\xab\x3a\x0e\xb4\x13\x02\x00\x00")
    95  
    96  func dataLocationsJsonBytes() ([]byte, error) {
    97  	return bindataRead(
    98  		_dataLocationsJson,
    99  		"data/locations.json",
   100  	)
   101  }
   102  
   103  func dataLocationsJson() (*asset, error) {
   104  	bytes, err := dataLocationsJsonBytes()
   105  	if err != nil {
   106  		return nil, err
   107  	}
   108  
   109  	info := bindataFileInfo{name: "data/locations.json", size: 531, mode: os.FileMode(420), modTime: time.Unix(1456591447, 0)}
   110  	a := &asset{bytes: bytes, info: info}
   111  	return a, nil
   112  }
   113  
   114  var _dataProfilesJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd4\x56\xdd\x6e\x2b\x35\x10\xbe\xef\x53\x8c\x72\x05\x52\xb6\x4a\xb2\xbb\x6d\xc2\x5d\xd2\x43\x7b\x90\x08\xaa\x4e\x02\x08\x10\x17\xb3\xf6\x24\x6b\xea\xb5\x83\xed\x3d\x39\x11\x3a\x12\xaf\xc1\xeb\xf1\x24\x8c\x37\x29\x49\xdb\xfc\x94\x5c\x95\x5c\x54\xdd\xf5\xec\x78\x3c\xdf\xe7\x6f\xbe\x5f\x2e\x80\x7f\x7f\x34\x7f\xe3\xaf\xa5\x64\xeb\x2b\x68\x75\x5b\xed\xed\x2b\x83\x15\xc5\x97\x37\x5a\xcd\x02\xbc\xb7\x81\xf4\xee\xf2\xa2\xb4\x86\xbe\xab\xab\x82\x5c\x8c\xfa\x22\xeb\xe6\x5f\xc2\xf5\x75\x9e\x64\xd7\x9d\xce\x6e\xa0\x24\x2f\x9c\x5a\x04\x65\x4d\x0c\x1c\xc2\x55\x52\x29\x53\x07\x82\x25\xea\x07\x98\x39\x5b\xc1\xf7\x86\x57\x61\xf2\x7b\x8d\x8e\x00\x8d\x84\x0c\xd6\x31\x7e\xbd\x8e\x30\xae\x8d\x82\x31\x05\x67\xc1\x07\x8c\xc9\xda\x10\x4a\xe5\x41\xd7\x9f\x6a\xb7\x82\x32\xd6\x07\xbc\x97\x9a\x1b\x92\x50\xac\xe0\xbe\x54\x5a\x2d\x16\x04\x93\x80\x4e\xf0\x46\x84\xa1\x76\x9c\x11\x0d\xa0\x0b\x7e\x05\xb3\xda\x19\x15\xdf\x81\xb0\x5a\x93\x88\x59\x41\x19\xce\x4b\xa0\x6d\x51\xac\xda\xfc\x24\x74\x2d\x95\x99\xc3\xd2\xba\x87\x98\x76\x82\xfa\x23\x4a\xeb\xe0\x1d\x6a\x75\xb9\x7b\x50\x94\x92\xd3\x7b\x3e\xe4\xb6\xb1\xcd\x82\x0f\x8e\x28\x6c\x7b\x95\x0d\xf2\x9d\xef\x76\x43\x36\x2d\xbf\x23\xe4\x23\x4d\xc2\xf3\x28\xa1\xc2\x2a\xae\x4f\xf8\x08\xb7\x0e\x8d\x50\x5e\xd8\x97\xa9\x30\xac\x81\x1b\xbe\xf8\xde\xd6\x26\xb8\x26\x05\x77\x3c\x70\x9f\x26\x31\xd8\x3f\x8f\x5b\x58\x4e\xa2\x6f\xac\x6c\xf2\x0c\xb2\x6e\xa7\xd7\xfa\x37\xe2\x73\xf3\xdf\xe7\xf6\x7e\x0a\xf5\xf6\x51\xe8\x47\x38\x54\xf1\x21\x1a\x5d\x27\x79\x7a\x94\x46\xdf\x72\xa7\x19\xa8\x88\x25\x14\xda\x8a\x0d\x91\x22\x74\x3f\x91\x2b\x10\x46\x35\x19\x84\x1b\x32\x81\x1c\xcc\x18\xaf\xb8\x34\x64\xdc\x37\xbc\xe1\x86\x1b\xf9\xc8\x1b\x7e\x46\xe8\xf6\x8e\x13\xf3\x3c\xb0\xbb\xfd\xee\x71\xb0\x53\x27\xdf\x14\xd4\xe9\x6b\xa1\x4e\xf7\x41\xdd\xe8\x04\xfc\x4c\x21\xe0\x49\x98\xf3\x2c\x4d\xfa\x79\x9e\x1f\x55\x8b\xf4\x25\x28\x11\xc9\x7b\xbb\x24\xad\xf9\x50\xb1\x95\x20\xb0\xd0\x94\x08\x64\x94\xf9\x4e\xa3\xe3\xc3\xcb\x46\x47\x46\xc3\x0f\x53\x70\xa8\xf4\x33\xd5\x28\xd5\x62\x03\xfd\xe0\xa9\xd2\x3c\x51\x22\x61\xab\x42\x19\x8a\xe1\xf3\x32\x09\x24\x4a\xd6\x05\x39\x6f\xe4\x40\x85\x72\x23\x23\xc1\xd6\xa2\x24\x7f\x1e\x3d\xf2\x13\x52\x90\xf3\x36\xff\x4b\x76\x64\x87\xd9\xf1\x83\xe2\xa4\x74\x92\x1e\xbd\xeb\x7e\x92\x1e\x1f\x26\xd3\x88\xe5\x92\x2b\x77\x0c\x9e\x09\x1b\x48\x1b\x6c\x46\xb8\x82\x91\x53\x72\x4e\xf0\x51\xd1\xd2\xc7\x3b\x9e\xae\xa5\xc2\x6f\x69\x74\xab\x4c\xec\x1e\x6a\x78\xa7\xb8\xf1\x4a\x84\x86\x36\x08\xd9\x7e\xda\xdd\x92\x63\x65\x1e\xd5\x4a\xc7\xa1\x70\x1e\xe4\xfd\xe3\x88\x8f\x95\xf7\x0d\x07\xdf\x10\xea\xf9\x6b\x51\xcf\xf7\xa1\x7e\x5f\x5a\x32\xea\xd3\xab\x3d\xc4\x55\xd2\x4d\xfb\x47\xc5\xdf\x0a\x8c\xe5\x6f\x66\xf5\x94\x95\x9c\x9c\xb6\xfc\x68\x88\x6f\x6a\x61\x5d\x69\xad\x6c\x47\x4d\xef\xbc\xc4\x11\x0f\xaa\x82\x6b\xfc\x45\x65\x03\x8f\x8b\x78\xd1\x09\x4a\xe4\xcb\xcf\xed\xe0\xcd\x2a\x34\x2b\x70\x71\xd2\x54\xb5\x57\xcc\x19\xe3\x1b\xae\x58\x2e\xc1\x81\x20\x4d\x85\x53\x41\xb1\x5a\x78\x76\x0d\xd4\x54\xd6\x1d\xe4\x1d\x7f\x09\xdf\x84\xbf\xff\xfc\xcb\x1f\x66\x15\xef\xcd\x5b\x2a\x01\x77\x8e\x4d\x0a\x0c\x2b\xe2\x07\x06\x79\x1c\x37\x82\xf7\xc8\x42\x67\xf8\x5c\x81\xbd\x48\x71\x1e\xe7\xae\x3a\x27\xa6\xd0\xd7\x52\xbe\x2d\xc7\x31\x68\x5d\xbc\x92\x73\x57\xfb\x38\x37\x2d\xa3\xf1\xbb\x84\x0f\x34\x67\x60\xff\x9b\xfd\xe8\xf5\xb3\x24\xeb\x1c\x15\x9e\x6d\x6a\xc6\x88\xea\x0a\xa6\x3c\x8f\xdc\xda\x47\x64\xbd\x24\xc2\xc9\xee\x31\xeb\x67\xc0\xde\xd9\x3f\xac\xf8\x63\x5c\xc4\x80\x35\x63\x27\xb6\x66\x89\xb2\x33\x18\xa3\x7b\xe0\xf9\x25\x1f\xc5\x87\x5f\x3d\xa9\xb5\x0d\x37\x6c\x33\xd9\xbe\x18\x85\xcc\x67\xf9\x1b\x0a\x76\x34\x3c\x72\x9e\xb8\x9c\x3b\x74\x92\x0c\x3b\x9b\xb1\xe5\x6f\x0c\x6d\x6c\x4f\x1b\xee\x51\x8c\xe2\x98\x7c\x14\xac\x86\xb0\x4d\x01\xbb\x9b\x3c\x9e\x21\xd6\xc3\x08\x38\x13\x7d\xd2\x99\x6e\xa7\x77\x62\x9e\xb1\xdb\x79\x53\x1c\x7b\x46\xb1\x8b\x5f\x2f\xfe\x09\x00\x00\xff\xff\xf8\xbe\x11\x38\x1c\x0d\x00\x00")
   115  
   116  func dataProfilesJsonBytes() ([]byte, error) {
   117  	return bindataRead(
   118  		_dataProfilesJson,
   119  		"data/profiles.json",
   120  	)
   121  }
   122  
   123  func dataProfilesJson() (*asset, error) {
   124  	bytes, err := dataProfilesJsonBytes()
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  
   129  	info := bindataFileInfo{name: "data/profiles.json", size: 3356, mode: os.FileMode(420), modTime: time.Unix(1456591428, 0)}
   130  	a := &asset{bytes: bytes, info: info}
   131  	return a, nil
   132  }
   133  
   134  var _dataRatesJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8a\xe6\x52\x00\x82\x6a\x30\x09\x02\x4a\x19\xf9\x25\xa9\x39\x9e\x29\x4a\x56\x0a\x4a\x86\x4a\x3a\x08\xf1\xe4\xfc\x94\x54\x90\x60\x90\xa3\xb3\x37\xb2\x78\x66\x9e\x4b\x62\x09\x58\xc6\xc8\xc0\xd0\x54\xd7\xc0\x44\xd7\xc0\x12\x59\x3e\xbf\xb4\x04\x5d\x81\xa1\x01\xb2\x82\xa2\xfc\xfc\xdc\x90\xca\x02\x90\x0a\x84\x33\x80\xe2\x49\xf9\xf9\xd9\x89\x49\x39\xa9\x41\x10\xdd\x86\x06\x96\x7a\x06\x06\x3a\xc8\x2a\x60\x4e\xf2\xf6\x73\x57\x42\x91\x48\x49\x2d\x4e\x2e\xca\x2c\x28\xc9\xcc\xcf\x03\xcb\x67\xe6\xa5\x2b\x14\x67\x56\xa5\xa6\x28\x24\xa5\xa6\xa0\x2a\x2d\xc9\x2f\x49\xcc\xc1\x6d\x05\x5c\xda\x33\x2f\x39\xa7\xb4\x38\xb3\x0c\xac\xce\xc8\x58\xcf\xd0\x1c\xae\xac\x96\x0b\x42\xc6\x72\x01\x02\x00\x00\xff\xff\xe0\xd7\xdf\xfa\x4d\x01\x00\x00")
   135  
   136  func dataRatesJsonBytes() ([]byte, error) {
   137  	return bindataRead(
   138  		_dataRatesJson,
   139  		"data/rates.json",
   140  	)
   141  }
   142  
   143  func dataRatesJson() (*asset, error) {
   144  	bytes, err := dataRatesJsonBytes()
   145  	if err != nil {
   146  		return nil, err
   147  	}
   148  
   149  	info := bindataFileInfo{name: "data/rates.json", size: 333, mode: os.FileMode(420), modTime: time.Unix(1456591432, 0)}
   150  	a := &asset{bytes: bytes, info: info}
   151  	return a, nil
   152  }
   153  
   154  // Asset loads and returns the asset for the given name.
   155  // It returns an error if the asset could not be found or
   156  // could not be loaded.
   157  func Asset(name string) ([]byte, error) {
   158  	cannonicalName := strings.Replace(name, "\\", "/", -1)
   159  	if f, ok := _bindata[cannonicalName]; ok {
   160  		a, err := f()
   161  		if err != nil {
   162  			return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
   163  		}
   164  		return a.bytes, nil
   165  	}
   166  	return nil, fmt.Errorf("Asset %s not found", name)
   167  }
   168  
   169  // MustAsset is like Asset but panics when Asset would return an error.
   170  // It simplifies safe initialization of global variables.
   171  func MustAsset(name string) []byte {
   172  	a, err := Asset(name)
   173  	if err != nil {
   174  		panic("asset: Asset(" + name + "): " + err.Error())
   175  	}
   176  
   177  	return a
   178  }
   179  
   180  // AssetInfo loads and returns the asset info for the given name.
   181  // It returns an error if the asset could not be found or
   182  // could not be loaded.
   183  func AssetInfo(name string) (os.FileInfo, error) {
   184  	cannonicalName := strings.Replace(name, "\\", "/", -1)
   185  	if f, ok := _bindata[cannonicalName]; ok {
   186  		a, err := f()
   187  		if err != nil {
   188  			return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
   189  		}
   190  		return a.info, nil
   191  	}
   192  	return nil, fmt.Errorf("AssetInfo %s not found", name)
   193  }
   194  
   195  // AssetNames returns the names of the assets.
   196  func AssetNames() []string {
   197  	names := make([]string, 0, len(_bindata))
   198  	for name := range _bindata {
   199  		names = append(names, name)
   200  	}
   201  	return names
   202  }
   203  
   204  // _bindata is a table, holding each asset generator, mapped to its name.
   205  var _bindata = map[string]func() (*asset, error){
   206  	"data/customers.json": dataCustomersJson,
   207  	"data/locations.json": dataLocationsJson,
   208  	"data/profiles.json":  dataProfilesJson,
   209  	"data/rates.json":     dataRatesJson,
   210  }
   211  
   212  // AssetDir returns the file names below a certain
   213  // directory embedded in the file by go-bindata.
   214  // For example if you run go-bindata on data/... and data contains the
   215  // following hierarchy:
   216  //     data/
   217  //       foo.txt
   218  //       img/
   219  //         a.png
   220  //         b.png
   221  // then AssetDir("data") would return []string{"foo.txt", "img"}
   222  // AssetDir("data/img") would return []string{"a.png", "b.png"}
   223  // AssetDir("foo.txt") and AssetDir("notexist") would return an error
   224  // AssetDir("") will return []string{"data"}.
   225  func AssetDir(name string) ([]string, error) {
   226  	node := _bintree
   227  	if len(name) != 0 {
   228  		cannonicalName := strings.Replace(name, "\\", "/", -1)
   229  		pathList := strings.Split(cannonicalName, "/")
   230  		for _, p := range pathList {
   231  			node = node.Children[p]
   232  			if node == nil {
   233  				return nil, fmt.Errorf("Asset %s not found", name)
   234  			}
   235  		}
   236  	}
   237  	if node.Func != nil {
   238  		return nil, fmt.Errorf("Asset %s not found", name)
   239  	}
   240  	rv := make([]string, 0, len(node.Children))
   241  	for childName := range node.Children {
   242  		rv = append(rv, childName)
   243  	}
   244  	return rv, nil
   245  }
   246  
   247  type bintree struct {
   248  	Func     func() (*asset, error)
   249  	Children map[string]*bintree
   250  }
   251  
   252  var _bintree = &bintree{nil, map[string]*bintree{
   253  	"data": &bintree{nil, map[string]*bintree{
   254  		"customers.json": &bintree{dataCustomersJson, map[string]*bintree{}},
   255  		"locations.json": &bintree{dataLocationsJson, map[string]*bintree{}},
   256  		"profiles.json":  &bintree{dataProfilesJson, map[string]*bintree{}},
   257  		"rates.json":     &bintree{dataRatesJson, map[string]*bintree{}},
   258  	}},
   259  }}
   260  
   261  // RestoreAsset restores an asset under the given directory
   262  func RestoreAsset(dir, name string) error {
   263  	data, err := Asset(name)
   264  	if err != nil {
   265  		return err
   266  	}
   267  	info, err := AssetInfo(name)
   268  	if err != nil {
   269  		return err
   270  	}
   271  	err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
   272  	if err != nil {
   273  		return err
   274  	}
   275  	err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
   276  	if err != nil {
   277  		return err
   278  	}
   279  	err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
   280  	if err != nil {
   281  		return err
   282  	}
   283  	return nil
   284  }
   285  
   286  // RestoreAssets restores an asset under the given directory recursively
   287  func RestoreAssets(dir, name string) error {
   288  	children, err := AssetDir(name)
   289  	// File
   290  	if err != nil {
   291  		return RestoreAsset(dir, name)
   292  	}
   293  	// Dir
   294  	for _, child := range children {
   295  		err = RestoreAssets(dir, filepath.Join(name, child))
   296  		if err != nil {
   297  			return err
   298  		}
   299  	}
   300  	return nil
   301  }
   302  
   303  func _filePath(dir, name string) string {
   304  	cannonicalName := strings.Replace(name, "\\", "/", -1)
   305  	return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
   306  }