Documentation ¶
Index ¶
- func ParseRawAnnot(raw string) (tagName, tagAttrs string)
- func StructTag(tag *ast.BasicLit) reflect.StructTag
- type AnnotateProject
- type Annotation
- type Annotator
- type Decl
- type Directive
- type Directives
- type Field
- type FieldList
- type File
- type FilePaths
- type Filter
- type Filters
- type FuncDecl
- type FuncFilter
- type GenDecl
- type ImportAliases
- type InterfaceDecl
- type InterfaceFilter
- type Layouts
- type NewFilter
- type NewProcessor
- type Processor
- type PublicFilter
- type Signature
- type StructDecl
- type StructFilter
- type TagNameFilter
- type Type
- type TypeDecl
- type Walker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseRawAnnot ¶ added in v0.11.4
ParseRawAnnot parse raw string to annotation
Types ¶
type AnnotateProject ¶ added in v0.10.12
AnnotateProject task
func (*AnnotateProject) Execute ¶ added in v0.10.12
func (a *AnnotateProject) Execute(c *typgo.Context) error
Execute annotation
func (*AnnotateProject) Task ¶ added in v0.11.1
func (a *AnnotateProject) Task() *typgo.Task
Task to annotate
type Annotation ¶
func (*Annotation) Annotate ¶ added in v0.11.4
func (a *Annotation) Annotate() Processor
func (*Annotation) Process ¶ added in v0.11.4
func (a *Annotation) Process(c *typgo.Context, directives Directives) error
type Directive ¶ added in v0.11.4
type Directive struct { TagName string `json:"tag_name"` TagParam reflect.StructTag `json:"tag_param"` *Decl `json:"decl"` }
Directive that contain extra additional information
type Directives ¶ added in v0.11.4
type Directives []*Directive
func (*Directives) AddDecl ¶ added in v0.11.4
func (s *Directives) AddDecl(file File, declType Type)
AddDecl add declaration
type FieldList ¶ added in v0.10.8
type FieldList struct {
List []*Field
}
FieldList function parameter
type FuncDecl ¶ added in v0.10.8
FuncDecl function declaration
type FuncFilter ¶ added in v0.11.4
type FuncFilter struct{}
func (*FuncFilter) IsAllowed ¶ added in v0.11.4
func (*FuncFilter) IsAllowed(d *Directive) bool
type ImportAliases ¶ added in v0.10.23
type ImportAliases struct { Map map[string]string // key is import package , value is import alias // contains filtered or unexported fields }
ImportAliases ...
func NewImportAliases ¶ added in v0.10.23
func NewImportAliases() *ImportAliases
NewImportAliases return new constructor of ImportAliasess
func (*ImportAliases) Append ¶ added in v0.10.23
func (i *ImportAliases) Append(pkg string) string
Append package to map
type InterfaceDecl ¶ added in v0.10.8
type InterfaceDecl struct {
TypeDecl
}
InterfaceDecl interface declaration
type InterfaceFilter ¶ added in v0.11.4
type InterfaceFilter struct{}
func (*InterfaceFilter) IsAllowed ¶ added in v0.11.4
func (*InterfaceFilter) IsAllowed(d *Directive) bool
type NewProcessor ¶ added in v0.11.4
type NewProcessor func(*typgo.Context, Directives) error
func (NewProcessor) Process ¶ added in v0.11.4
func (p NewProcessor) Process(c *typgo.Context, d Directives) error
type Processor ¶ added in v0.11.4
type Processor interface {
Process(*typgo.Context, Directives) error
}
type PublicFilter ¶ added in v0.11.4
type PublicFilter struct{}
func (*PublicFilter) IsAllowed ¶ added in v0.11.4
func (*PublicFilter) IsAllowed(d *Directive) bool
type Signature ¶ added in v0.10.8
type Signature struct {
TagName string
}
Signature for code generation by annotation
type StructDecl ¶ added in v0.10.8
StructDecl struct declaration
type StructFilter ¶ added in v0.11.4
type StructFilter struct{}
func (*StructFilter) IsAllowed ¶ added in v0.11.4
func (*StructFilter) IsAllowed(d *Directive) bool
type TagNameFilter ¶ added in v0.11.4
type TagNameFilter []string
func (TagNameFilter) IsAllowed ¶ added in v0.11.4
func (t TagNameFilter) IsAllowed(d *Directive) bool
Click to show internal directories.
Click to hide internal directories.