Documentation
¶
Index ¶
- func IsGenumDirective(comment string) bool
- func ParseFlags(comment string) (map[string]string, error)
- type CaseHandling
- type Directive
- type Enum
- type EnumValue
- type Environment
- type File
- type Generator
- type Loader
- type Parser
- func (p *Parser) Parse(env *Environment) ([]File, error)
- func (p *Parser) ParseBaseType(pkg *packages.Package, typeName string) *string
- func (p *Parser) ParseConstants(pkg *packages.Package, typeName string) []EnumValue
- func (p *Parser) ParseFileDirectives(env *Environment) ([]Directive, error)
- func (p *Parser) ParseSingleEnum(pkg *packages.Package, directive *Directive) (*Enum, error)
- func (p *Parser) ProcessConstGroupWithTypes(pkg *packages.Package, decl *ast.GenDecl, targetType string, ...)
- func (p *Parser) TypeString(typ types.Type) string
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGenumDirective ¶
Types ¶
type CaseHandling ¶ added in v0.1.3
type CaseHandling string
const ( CaseSensitive CaseHandling = "sensitive" CaseIgnore CaseHandling = "ignore" CaseLower CaseHandling = "lower" CaseUpper CaseHandling = "upper" )
func (CaseHandling) IsValid ¶ added in v0.1.3
func (c CaseHandling) IsValid() bool
type Directive ¶
type Directive struct {
TypeName string
OutputFile string
TrimPrefix string
Case CaseHandling
}
func ParseFromComment ¶
type Environment ¶
func (*Environment) PackageName ¶
func (e *Environment) PackageName() string
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator() *Generator
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) Load ¶
func (l *Loader) Load() (*Environment, error)
type Parser ¶
type Parser struct{}
func (*Parser) ParseBaseType ¶
func (*Parser) ParseConstants ¶
func (*Parser) ParseFileDirectives ¶
func (p *Parser) ParseFileDirectives(env *Environment) ([]Directive, error)
func (*Parser) ParseSingleEnum ¶
func (*Parser) ProcessConstGroupWithTypes ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.