diff --git a/servicegen/gen.go b/servicegen/gen.go index 129e38c..eef8b5a 100644 --- a/servicegen/gen.go +++ b/servicegen/gen.go @@ -52,6 +52,15 @@ func genService(appName string) error { return err } + err = parseTpl(mainTpl, filepath.Join(rootDir, "main.go"), appName) + if err != nil { + return err + } + err = parseTpl(configJsonTpl, filepath.Join(rootDir, "config.json"), appName) + if err != nil { + return err + } + return nil } @@ -67,30 +76,40 @@ func genApp(appName string) error { } // api.go - err = parseTmpl(apiTmpl, filepath.Join(appDir, "api.go"), appName) + err = parseTpl(apiTpl, filepath.Join(appDir, "api.go"), appName) if err != nil { return err } // api_pre.go - err = parseTmpl(apiPreTmpl, filepath.Join(appDir, "api_pre.go"), appName) + err = parseTpl(apiPreTpl, filepath.Join(appDir, "api_pre.go"), appName) if err != nil { return err } // api_task.go - err = parseTmpl(apiTaskTmpl, filepath.Join(appDir, "api_task.go"), appName) + err = parseTpl(apiTaskTpl, filepath.Join(appDir, "api_task.go"), appName) if err != nil { return err } // api_test.go - err = parseTmpl(apiTestTmpl, filepath.Join(appDir, "api_test.go"), appName) + err = parseTpl(apiTestTpl, filepath.Join(appDir, "api_test.go"), appName) + if err != nil { + return err + } + + err = parseTpl(dbModelTpl, filepath.Join(appDir, "db_model.go"), appName) + if err != nil { + return err + } + + err = parseTpl(initializeTpl, filepath.Join(appDir, "initialize.go"), appName) if err != nil { return err } - err = parseTmpl(dbModelTmpl, filepath.Join(appDir, "db_model.go"), appName) + err = parseTpl(adminInitializeTpl, filepath.Join(appDir, "initialize_amdin.go"), appName) if err != nil { return err } @@ -107,7 +126,7 @@ func genOptions(appName string) error { if err != nil { return err } - err = parseTmpl(optionsTmpl, filepath.Join(optionsDir, "options.go"), appName) + err = parseTpl(optionsTpl, filepath.Join(optionsDir, "options.go"), appName) if err != nil { return err } @@ -123,7 +142,7 @@ func genExternal(appName string) error { if err != nil { return err } - err = parseTmpl(externalTmpl, filepath.Join(externalDir, "extenral.go"), appName) + err = parseTpl(externalTpl, filepath.Join(externalDir, "extenral.go"), appName) if err != nil { return err } @@ -170,7 +189,7 @@ func getExternal(appName string) (string, error) { return path, nil } -func parseTmpl(tmpl *template.Template, file string, appName string) error { +func parseTpl(tmpl *template.Template, file string, appName string) error { f, err := os.Create(file) if err != nil { return err diff --git a/servicegen/tpl.go b/servicegen/tpl.go index 4a8843f..a3117b4 100644 --- a/servicegen/tpl.go +++ b/servicegen/tpl.go @@ -7,18 +7,21 @@ import ( ) var ( - apiTmpl = CreateTpl("servicegen/tpl/api.tpl") - apiPreTmpl = CreateTpl("servicegen/tpl/api_task.tpl") - apiTaskTmpl = CreateTpl("servicegen/tpl/api_task.tpl") - apiTestTmpl = CreateTpl("servicegen/tpl/api_test.tpl") - dbModelTmpl = CreateTpl("servicegen/tpl/db_model.tpl") - optionsTmpl = CreateTpl("servicegen/tpl/options.tpl") - externalTmpl = CreateTpl("servicegen/tpl/external.tpl") + apiTpl = CreateTpl("api.tpl") + apiPreTpl = CreateTpl("api_task.tpl") + apiTaskTpl = CreateTpl("api_task.tpl") + apiTestTpl = CreateTpl("api_test.tpl") + dbModelTpl = CreateTpl("db_model.tpl") + optionsTpl = CreateTpl("options.tpl") + externalTpl = CreateTpl("external.tpl") + configJsonTpl = CreateTpl("configjson.tpl") + mainTpl = CreateTpl("main.tpl") + initializeTpl = CreateTpl("initialize.tpl") + adminInitializeTpl = CreateTpl("initialize_admin.tpl") ) func CreateTpl(filename string)*template.Template { - body, err := tpl.Asset(filename) - //body, err := ioutil.ReadFile(filename) + body, err := tpl.Asset(filepath.Join("servicegen/tpl", filename)) if err != nil { panic(err) } diff --git a/servicegen/tpl/configjson.tpl b/servicegen/tpl/configjson.tpl new file mode 100644 index 0000000..2cb4356 --- /dev/null +++ b/servicegen/tpl/configjson.tpl @@ -0,0 +1 @@ +{"addr":"192.168.1.103","port":20189,"db":{"mysql":{"db_name":"master","addr":"cdb-7k8huflt.gz.tencentcdb.com","port":10038,"pwd":"OxzncG2210%","user":"root","table_prefix":"ox_","max_idle":30,"max_active":30,"max_lifetime":30}},"yapi_config":null,"extension":{"data_dir":"E:\\GoProject\\src\\ox_tiyuguan_web\\data"},"unit_test_config":null} \ No newline at end of file diff --git a/servicegen/tpl/initialize.tpl b/servicegen/tpl/initialize.tpl new file mode 100644 index 0000000..504d3cf --- /dev/null +++ b/servicegen/tpl/initialize.tpl @@ -0,0 +1,7 @@ +package hasaki_{{.app_name}} + +import "git.ouxuan.net/hasaki-service/hasaki-sdk/hskgin" + +func Initialize(router *hskgin.GinHelper) { + +} \ No newline at end of file diff --git a/servicegen/tpl/initialize_admin.tpl b/servicegen/tpl/initialize_admin.tpl new file mode 100644 index 0000000..663d714 --- /dev/null +++ b/servicegen/tpl/initialize_admin.tpl @@ -0,0 +1,7 @@ +package hasaki_{{.app_name}} + +import "git.ouxuan.net/hasaki-service/hasaki-sdk/hskgin" + +func AdminInitialize(router *hskgin.GinHelper) { + +} \ No newline at end of file diff --git a/servicegen/tpl/main.tpl b/servicegen/tpl/main.tpl new file mode 100644 index 0000000..dc9c871 --- /dev/null +++ b/servicegen/tpl/main.tpl @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "git.ouxuan.net/hasaki-service/hasaki-sdk/hskconfig" + "git.ouxuan.net/hasaki-service/hasaki-sdk/hskgin" + "git.ouxuan.net/hasaki-service/hasaki-service-stadium-core/hasaki_stadium_core" + "git.ouxuan.net/hasaki-service/hasaki-service-stadium-core/hasaki_stadium_core_event" + "git.ouxuan.net/hasaki-service/hasaki-service-{{.app_name}}/hasaki_{{.app_name}}" + "git.ouxuan.net/hasaki-service/hasaki-service-{{.app_name}}/hasaki_{{.app_name}}_options" + "github.com/gin-gonic/gin" +) + +func main() { + hskconfig.SetGolbalConfigFileName(`./config.json`) + config := hskconfig.GetGlobalConfigInstance() + router := hskgin.NewGinHelper(gin.Default()) + hasaki_{{.app_name}}_options.GetMysqlConfig = hasaki_stadium_core.GetMysqlConfig + hasaki_stadium_core_event.Initialize(true) + hasaki_{{.app_name}}.AdminInitialize(router) + hasaki_{{.app_name}}.Initialize(router) + err := router.Run(fmt.Sprintf("%s:%d", config.Addr, config.Port)) + if err != nil { + panic(err) + } +} \ No newline at end of file diff --git a/servicegen/tpl/tpl.go b/servicegen/tpl/tpl.go index 53171a4..ccc4e68 100644 --- a/servicegen/tpl/tpl.go +++ b/servicegen/tpl/tpl.go @@ -4,8 +4,12 @@ // servicegen/tpl/api_pre.tpl // servicegen/tpl/api_task.tpl // servicegen/tpl/api_test.tpl +// servicegen/tpl/configjson.tpl // servicegen/tpl/db_model.tpl // servicegen/tpl/external.tpl +// servicegen/tpl/initialize.tpl +// servicegen/tpl/initialize_admin.tpl +// servicegen/tpl/main.tpl // servicegen/tpl/options.tpl package tpl @@ -163,6 +167,26 @@ func servicegenTplApi_testTpl() (*asset, error) { return a, nil } +var _servicegenTplConfigjsonTpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\xcf\xc1\x4a\xc4\x30\x10\x06\xe0\x77\xf9\xc1\x5b\x2c\x4d\x17\xb4\x9b\xbb\xec\x51\x1f\x20\x10\xd2\x64\xba\x46\xd3\xa4\xa6\x53\xb7\xbb\x4b\xdf\x5d\xba\xa2\xe8\x6d\xfe\x61\xf8\x86\xff\x0a\xeb\x7d\x81\x82\xdc\x37\x95\x7c\x68\x2b\x59\xc9\x7a\x07\x81\x31\x17\x86\x6a\x6a\xd9\xee\x05\x7c\x07\x75\xc5\x70\x9e\x3e\xe2\x36\xf8\xce\x24\x3b\x10\x14\x06\x3b\x31\x15\x88\x1f\xc5\xf9\xee\xfe\xf1\xbd\x7d\x9d\xfb\xc8\xd5\xf1\x52\x31\x25\x47\x89\x9d\xef\x2a\x97\x87\x5f\x56\xd6\xf5\xae\x15\x18\x4f\x1e\x0a\xcf\xcb\x25\xb9\x43\xd3\xc8\xfa\x0e\x02\xf3\x44\x1b\x54\x72\x66\x08\xb0\xed\x22\x99\xb1\x50\x1f\x16\x28\xe4\xc5\x40\x60\xb0\x8b\x09\x3e\x12\xd4\xae\xfe\x4e\xd6\x71\xf8\xfc\x93\x63\xe8\x89\xc3\x70\xdb\xac\xab\xc0\xd9\x8e\xc1\xb8\x9c\xfa\x70\x84\x4a\x73\x8c\x02\xb4\x30\xa5\x29\xe4\x74\x2b\x64\xd9\x1a\x1f\xb6\xc7\x4f\x4a\xeb\x43\x7e\x29\xf9\x8d\x1c\x6b\x3d\x15\xa7\x75\x5e\x0c\x87\xf3\x7c\x9c\x6d\x32\x27\xea\xb4\xde\xee\xb1\x0a\xcc\x29\xb0\x61\x9a\xf8\x1f\xbe\x7e\x05\x00\x00\xff\xff\xfc\xb0\x81\xcf\x55\x01\x00\x00") + +func servicegenTplConfigjsonTplBytes() ([]byte, error) { + return bindataRead( + _servicegenTplConfigjsonTpl, + "servicegen/tpl/configjson.tpl", + ) +} + +func servicegenTplConfigjsonTpl() (*asset, error) { + bytes, err := servicegenTplConfigjsonTplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "servicegen/tpl/configjson.tpl", size: 341, mode: os.FileMode(438), modTime: time.Unix(1617939616, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + var _servicegenTplDb_modelTpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x54\xdd\x6e\x1b\x45\x14\xbe\xb6\x25\xbf\xc3\xe9\x8a\xca\xbb\xb1\x33\x4e\x24\xc4\x45\x84\x41\x51\x52\x21\x57\x8d\x53\xc9\xae\x40\xaa\x2a\x7b\xd8\x3d\x76\x86\xdd\x9d\x59\xcd\x8c\x43\x43\xe4\x5b\x88\x04\x17\x20\xa1\x16\x28\x94\x14\x15\x2e\x50\x05\xbd\x28\x48\x80\xc4\xd3\xb0\x46\x79\x0b\x34\x33\xeb\x9f\xd8\x49\x24\x54\x75\x6f\x76\xe6\xfc\x7c\xe7\x3b\xdf\x9c\x99\x8c\x86\x31\x1d\x22\x1c\x50\x45\x63\xd6\x3b\x3e\x26\x34\xcb\x7a\x9c\xa6\x38\x1e\x57\xca\x95\x32\x4b\x33\x21\x35\xf8\x95\x72\xc9\x43\x29\x85\x54\x9e\x59\x0e\x99\x26\x62\x74\x7f\x44\x39\xe1\xa8\x1b\x2e\x7b\x5d\xa1\x3c\x64\x21\xce\xb6\x51\xdc\x38\x50\xb1\x66\x29\xda\x24\xa5\x65\x28\xf8\xa1\x5d\xdf\x17\x32\x25\x4c\x34\xcc\xdf\xab\x94\x03\x53\x4b\x1f\x65\x08\x7b\x22\xc2\x04\x94\x96\xa3\x50\xc3\x71\xa5\x5c\x6a\x45\x50\x7c\x8c\x6b\x98\x7f\xfd\x0f\x94\xe0\x5b\x1e\x8b\x3c\x30\x20\x5b\x1e\x17\x1a\xf8\x28\x49\x20\x8b\x81\x8e\xb4\x60\x3c\x94\xd0\x6a\x77\xfd\xcd\xcd\xc0\xeb\x57\xca\xa5\x1d\x89\x54\x63\xb4\xad\xa1\x60\x45\xba\x2c\xc5\x19\x52\xe8\xdc\x3d\xaa\xa7\x88\x85\x05\x42\x91\xa6\xc8\xb5\x5f\xcd\x4f\x1e\xe5\x7f\xfd\x39\x79\xf8\xfb\xd9\xc3\x17\x55\x07\x7a\x27\x8b\xae\x02\x1d\x39\xf7\x02\x68\x61\x99\x83\x4e\x1e\xbd\x98\x3c\x78\x7e\x0e\x74\x17\x13\xbc\x02\x74\x7d\x8a\x15\xb9\xb8\x05\xac\xaf\x7e\xcd\x3f\xff\x29\x3f\x39\x3d\xfb\xfa\x69\x35\x80\x6e\x6b\xef\x46\xa7\xbb\xbd\x77\x1b\x5a\xed\xdd\x1b\xef\x59\x6c\x85\x4a\x31\xc1\x01\x60\xcd\x1e\x42\xa7\xd8\xf7\x1d\xe4\xba\x0d\x62\x5c\x69\xca\x43\xb4\xa2\xa3\x1c\xd0\x10\x8f\xc7\x46\xf4\x85\x20\x3b\x1f\x83\x11\x0f\xc1\x4f\x61\xcd\x9e\x5b\x00\xe1\x01\x86\x71\xab\xc8\xf6\x03\xb0\x33\x63\xcf\x91\x0d\x20\x25\x33\xdc\x66\x13\x38\x4b\xac\xa3\x24\x51\x8f\x24\x77\xa1\x8a\xb4\xf1\x43\xdf\x9b\xc5\x4d\xbe\xfd\x39\xff\xe5\xf1\x3f\x7f\x7f\x9a\x7f\xf6\xc0\x0b\x2a\xe5\xd2\xb8\x52\x9e\x26\x70\x96\x5c\xc2\xa2\x83\x7a\xc6\x61\x06\xb5\xd0\x49\x60\x0b\x2f\xd2\x81\xe9\xb2\x40\x6c\x34\x20\xff\xe1\x71\x7e\x72\x3a\xf9\xf2\x8f\xc9\xf7\x3f\x5e\x50\x82\x1e\xa2\x1f\x8a\x44\x01\x21\x44\x69\xc9\xf8\x30\x00\x9f\x71\xfd\xc6\xeb\x75\xd7\x8a\x2b\x82\x52\xc2\x56\x13\x52\xb2\xa4\x8c\x53\xc4\x78\xaf\xad\x4a\xb1\x61\x21\x8a\x6e\xad\x70\xad\x08\xde\x82\x0d\x17\xc4\x06\x90\x20\xb7\xc5\x83\xb9\x75\x9a\x9b\x92\xe2\x84\xc9\x8e\x48\x94\x8d\x22\x84\x04\xc4\x0d\xaa\x3f\x6f\xda\x50\x28\x8d\x01\x13\x85\x97\x21\x6c\x27\x89\x05\x59\xc8\x2e\x5c\x2e\xd9\x30\x5c\x00\x58\xc9\x6f\x71\x85\x52\xef\xf3\xe5\xb2\xe3\x4b\xce\x6d\x17\x13\xff\x15\xa9\xb8\xca\x6d\xd7\x37\xb2\x06\xc4\x5d\xb6\xf3\x0c\x2f\x64\xf7\x0e\x6a\xc3\xee\x7d\x21\x92\x97\x27\x37\xa0\x89\xc2\x2b\x09\xde\xe1\x2a\x14\x19\x46\x7e\x40\x4c\xe5\x55\x7e\x8d\x46\x7e\xf2\xf1\xd9\x93\xdf\x00\x42\xc1\xa3\xbb\x5e\x46\x87\xe8\xdd\x83\x7f\x9f\x3d\xcb\x3f\x39\x35\xf6\xb9\xb9\xa7\xd8\x47\xc6\x97\x3f\xfd\x26\x7f\xfe\xc5\xe4\xbb\x27\x45\x77\xb7\xe9\xd0\x4c\x31\x8f\x20\xa5\xd9\x5d\x37\xc6\xf7\xdc\xaf\x0e\xea\xfc\x0b\x11\x2c\x3d\x18\xc5\xa5\x5e\x2d\x72\xad\x09\x9e\xe7\x9a\x35\x96\x3a\xf4\x8c\x3c\xc5\xeb\x4f\xb6\xb5\x60\xfe\x4a\x92\x9d\x27\xb3\xbf\x3a\xba\x08\x64\x03\x30\x3b\x78\xb3\x39\x9b\x7e\xbb\x6f\xc2\xc6\xca\x50\x17\x0e\xfb\x5b\x87\xcd\xe9\xdc\x96\x14\x34\x41\x91\x5b\x2c\x65\xda\x77\x34\x4d\xc8\x9a\x59\x2e\xbd\x33\x6a\x71\x1e\x6e\xb1\xd8\xde\xfb\x3a\xc4\x78\x04\xff\x4f\x2a\x93\xb1\x28\x8e\x65\xf0\xee\x01\x4a\x8b\x58\xf3\x20\x61\x31\xc2\xdb\x5e\x1d\xbc\xeb\x5e\x2d\xc6\xa3\x9a\x77\x7d\xf9\xd1\x9b\x92\x29\xe8\xdc\x54\x82\xef\x08\xae\x29\xe3\xea\x15\xd0\xea\xdf\xec\xec\xb7\x7b\x3b\xfb\xed\xee\x76\xab\xdd\xf1\xfb\x50\x83\x50\x24\x50\x83\x7e\x1d\xaa\x66\x67\x72\x6b\xd0\xaf\xd6\xa1\xfa\x5a\x35\xe8\x5f\x40\xf6\xbf\x00\x00\x00\xff\xff\x6a\x75\x6c\xdc\x62\x08\x00\x00") func servicegenTplDb_modelTplBytes() ([]byte, error) { @@ -203,6 +227,66 @@ func servicegenTplExternalTpl() (*asset, error) { return a, nil } +var _servicegenTplInitializeTpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x3c\xcb\x51\x0a\xc2\x30\x0c\x80\xe1\xf7\xc1\xee\x10\xf6\xa4\x82\xdd\x31\xd4\x53\x8c\x30\x63\x17\xba\xa5\x25\x4d\x45\x2c\xbd\xbb\x8c\x81\x8f\x3f\x7c\x7f\xc2\x39\xa0\x27\x58\x30\x63\xe0\xa9\x56\x87\x29\x4d\x82\x1b\xb5\xd6\x77\x7d\xc7\x5b\x8a\x6a\x30\x78\x36\x17\xcb\xa7\xa0\x38\x21\x1b\x0f\x7e\xcd\xa4\x6f\x9e\xe9\x9f\xcf\x30\x2e\x39\x78\x96\x61\x7f\x5f\x45\x66\x78\x08\x1b\xe3\xca\x5f\x3a\x69\x2c\x46\x0a\x97\x83\xb8\x1b\xcb\x9d\xd6\x44\x7a\x06\xa8\xbb\x6f\xbf\x00\x00\x00\xff\xff\xf0\x7c\x49\xe1\x8d\x00\x00\x00") + +func servicegenTplInitializeTplBytes() ([]byte, error) { + return bindataRead( + _servicegenTplInitializeTpl, + "servicegen/tpl/initialize.tpl", + ) +} + +func servicegenTplInitializeTpl() (*asset, error) { + bytes, err := servicegenTplInitializeTplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "servicegen/tpl/initialize.tpl", size: 141, mode: os.FileMode(438), modTime: time.Unix(1617939340, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _servicegenTplInitialize_adminTpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x3c\xcb\x41\x0a\xc2\x30\x10\x40\xd1\x7d\xa1\x77\x18\xba\x52\xc1\xf4\x0c\xae\xd4\x53\x94\xa1\x1d\xd3\x21\xcd\x24\x24\x13\x11\x43\xee\x2e\xa5\xe0\xf2\xc3\x7f\x11\x67\x87\x96\x60\xc5\x8c\x8e\xa7\x5a\x0d\xc6\x38\x09\x7a\x6a\xad\xef\xfa\x8e\x7d\x0c\x49\x61\xb0\xac\x26\x94\x4f\x41\x31\x42\x3a\x1e\xfb\x35\x53\x7a\xf3\x4c\xff\x5c\xdc\xb8\x66\x67\x59\x86\xdd\xbe\x8a\xcc\x70\x5b\x3c\xcb\x53\x58\x19\x37\xfe\xd2\x29\x85\xa2\x94\xe0\x72\x7c\xe6\xce\xf2\xa0\x2d\x52\x3a\x03\xd4\x1d\xb5\x5f\x00\x00\x00\xff\xff\x31\xf1\xb0\x7a\x92\x00\x00\x00") + +func servicegenTplInitialize_adminTplBytes() ([]byte, error) { + return bindataRead( + _servicegenTplInitialize_adminTpl, + "servicegen/tpl/initialize_admin.tpl", + ) +} + +func servicegenTplInitialize_adminTpl() (*asset, error) { + bytes, err := servicegenTplInitialize_adminTplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "servicegen/tpl/initialize_admin.tpl", size: 146, mode: os.FileMode(438), modTime: time.Unix(1617939433, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _servicegenTplMainTpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x52\x5d\x8b\xdb\x30\x10\x7c\x8e\xc1\xff\x41\x0d\x1c\x28\xd0\xc8\xef\x07\x79\x38\x5a\x9a\xde\x43\x8f\xd2\xfb\x01\x3e\x9d\xbc\x76\xb6\x91\x56\xae\xb4\x4a\x3f\x42\xfe\x7b\x91\xed\xe4\xee\xda\xd0\x12\x68\x9f\xcc\x8e\x67\x66\xbd\x33\xee\xb5\xd9\xea\x0e\x84\xd3\x48\x65\x51\x16\xe8\x7a\x1f\x58\xc8\xb2\x98\xcd\x5b\xc7\xf3\xfc\xec\x90\x95\x4f\xdf\x92\x26\x45\xc0\xd5\x46\x47\xbd\xc5\x65\x84\xb0\x43\x03\xa7\xb1\xd9\x56\x9b\xb8\x35\x9e\x5a\xec\x2e\x96\x75\x48\x17\x68\xc6\x71\x19\x59\x37\x98\xdc\xd2\xf8\x70\x7c\x57\x4f\x58\x9d\xb1\x7f\xef\x58\xc3\x0e\xe8\x92\x50\x26\xdf\xfd\x5e\xe9\xbe\xaf\x49\x3b\x38\x1c\x8e\xc6\x2f\xc0\xff\xe1\x59\xfb\x9e\xd1\x53\x3c\x7a\x6f\xd2\xa3\x32\xde\x55\x1d\xd2\xb2\xf3\x84\xa6\x1a\x63\x5f\xe4\xe2\xdb\x44\x66\xf8\x0b\xe4\x42\xec\xcb\x62\x76\xea\x52\xdd\x03\xaf\xbd\x7d\xd4\xf6\xcd\x30\xbf\x43\x0b\x77\xda\x81\x7c\x50\xd5\xc4\xf8\x1c\x3d\x3d\x2c\xca\x62\x36\xce\xe2\x7a\x25\x9e\xe4\x6b\xe0\xb5\xf5\x27\xf9\x2d\x45\xd6\x64\x40\x66\x7e\xf0\x89\x21\x4c\xfc\x0e\x49\xdd\xc1\xd7\x35\xd2\x7b\xb0\x3d\x04\x99\x81\xb7\xd0\xea\x64\x59\x2e\x32\xfd\x4f\x47\xe6\x3d\x1f\xbe\xc7\x2f\xd3\x1a\xb1\x12\x67\xfa\xfb\x85\xf4\x64\xf9\x7b\xc9\xea\x96\x90\x51\x5b\xfc\x01\x92\x43\x82\x67\xfb\x77\xda\x26\x78\xf9\x15\xea\xa6\x71\x48\xcf\x24\xe3\x65\x7f\x11\x9d\xe5\x43\x18\x02\x19\x01\xf5\x29\x91\x6c\x1d\xab\xfb\x3e\x20\x71\x2b\xe7\x57\xf1\xfa\xaa\x99\xbf\x16\x53\xba\x37\x4d\x13\x4e\xc3\x47\x1f\x78\x08\x0a\x5b\x91\x6d\x5e\xad\x04\xa1\x1d\xea\x9c\xf5\x9a\xd0\x48\x08\xc3\x8e\x43\x59\x1c\x7e\x06\x00\x00\xff\xff\xb4\xab\xa8\xfa\xfa\x03\x00\x00") + +func servicegenTplMainTplBytes() ([]byte, error) { + return bindataRead( + _servicegenTplMainTpl, + "servicegen/tpl/main.tpl", + ) +} + +func servicegenTplMainTpl() (*asset, error) { + bytes, err := servicegenTplMainTplBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "servicegen/tpl/main.tpl", size: 1018, mode: os.FileMode(438), modTime: time.Unix(1617940430, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + var _servicegenTplOptionsTpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4c\xc7\x3d\x0e\x02\x21\x10\x05\xe0\x9e\x84\x3b\xbc\x52\x1b\x6f\x60\x65\x61\xe5\x19\xc8\x0b\x19\xd6\xc9\xae\x03\xf2\x63\x62\x08\x77\xb7\xb5\xfc\x0a\xe3\xce\x4d\xf0\x64\xe3\xae\x61\xce\x0b\x4b\x09\xc6\x97\xac\x15\x72\xe9\x9a\xad\x79\xe7\xdd\x87\x15\x77\xe9\x8f\x6f\x7b\x1f\xb7\x6c\x49\x37\x5c\x91\x86\xc5\x93\x5a\x97\x9a\x18\x65\xae\x33\xfe\x80\x89\x2a\x7d\x54\x83\xe9\x81\xe5\xdd\x2f\x00\x00\xff\xff\x0a\xd4\xea\xc0\x6b\x00\x00\x00") func servicegenTplOptionsTplBytes() ([]byte, error) { @@ -275,13 +359,17 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "servicegen/tpl/api.tpl": servicegenTplApiTpl, - "servicegen/tpl/api_pre.tpl": servicegenTplApi_preTpl, - "servicegen/tpl/api_task.tpl": servicegenTplApi_taskTpl, - "servicegen/tpl/api_test.tpl": servicegenTplApi_testTpl, - "servicegen/tpl/db_model.tpl": servicegenTplDb_modelTpl, - "servicegen/tpl/external.tpl": servicegenTplExternalTpl, - "servicegen/tpl/options.tpl": servicegenTplOptionsTpl, + "servicegen/tpl/api.tpl": servicegenTplApiTpl, + "servicegen/tpl/api_pre.tpl": servicegenTplApi_preTpl, + "servicegen/tpl/api_task.tpl": servicegenTplApi_taskTpl, + "servicegen/tpl/api_test.tpl": servicegenTplApi_testTpl, + "servicegen/tpl/configjson.tpl": servicegenTplConfigjsonTpl, + "servicegen/tpl/db_model.tpl": servicegenTplDb_modelTpl, + "servicegen/tpl/external.tpl": servicegenTplExternalTpl, + "servicegen/tpl/initialize.tpl": servicegenTplInitializeTpl, + "servicegen/tpl/initialize_admin.tpl": servicegenTplInitialize_adminTpl, + "servicegen/tpl/main.tpl": servicegenTplMainTpl, + "servicegen/tpl/options.tpl": servicegenTplOptionsTpl, } // AssetDir returns the file names below a certain @@ -327,13 +415,17 @@ type bintree struct { var _bintree = &bintree{nil, map[string]*bintree{ "servicegen": &bintree{nil, map[string]*bintree{ "tpl": &bintree{nil, map[string]*bintree{ - "api.tpl": &bintree{servicegenTplApiTpl, map[string]*bintree{}}, - "api_pre.tpl": &bintree{servicegenTplApi_preTpl, map[string]*bintree{}}, - "api_task.tpl": &bintree{servicegenTplApi_taskTpl, map[string]*bintree{}}, - "api_test.tpl": &bintree{servicegenTplApi_testTpl, map[string]*bintree{}}, - "db_model.tpl": &bintree{servicegenTplDb_modelTpl, map[string]*bintree{}}, - "external.tpl": &bintree{servicegenTplExternalTpl, map[string]*bintree{}}, - "options.tpl": &bintree{servicegenTplOptionsTpl, map[string]*bintree{}}, + "api.tpl": &bintree{servicegenTplApiTpl, map[string]*bintree{}}, + "api_pre.tpl": &bintree{servicegenTplApi_preTpl, map[string]*bintree{}}, + "api_task.tpl": &bintree{servicegenTplApi_taskTpl, map[string]*bintree{}}, + "api_test.tpl": &bintree{servicegenTplApi_testTpl, map[string]*bintree{}}, + "configjson.tpl": &bintree{servicegenTplConfigjsonTpl, map[string]*bintree{}}, + "db_model.tpl": &bintree{servicegenTplDb_modelTpl, map[string]*bintree{}}, + "external.tpl": &bintree{servicegenTplExternalTpl, map[string]*bintree{}}, + "initialize.tpl": &bintree{servicegenTplInitializeTpl, map[string]*bintree{}}, + "initialize_admin.tpl": &bintree{servicegenTplInitialize_adminTpl, map[string]*bintree{}}, + "main.tpl": &bintree{servicegenTplMainTpl, map[string]*bintree{}}, + "options.tpl": &bintree{servicegenTplOptionsTpl, map[string]*bintree{}}, }}, }}, }}