Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoProtoFile = errors.New("proto file path is required") ErrOpeningProtoFile = errors.New("error opening the proto file") ErrFailedToParseProto = errors.New("failed to parse proto file") ErrGeneratingWrapper = errors.New("error while generating the code using proto file") ErrWritingFile = errors.New("error writing the generated code to the file") )
Functions ¶
func BuildGRPCKiteClient ¶
BuildGRPCKiteClient generates gRPC client wrapper code based on a proto definition.
func BuildGRPCKiteServer ¶
BuildGRPCKiteServer generates gRPC server code based on a proto definition.
Types ¶
type FileType ¶
type FileType struct {
FileSuffix string
CodeGenerator func(*WrapperData) string
}
type ProtoService ¶
type ProtoService struct {
Name string
Methods []ServiceMethod
}
ProtoService represents a service in a proto file.
type ServiceMethod ¶
type ServiceMethod struct {
Name string
Request string
Response string
StreamsRequest bool
StreamsResponse bool
}
ServiceMethod represents a method in a proto service.
type WrapperData ¶
type WrapperData struct {
Package string
Service string
Methods []ServiceMethod
Requests []string
Source string
}
WrapperData is the template data structure.
Click to show internal directories.
Click to hide internal directories.