예제 #1
0
파일: crud.py 프로젝트: lijsh/xuanwu
def main(thrift_idl):
    loader = base.load_thrift(thrift_idl)
    global namespace
    namespace = loader.namespace
    for obj in loader.modules.values():
        transform_module(obj)
    updateController(out_path)
예제 #2
0
파일: xuanwu.py 프로젝트: lijsh/xuanwu
def main(thrift_idl):
	loader = base.load_thrift(thrift_idl)
	global namespace
	namespace = loader.namespace
	tpl = open('tmpl/go_package.tmpl', 'r').read()
	t = Template(tpl, searchList=[{"namespace": namespace}])
	code = unicode(t)
	with open(out_path + 'gen_init.go', "w") as fp:
		fp.write(code)

	for module in loader.modules.values():
		transform(module)
예제 #3
0
파일: list.py 프로젝트: qiandashuai/xuanwu
def main(thrift_idl):
	loader = base.load_thrift(thrift_idl)
	namespace = loader.namespace
	print '	_ "zfw/models/' + namespace + '"'