Documentation ¶
Index ¶
- Constants
- func Exists(path string) bool
- func GetFileBaseDir(file *protogen.File, config GenerateConfig) string
- func ParseGoFile(filepath string) ([]byte, map[string]struct{})
- func ToCamelCase(s string) string
- func ToSnakeCase(input string) string
- type CodeHeader
- type CodeHeaderTmpl
- type GenerateConfig
- type Importer
- type TmplRenderer
Constants ¶
View Source
const (
DeprecationComment = "// Deprecated: Do not use."
)
Variables ¶
This section is empty.
Functions ¶
func GetFileBaseDir ¶
func GetFileBaseDir(file *protogen.File, config GenerateConfig) string
func ParseGoFile ¶
func ToCamelCase ¶
func ToSnakeCase ¶
Types ¶
type CodeHeader ¶
type CodeHeader struct {
// contains filtered or unexported fields
}
func NewCodeHeader ¶
func NewCodeHeader() *CodeHeader
func (*CodeHeader) DoNotEdit ¶
func (h *CodeHeader) DoNotEdit() *CodeHeader
func (*CodeHeader) Import ¶
func (h *CodeHeader) Import(importPath string) *CodeHeader
func (*CodeHeader) ImportWithAlias ¶
func (h *CodeHeader) ImportWithAlias(importPath string, alias string) *CodeHeader
func (*CodeHeader) Pkg ¶
func (h *CodeHeader) Pkg(pkg string) *CodeHeader
func (CodeHeader) String ¶
func (h CodeHeader) String() string
type CodeHeaderTmpl ¶
type CodeHeaderTmpl string
func (CodeHeaderTmpl) String ¶
func (t CodeHeaderTmpl) String(pkg string) string
type GenerateConfig ¶
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
func NewImporter ¶
func NewImporter() *Importer
func (*Importer) ImportWithAlias ¶
type TmplRenderer ¶
type TmplRenderer struct {
// contains filtered or unexported fields
}
func NewTmplRenderer ¶
func NewTmplRenderer(name string) *TmplRenderer
func (*TmplRenderer) Data ¶
func (r *TmplRenderer) Data(data interface{}) *TmplRenderer
func (*TmplRenderer) RenderTmpl ¶
func (r *TmplRenderer) RenderTmpl() string
func (*TmplRenderer) Text ¶
func (r *TmplRenderer) Text(text string) *TmplRenderer
Click to show internal directories.
Click to hide internal directories.