go-static.go 11 KB

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