├── .gitignore ├── LICENSE ├── README.md ├── cmd ├── add.go ├── grpc.go ├── grpc_add.go ├── grpc_update.go ├── http_add.go ├── init.go ├── new.go ├── root.go ├── service.go ├── thrift.go ├── thrift_add.go └── update.go ├── fs └── fs.go ├── generator ├── addGRPCGenerator.go ├── addHttpGenerator.go ├── addThriftGenerator.go ├── apiMainGenerator.go ├── const.go ├── gRPCInitGenerator.go ├── gRPCUpdateGenerator.go ├── generator.go ├── serviceInitGenerator.go ├── serviceMainGenerator.go ├── serviceNewGenerator.go ├── serviceUpdateGenerator.go └── thriftInitGenerator.go ├── gk.json ├── go.mod ├── go.sum ├── main.go ├── parser ├── file.go ├── interface.go ├── method.go ├── parse.go ├── parse_test.go ├── proto.go ├── proto_test.go ├── src.go └── struct.go ├── templates ├── bindata.go ├── compile.bat ├── compile.sh ├── template.go └── tmpl │ ├── file.tmpl │ ├── gk.json.tmpl │ ├── main_api.tmpl │ ├── main_svc.tmpl │ ├── partials │ ├── alias_type.tmpl │ ├── constants.tmpl │ ├── endpoint_func.tmpl │ ├── func.tmpl │ ├── func_parameters.tmpl │ ├── func_results.tmpl │ ├── func_return.tmpl │ ├── imports.tmpl │ ├── interface.tmpl │ ├── interface_func.tmpl │ ├── interface_stub.tmpl │ ├── struct.tmpl │ ├── struct_function.tmpl │ └── vars.tmpl │ ├── proto.pb.tmpl │ ├── proto_compile.bat.tmpl │ ├── proto_compile.sh.tmpl │ ├── svc.thrift.tmpl │ ├── thrift_compile.bat.tmpl │ └── thrift_compile.sh.tmpl └── utils └── utils.go /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/README.md -------------------------------------------------------------------------------- /cmd/add.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/add.go -------------------------------------------------------------------------------- /cmd/grpc.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/grpc.go -------------------------------------------------------------------------------- /cmd/grpc_add.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/grpc_add.go -------------------------------------------------------------------------------- /cmd/grpc_update.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/grpc_update.go -------------------------------------------------------------------------------- /cmd/http_add.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/http_add.go -------------------------------------------------------------------------------- /cmd/init.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/init.go -------------------------------------------------------------------------------- /cmd/new.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/new.go -------------------------------------------------------------------------------- /cmd/root.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/root.go -------------------------------------------------------------------------------- /cmd/service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/service.go -------------------------------------------------------------------------------- /cmd/thrift.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/thrift.go -------------------------------------------------------------------------------- /cmd/thrift_add.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/thrift_add.go -------------------------------------------------------------------------------- /cmd/update.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/cmd/update.go -------------------------------------------------------------------------------- /fs/fs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/fs/fs.go -------------------------------------------------------------------------------- /generator/addGRPCGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/addGRPCGenerator.go -------------------------------------------------------------------------------- /generator/addHttpGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/addHttpGenerator.go -------------------------------------------------------------------------------- /generator/addThriftGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/addThriftGenerator.go -------------------------------------------------------------------------------- /generator/apiMainGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/apiMainGenerator.go -------------------------------------------------------------------------------- /generator/const.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/const.go -------------------------------------------------------------------------------- /generator/gRPCInitGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/gRPCInitGenerator.go -------------------------------------------------------------------------------- /generator/gRPCUpdateGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/gRPCUpdateGenerator.go -------------------------------------------------------------------------------- /generator/generator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/generator.go -------------------------------------------------------------------------------- /generator/serviceInitGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/serviceInitGenerator.go -------------------------------------------------------------------------------- /generator/serviceMainGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/serviceMainGenerator.go -------------------------------------------------------------------------------- /generator/serviceNewGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/serviceNewGenerator.go -------------------------------------------------------------------------------- /generator/serviceUpdateGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/serviceUpdateGenerator.go -------------------------------------------------------------------------------- /generator/thriftInitGenerator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/generator/thriftInitGenerator.go -------------------------------------------------------------------------------- /gk.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/gk.json -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/go.sum -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/main.go -------------------------------------------------------------------------------- /parser/file.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/file.go -------------------------------------------------------------------------------- /parser/interface.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/interface.go -------------------------------------------------------------------------------- /parser/method.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/method.go -------------------------------------------------------------------------------- /parser/parse.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/parse.go -------------------------------------------------------------------------------- /parser/parse_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/parse_test.go -------------------------------------------------------------------------------- /parser/proto.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/proto.go -------------------------------------------------------------------------------- /parser/proto_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/proto_test.go -------------------------------------------------------------------------------- /parser/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/src.go -------------------------------------------------------------------------------- /parser/struct.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/parser/struct.go -------------------------------------------------------------------------------- /templates/bindata.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/bindata.go -------------------------------------------------------------------------------- /templates/compile.bat: -------------------------------------------------------------------------------- 1 | go-bindata -pkg=template -ignore=.go -nomemcopy tmpl/... -------------------------------------------------------------------------------- /templates/compile.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/compile.sh -------------------------------------------------------------------------------- /templates/template.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/template.go -------------------------------------------------------------------------------- /templates/tmpl/file.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/file.tmpl -------------------------------------------------------------------------------- /templates/tmpl/gk.json.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/gk.json.tmpl -------------------------------------------------------------------------------- /templates/tmpl/main_api.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/main_api.tmpl -------------------------------------------------------------------------------- /templates/tmpl/main_svc.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/main_svc.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/alias_type.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/alias_type.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/constants.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/constants.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/endpoint_func.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/endpoint_func.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/func.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/func.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/func_parameters.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/func_parameters.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/func_results.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/func_results.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/func_return.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/func_return.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/imports.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/imports.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/interface.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/interface.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/interface_func.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/interface_func.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/interface_stub.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/interface_stub.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/struct.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/struct.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/struct_function.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/struct_function.tmpl -------------------------------------------------------------------------------- /templates/tmpl/partials/vars.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/partials/vars.tmpl -------------------------------------------------------------------------------- /templates/tmpl/proto.pb.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/proto.pb.tmpl -------------------------------------------------------------------------------- /templates/tmpl/proto_compile.bat.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/proto_compile.bat.tmpl -------------------------------------------------------------------------------- /templates/tmpl/proto_compile.sh.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/proto_compile.sh.tmpl -------------------------------------------------------------------------------- /templates/tmpl/svc.thrift.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/svc.thrift.tmpl -------------------------------------------------------------------------------- /templates/tmpl/thrift_compile.bat.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/thrift_compile.bat.tmpl -------------------------------------------------------------------------------- /templates/tmpl/thrift_compile.sh.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/templates/tmpl/thrift_compile.sh.tmpl -------------------------------------------------------------------------------- /utils/utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiv/gk/HEAD/utils/utils.go --------------------------------------------------------------------------------