Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcGatewayParser ¶
type GrpcGatewayParser struct {
// contains filtered or unexported fields
}
GrpcGatewayParser 使用grpc-gateway官方包的完整解析器
func NewGrpcGatewayParser ¶
func NewGrpcGatewayParser(workDir string) *GrpcGatewayParser
NewGrpcGatewayParser 创建新的grpc-gateway解析器
func (*GrpcGatewayParser) GenerateCode ¶
func (p *GrpcGatewayParser) GenerateCode(outputDir string, openapi bool) error
GenerateCode 生成代码
func (*GrpcGatewayParser) ParseDirectory ¶
func (p *GrpcGatewayParser) ParseDirectory(dir string) ([]*ast.ProtobufFile, error)
ParseDirectory 解析目录中的所有protobuf文件
func (*GrpcGatewayParser) ParseFile ¶
func (p *GrpcGatewayParser) ParseFile(filename string) (*ast.ProtobufFile, error)
ParseFile 解析单个protobuf文件
func (*GrpcGatewayParser) SetOffline ¶
func (p *GrpcGatewayParser) SetOffline(v bool)
SetOffline 设置离线模式
type OfficialParser ¶
type OfficialParser struct {
// contains filtered or unexported fields
}
OfficialParser 使用grpc-gateway官方包的解析器
func NewOfficialParser ¶
func NewOfficialParser(workDir string) *OfficialParser
NewOfficialParser 创建新的官方protobuf解析器
func (*OfficialParser) ParseDirectory ¶
func (p *OfficialParser) ParseDirectory(dir string) ([]*ast.ProtobufFile, error)
ParseDirectory 解析目录中的所有protobuf文件
func (*OfficialParser) ParseFile ¶
func (p *OfficialParser) ParseFile(filename string) (*ast.ProtobufFile, error)
ParseFile 解析单个protobuf文件
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser 用于解析protobuf文件
func (*Parser) ParseDirectory ¶
func (p *Parser) ParseDirectory(dir string) ([]*ast.ProtobufFile, error)
ParseDirectory 解析目录中的所有protobuf文件
Click to show internal directories.
Click to hide internal directories.