Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalType ¶
ExternalType is a type that is called to another package
func (ExternalType) Code ¶
func (t ExternalType) Code() string
Code returns token string in code format
type File ¶
type File struct { PackageName string Imports []Import Structs Structs Interfaces Interfaces Methods []Method }
File is a container of all required components for code generation in the file
func ExportFile ¶
func ExtractComponents ¶
ExtractComponents converts ast file into code components model
func ExtractComponentsByPath ¶
type InterfaceType ¶
InterfaceType is a definition of the interface
func (InterfaceType) Code ¶
func (intf InterfaceType) Code() string
Code returns token string in code format
type Interfaces ¶
type Interfaces []InterfaceType
Interfaces is a group of Interface model
func (Interfaces) ByName ¶
func (intfs Interfaces) ByName(name string) (InterfaceType, bool)
ByName return interface by name Another return value shows whether there is an interface with that name exists.
type PointerType ¶
type PointerType struct {
ContainedType Type
}
PointerType is a model of pointer
func (PointerType) Code ¶
func (t PointerType) Code() string
Code returns token string in code format
type SimpleType ¶
type SimpleType string
SimpleType is a type that can be called directly
func (SimpleType) IsBuildIn ¶
func (t SimpleType) IsBuildIn() bool
type Struct ¶
type Struct struct { PackageAlias string Name string Fields StructFields }
Struct is a definition of the struct
func (Struct) ReferencedType ¶
ReferencedType returns a type variable of this struct
type StructField ¶
StructField is a definition of the struct field
type StructFields ¶
type StructFields []StructField
StructFields is a group of the StructField model
func (StructFields) ByName ¶
func (fields StructFields) ByName(name string) (StructField, bool)
ByName return struct field with matching name