Documentation
¶
Index ¶
- func ParseEnum(doc string) (string, bool)
- func ParseStringFormat(doc string) (string, string)
- func ParseType(typeExpr ast.Expr) (keyType, pkgName string, pointer bool)
- func RetrievePackageName(path string) string
- func StringifyCommentGroup(commentGroupList ...*ast.CommentGroup) (comments string)
- type ByCommentPos
- type CommentScanner
- type EnumScanner
- type ModelScanner
- func (m *ModelScanner) GetModel(name string, pkgID string) *api.OperatorModel
- func (m *ModelScanner) GetModelByID(id string) *api.OperatorModel
- func (m *ModelScanner) NewInspector(pkg *packages.Package) func(node ast.Node) bool
- func (m *ModelScanner) NewModel(name string, pkgID string) *api.OperatorModel
- func (m *ModelScanner) RegisterModel(model *api.OperatorModel)
- func (m *ModelScanner) ResolveStdType(typeName, pkgPath string) *api.OperatorModel
- type OperatorScanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseStringFormat ¶
func RetrievePackageName ¶
func StringifyCommentGroup ¶
func StringifyCommentGroup(commentGroupList ...*ast.CommentGroup) (comments string)
Types ¶
type ByCommentPos ¶
type ByCommentPos []*ast.CommentGroup
func (ByCommentPos) Len ¶
func (a ByCommentPos) Len() int
func (ByCommentPos) Less ¶
func (a ByCommentPos) Less(i, j int) bool
func (ByCommentPos) Swap ¶
func (a ByCommentPos) Swap(i, j int)
type CommentScanner ¶
type CommentScanner struct {
CommentMap ast.CommentMap
// contains filtered or unexported fields
}
func NewCommentScanner ¶
func NewCommentScanner(fileSet *token.FileSet, file *ast.File) *CommentScanner
func (*CommentScanner) CommentGroupListOf ¶
func (scanner *CommentScanner) CommentGroupListOf(targetNode ast.Node) (commentGroupList []*ast.CommentGroup)
func (*CommentScanner) CommentsOf ¶
func (scanner *CommentScanner) CommentsOf(targetNode ast.Node) string
type EnumScanner ¶
func NewEnumScanner ¶
func NewEnumScanner() *EnumScanner
func (*EnumScanner) HasOffset ¶
func (s *EnumScanner) HasOffset(typeFullName string) bool
type ModelScanner ¶
type ModelScanner struct {
Api *api.Api
*EnumScanner
// contains filtered or unexported fields
}
func NewModelScanner ¶
func NewModelScanner(enum *EnumScanner) *ModelScanner
func (*ModelScanner) GetModel ¶
func (m *ModelScanner) GetModel(name string, pkgID string) *api.OperatorModel
func (*ModelScanner) GetModelByID ¶
func (m *ModelScanner) GetModelByID(id string) *api.OperatorModel
func (*ModelScanner) NewInspector ¶
func (*ModelScanner) NewModel ¶
func (m *ModelScanner) NewModel(name string, pkgID string) *api.OperatorModel
func (*ModelScanner) RegisterModel ¶
func (m *ModelScanner) RegisterModel(model *api.OperatorModel)
func (*ModelScanner) ResolveStdType ¶
func (m *ModelScanner) ResolveStdType(typeName, pkgPath string) *api.OperatorModel
type OperatorScanner ¶
func NewOperatorScanner ¶
func NewOperatorScanner(modelScanner *ModelScanner) *OperatorScanner
func (*OperatorScanner) AddOrphanMethod ¶
func (v *OperatorScanner) AddOrphanMethod(method *api.OperatorMethod, groupName string)
func (*OperatorScanner) NewInspector ¶
func (*OperatorScanner) ResolveOrphanMethod ¶
func (v *OperatorScanner) ResolveOrphanMethod(groupName string) error
Click to show internal directories.
Click to hide internal directories.