app

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCompilerVersion

func GetCompilerVersion(req *pluginpb.CodeGeneratorRequest) string

func GetLeadingComments

func GetLeadingComments(desc protoreflect.MessageDescriptor) string

func SetCommandLineFlags

func SetCommandLineFlags(req *pluginpb.CodeGeneratorRequest, flags *flag.FlagSet) (map[string]string, error)

func UnderscoresToCamelCase

func UnderscoresToCamelCase(input string, capNextLetter, preservePeriod bool) string

Types

type CSharpConfig

type CSharpConfig struct {
	Namespace       string `toml:"namespace"`
	ClassName       string `toml:"class"`
	Filename        string `toml:"filename"`
	IsMsgDisposable bool   `toml:"disposable_message,omitempty"`
}

type CSharpGenerator

type CSharpGenerator struct {
	// contains filtered or unexported fields
}

func NewCSharpGenerator

func NewCSharpGenerator(version string) *CSharpGenerator

func (*CSharpGenerator) Execute

type GenConfig

type GenConfig struct {
	Out       *OutConfig        `toml:"out"`
	MsgGroups []*MsgGroupConfig `toml:"groups"`
}

func ReadConfigFromFile

func ReadConfigFromFile(file string) (*GenConfig, error)

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)

func (*GenFile) Indent

func (g *GenFile) Indent(count int)

func (*GenFile) P

func (g *GenFile) P(v ...interface{})

type GoConfig

type GoConfig struct {
	ImportPath string `toml:"import_path"`
	Package    string `toml:"package"`
	Filename   string `toml:"filename"`
}

type GoGenerator

type GoGenerator struct {
	// contains filtered or unexported fields
}

func NewGoGenerator

func NewGoGenerator(version string) *GoGenerator

func (*GoGenerator) Execute

type MsgGroupConfig

type MsgGroupConfig struct {
	Name string `toml:"name"`
	Min  uint16 `toml:"min"`
	Max  uint16 `toml:"max"`
}

type OutConfig

type OutConfig struct {
	CSharp *CSharpConfig `toml:"csharp"`
	Go     *GoConfig     `toml:"go"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL