├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── _test └── dbmeta │ └── main.go ├── code_dao_gorm.md ├── code_dao_sqlx.md ├── code_http.md ├── code_model.md ├── code_protobuf.md ├── custom ├── custom.go.tmpl ├── custom.json ├── custom.md.tmpl └── sample.gen ├── dbmeta ├── codegen.go ├── db_utils.go ├── meta.go ├── meta_mssql.go ├── meta_mysql.go ├── meta_postgres.go ├── meta_sqlite.go ├── meta_unknown.go ├── meta_utils.go ├── util.go └── util_test.go ├── example └── sample.db ├── go.mod ├── main-packr.go ├── main.go ├── packrd └── packed-packr.go ├── readme └── main.go ├── release.history ├── release.sh ├── template ├── GEN_README.md.tmpl ├── Makefile.tmpl ├── README.md.tmpl ├── api.go.tmpl ├── api_add.go.tmpl ├── api_delete.go.tmpl ├── api_get.go.tmpl ├── api_getall.go.tmpl ├── api_update.go.tmpl ├── code_dao_gorm.md.tmpl ├── code_dao_sqlx.md.tmpl ├── code_http.md.tmpl ├── dao_gorm.go.tmpl ├── dao_gorm_add.go.tmpl ├── dao_gorm_delete.go.tmpl ├── dao_gorm_get.go.tmpl ├── dao_gorm_getall.go.tmpl ├── dao_gorm_init.go.tmpl ├── dao_gorm_update.go.tmpl ├── dao_sqlx.go.tmpl ├── dao_sqlx_add.go.tmpl ├── dao_sqlx_delete.go.tmpl ├── dao_sqlx_get.go.tmpl ├── dao_sqlx_getall.go.tmpl ├── dao_sqlx_init.go.tmpl ├── dao_sqlx_update.go.tmpl ├── debug.txt ├── gitignore.tmpl ├── gomod.tmpl ├── http_utils.go.tmpl ├── main_gorm.go.tmpl ├── main_sqlx.go.tmpl ├── mapping.json ├── model.go.tmpl ├── model_base.go.tmpl ├── protobuf.tmpl ├── protomain.go.tmpl ├── protoserver.go.tmpl └── router.go.tmpl ├── test.sh └── utils ├── copy.go ├── options.go └── results.go /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/.gitignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/README.md -------------------------------------------------------------------------------- /_test/dbmeta/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/_test/dbmeta/main.go -------------------------------------------------------------------------------- /code_dao_gorm.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/code_dao_gorm.md -------------------------------------------------------------------------------- /code_dao_sqlx.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/code_dao_sqlx.md -------------------------------------------------------------------------------- /code_http.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/code_http.md -------------------------------------------------------------------------------- /code_model.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/code_model.md -------------------------------------------------------------------------------- /code_protobuf.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/code_protobuf.md -------------------------------------------------------------------------------- /custom/custom.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/custom/custom.go.tmpl -------------------------------------------------------------------------------- /custom/custom.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/custom/custom.json -------------------------------------------------------------------------------- /custom/custom.md.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/custom/custom.md.tmpl -------------------------------------------------------------------------------- /custom/sample.gen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/custom/sample.gen -------------------------------------------------------------------------------- /dbmeta/codegen.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/codegen.go -------------------------------------------------------------------------------- /dbmeta/db_utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/db_utils.go -------------------------------------------------------------------------------- /dbmeta/meta.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/meta.go -------------------------------------------------------------------------------- /dbmeta/meta_mssql.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/meta_mssql.go -------------------------------------------------------------------------------- /dbmeta/meta_mysql.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/meta_mysql.go -------------------------------------------------------------------------------- /dbmeta/meta_postgres.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/meta_postgres.go -------------------------------------------------------------------------------- /dbmeta/meta_sqlite.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/meta_sqlite.go -------------------------------------------------------------------------------- /dbmeta/meta_unknown.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/meta_unknown.go -------------------------------------------------------------------------------- /dbmeta/meta_utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/meta_utils.go -------------------------------------------------------------------------------- /dbmeta/util.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/util.go -------------------------------------------------------------------------------- /dbmeta/util_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/dbmeta/util_test.go -------------------------------------------------------------------------------- /example/sample.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/example/sample.db -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/go.mod -------------------------------------------------------------------------------- /main-packr.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/main-packr.go -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/main.go -------------------------------------------------------------------------------- /packrd/packed-packr.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/packrd/packed-packr.go -------------------------------------------------------------------------------- /readme/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/readme/main.go -------------------------------------------------------------------------------- /release.history: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/release.history -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/release.sh -------------------------------------------------------------------------------- /template/GEN_README.md.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/GEN_README.md.tmpl -------------------------------------------------------------------------------- /template/Makefile.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/Makefile.tmpl -------------------------------------------------------------------------------- /template/README.md.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/README.md.tmpl -------------------------------------------------------------------------------- /template/api.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/api.go.tmpl -------------------------------------------------------------------------------- /template/api_add.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/api_add.go.tmpl -------------------------------------------------------------------------------- /template/api_delete.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/api_delete.go.tmpl -------------------------------------------------------------------------------- /template/api_get.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/api_get.go.tmpl -------------------------------------------------------------------------------- /template/api_getall.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/api_getall.go.tmpl -------------------------------------------------------------------------------- /template/api_update.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/api_update.go.tmpl -------------------------------------------------------------------------------- /template/code_dao_gorm.md.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/code_dao_gorm.md.tmpl -------------------------------------------------------------------------------- /template/code_dao_sqlx.md.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/code_dao_sqlx.md.tmpl -------------------------------------------------------------------------------- /template/code_http.md.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/code_http.md.tmpl -------------------------------------------------------------------------------- /template/dao_gorm.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_gorm.go.tmpl -------------------------------------------------------------------------------- /template/dao_gorm_add.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_gorm_add.go.tmpl -------------------------------------------------------------------------------- /template/dao_gorm_delete.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_gorm_delete.go.tmpl -------------------------------------------------------------------------------- /template/dao_gorm_get.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_gorm_get.go.tmpl -------------------------------------------------------------------------------- /template/dao_gorm_getall.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_gorm_getall.go.tmpl -------------------------------------------------------------------------------- /template/dao_gorm_init.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_gorm_init.go.tmpl -------------------------------------------------------------------------------- /template/dao_gorm_update.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_gorm_update.go.tmpl -------------------------------------------------------------------------------- /template/dao_sqlx.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_sqlx.go.tmpl -------------------------------------------------------------------------------- /template/dao_sqlx_add.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_sqlx_add.go.tmpl -------------------------------------------------------------------------------- /template/dao_sqlx_delete.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_sqlx_delete.go.tmpl -------------------------------------------------------------------------------- /template/dao_sqlx_get.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_sqlx_get.go.tmpl -------------------------------------------------------------------------------- /template/dao_sqlx_getall.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_sqlx_getall.go.tmpl -------------------------------------------------------------------------------- /template/dao_sqlx_init.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_sqlx_init.go.tmpl -------------------------------------------------------------------------------- /template/dao_sqlx_update.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/dao_sqlx_update.go.tmpl -------------------------------------------------------------------------------- /template/debug.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/debug.txt -------------------------------------------------------------------------------- /template/gitignore.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/gitignore.tmpl -------------------------------------------------------------------------------- /template/gomod.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/gomod.tmpl -------------------------------------------------------------------------------- /template/http_utils.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/http_utils.go.tmpl -------------------------------------------------------------------------------- /template/main_gorm.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/main_gorm.go.tmpl -------------------------------------------------------------------------------- /template/main_sqlx.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/main_sqlx.go.tmpl -------------------------------------------------------------------------------- /template/mapping.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/mapping.json -------------------------------------------------------------------------------- /template/model.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/model.go.tmpl -------------------------------------------------------------------------------- /template/model_base.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/model_base.go.tmpl -------------------------------------------------------------------------------- /template/protobuf.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/protobuf.tmpl -------------------------------------------------------------------------------- /template/protomain.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/protomain.go.tmpl -------------------------------------------------------------------------------- /template/protoserver.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/protoserver.go.tmpl -------------------------------------------------------------------------------- /template/router.go.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/template/router.go.tmpl -------------------------------------------------------------------------------- /test.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/test.sh -------------------------------------------------------------------------------- /utils/copy.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/utils/copy.go -------------------------------------------------------------------------------- /utils/options.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/utils/options.go -------------------------------------------------------------------------------- /utils/results.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smallnest/gen/HEAD/utils/results.go --------------------------------------------------------------------------------