Documentation ¶
Index ¶
- func GetCompilerVersion(req *pluginpb.CodeGeneratorRequest) string
- func GetFilesToGenerate(req *pluginpb.CodeGeneratorRequest) ([]protoreflect.FileDescriptor, error)
- func GetLeadingComments(desc protoreflect.MessageDescriptor) string
- func Run(...) error
- func SetCommandLineFlags(req *pluginpb.CodeGeneratorRequest, flags *flag.FlagSet) (map[string]string, error)
- func UnderscoresToCamelCase(input string, capNextLetter, preservePeriod bool) string
- type CSharpConfig
- type CSharpGenerator
- type GenConfig
- type GenContext
- type GenFile
- type GoConfig
- type GoGenerator
- type MsgGroupConfig
- type OutConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCompilerVersion ¶
func GetCompilerVersion(req *pluginpb.CodeGeneratorRequest) string
func GetFilesToGenerate ¶
func GetFilesToGenerate(req *pluginpb.CodeGeneratorRequest) ([]protoreflect.FileDescriptor, error)
func GetLeadingComments ¶
func GetLeadingComments(desc protoreflect.MessageDescriptor) string
func Run ¶
func Run(f func(req *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)) error
func SetCommandLineFlags ¶
func UnderscoresToCamelCase ¶
Types ¶
type CSharpConfig ¶
type CSharpGenerator ¶
type CSharpGenerator struct {
// contains filtered or unexported fields
}
func NewCSharpGenerator ¶
func NewCSharpGenerator(version string) *CSharpGenerator
func (*CSharpGenerator) Execute ¶
func (g *CSharpGenerator) Execute(req *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
type GenConfig ¶
type GenConfig struct { Out *OutConfig `toml:"out"` MsgGroups []*MsgGroupConfig `toml:"groups"` }
func ReadConfigFromFile ¶
type GenContext ¶
type GenContext struct { Config *GenConfig // contains filtered or unexported fields }
func NewGenContext ¶
func NewGenContext(c *GenConfig) *GenContext
func NewGenContextFromConfigFile ¶
func NewGenContextFromConfigFile(configFile string) (*GenContext, error)
func (*GenContext) AllocMsgId ¶
func (ctx *GenContext) AllocMsgId(magicComments string) (uint16, bool, error)
type GenFile ¶
type GenFile struct {
// contains filtered or unexported fields
}
func (*GenFile) AppendToRsp ¶
func (g *GenFile) AppendToRsp(rsp *pluginpb.CodeGeneratorResponse, filename string)
type GoGenerator ¶
type GoGenerator struct {
// contains filtered or unexported fields
}
func NewGoGenerator ¶
func NewGoGenerator(version string) *GoGenerator
func (*GoGenerator) Execute ¶
func (g *GoGenerator) Execute(req *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
type MsgGroupConfig ¶
type OutConfig ¶
type OutConfig struct { CSharp *CSharpConfig `toml:"csharp"` Go *GoConfig `toml:"go"` }
Click to show internal directories.
Click to hide internal directories.