mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-03 00:38:40 +08:00
f0ed2370a3
* fix #1014 * remove unused code * * optimize generate pb.go on Windows * format code * optimize console.go * version rollback Co-authored-by: anqiansong <anqiansong@bytedance.com>
19 lines
852 B
Go
19 lines
852 B
Go
package generator
|
|
|
|
import (
|
|
conf "github.com/tal-tech/go-zero/tools/goctl/config"
|
|
"github.com/tal-tech/go-zero/tools/goctl/rpc/parser"
|
|
)
|
|
|
|
// Generator defines a generator interface to describe how to generate rpc service
|
|
type Generator interface {
|
|
GenMain(ctx DirContext, proto parser.Proto, cfg *conf.Config) error
|
|
GenCall(ctx DirContext, proto parser.Proto, cfg *conf.Config) error
|
|
GenEtc(ctx DirContext, proto parser.Proto, cfg *conf.Config) error
|
|
GenConfig(ctx DirContext, proto parser.Proto, cfg *conf.Config) error
|
|
GenLogic(ctx DirContext, proto parser.Proto, cfg *conf.Config) error
|
|
GenServer(ctx DirContext, proto parser.Proto, cfg *conf.Config) error
|
|
GenSvc(ctx DirContext, proto parser.Proto, cfg *conf.Config) error
|
|
GenPb(ctx DirContext, protoImportPath []string, proto parser.Proto, cfg *conf.Config, goOptions ...string) error
|
|
}
|