Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CamelCaseName = TypeResolverFunc(func(typ types.Type, pbType ast.Type) string { if typ != nil { return strcase.ToCamel(typ.GetName()) } named, ok := pbType.(ast.Named) if ok { return strcase.ToCamel(named.GetName()) } panic(fmt.Sprintf("neither go type nor pb named type provided: %s, %s", typ, pbType)) })
View Source
var DefaultImportsResolver = ImportsResolverFunc(func(typ types.Type, pbType ast.Type) []string { return nil })
View Source
var SnakeCaseGoTypeFile = TypeResolverFunc(func(typ types.Type, pbType ast.Type) string { return strcase.ToSnake(typ.GetName()) + ".go" })
View Source
var StandardFieldResolver = FieldResolverFunc(func(field types.Field, pbType ast.Type) string {
return field.GetName() + " " + field.GetType().GetName()
})
Functions ¶
func GoTypeName ¶
func PbGoEnumName ¶
func PbGoFieldName ¶
func PbGoStructName ¶
func PkgFromDir ¶
Types ¶
type FieldResolverFunc ¶
type ImportsResolverFunc ¶
Click to show internal directories.
Click to hide internal directories.