Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGoVet ¶
CheckGoVet to find errors not caught by the compiler.
func Execute ¶
func Execute(serverData ServerData) error
Execute to generate code grpc server with flag.
func FormatSourceCode ¶
FormatSourceCode to format code.
func WriteToFile ¶
WriteToFile to write byte data to filePath.
Types ¶
type MethodInfo ¶
type ProtoExtractor ¶
func NewProtoExtractor ¶
func NewProtoExtractor() ProtoExtractor
type ServerData ¶
type ServerData struct { Services []Service TemplateSource string RPCProtos []string `name:"rpc_protos" help:"List services from rpc rpc or local folder" flag:"RPCProtos" default:"health/v1/service.proto"` EnableGateway bool `name:"enable_gateway" help:"Option to enable gateway" flag:"EnableGateway" default:"false"` OutputPath string `name:"output_path" help:"Goal path then generate" flag:"OutputPath" default:"z_server_grpc.go"` EnableMetric bool `name:"enable_metric" help:"Option to enable metric prometheus" flag:"EnableMetric" default:"true"` EnableHTTP bool `name:"enable_http" help:"Option expose port http" flag:"EnableHTTP" default:"true"` RPCProtoDir string `name:"rpc_proto_dir" help:"Folder contain list service" flag:"RPCProtoDir" default:"rpc-proto/proto"` }
ServerData define flag of gen grpc server.
func NewServerData ¶
func NewServerData(serverData ServerData) (ServerData, error)
NewServerData to return data use for template
Click to show internal directories.
Click to hide internal directories.