nodes

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WrongPathErr = errors.New("wrong name path")

Functions

func VariableNameJoin

func VariableNameJoin(prefix, name string) string

Types

type ArrayType

type ArrayType struct {
	// contains filtered or unexported fields
}

@Builder(type="pointer")

func (*ArrayType) DeclaredType

func (a *ArrayType) DeclaredType() string

func (*ArrayType) Equal

func (a *ArrayType) Equal(a1 *ArrayType) bool

func (*ArrayType) IsPointer

func (a *ArrayType) IsPointer() bool

type ArrayTypeBuilder

type ArrayTypeBuilder struct {
	// contains filtered or unexported fields
}

func NewArrayTypeBuilder

func NewArrayTypeBuilder() *ArrayTypeBuilder

func (*ArrayTypeBuilder) AstArray

func (*ArrayTypeBuilder) Build

func (b *ArrayTypeBuilder) Build() *ArrayType

func (*ArrayTypeBuilder) ImpCache

func (*ArrayTypeBuilder) IsPointer

func (b *ArrayTypeBuilder) IsPointer(v bool) *ArrayTypeBuilder

func (*ArrayTypeBuilder) Node

func (*ArrayTypeBuilder) ParentImport

func (b *ArrayTypeBuilder) ParentImport(v string) *ArrayTypeBuilder

type Field

type Field struct {
	// contains filtered or unexported fields
}

@Builder(type="pointer")

func (*Field) Declaration

func (f *Field) Declaration() string

func (*Field) DeclaredType

func (f *Field) DeclaredType() string

func (*Field) FindNilChecks

func (f *Field) FindNilChecks(prefix string, names []string) ([]string, bool, error)

func (*Field) IsExported

func (f *Field) IsExported() bool

func (*Field) Name

func (f *Field) Name() string

func (*Field) Type

func (f *Field) Type() Type

type FieldBuilder

type FieldBuilder struct {
	// contains filtered or unexported fields
}

func NewFieldBuilder

func NewFieldBuilder() *FieldBuilder

func (*FieldBuilder) AstExpr

func (b *FieldBuilder) AstExpr(v ast.Expr) *FieldBuilder

func (*FieldBuilder) Build

func (b *FieldBuilder) Build() *Field

func (*FieldBuilder) ImpCache

func (b *FieldBuilder) ImpCache(v *cache.ImportCache) *FieldBuilder

func (*FieldBuilder) Name

func (b *FieldBuilder) Name(v string) *FieldBuilder

func (*FieldBuilder) Node

func (*FieldBuilder) ParentImport

func (b *FieldBuilder) ParentImport(v string) *FieldBuilder

type MapType

type MapType struct {
	// contains filtered or unexported fields
}

@Builder(type="pointer")

func (*MapType) DeclaredType

func (m *MapType) DeclaredType() string

func (*MapType) Equal

func (m *MapType) Equal(m1 *MapType) bool

func (*MapType) IsPointer

func (m *MapType) IsPointer() bool

type MapTypeBuilder

type MapTypeBuilder struct {
	// contains filtered or unexported fields
}

func NewMapTypeBuilder

func NewMapTypeBuilder() *MapTypeBuilder

func (*MapTypeBuilder) AstKeyExpr

func (b *MapTypeBuilder) AstKeyExpr(v ast.Expr) *MapTypeBuilder

func (*MapTypeBuilder) AstValueExpr

func (b *MapTypeBuilder) AstValueExpr(v ast.Expr) *MapTypeBuilder

func (*MapTypeBuilder) Build

func (b *MapTypeBuilder) Build() *MapType

func (*MapTypeBuilder) ImpCache

func (*MapTypeBuilder) IsPointer

func (b *MapTypeBuilder) IsPointer(v bool) *MapTypeBuilder

func (*MapTypeBuilder) Node

func (*MapTypeBuilder) ParentImport

func (b *MapTypeBuilder) ParentImport(v string) *MapTypeBuilder

type PrimitiveType

type PrimitiveType struct {
	// contains filtered or unexported fields
}

@Builder(type="pointer")

func (*PrimitiveType) DeclaredType

func (p *PrimitiveType) DeclaredType() string

func (*PrimitiveType) IsPointer

func (p *PrimitiveType) IsPointer() bool

func (*PrimitiveType) Name

func (p *PrimitiveType) Name() string

type PrimitiveTypeBuilder

type PrimitiveTypeBuilder struct {
	// contains filtered or unexported fields
}

func NewPrimitiveTypeBuilder

func NewPrimitiveTypeBuilder() *PrimitiveTypeBuilder

func (*PrimitiveTypeBuilder) Build

func (b *PrimitiveTypeBuilder) Build() *PrimitiveType

func (*PrimitiveTypeBuilder) IsPointer

func (*PrimitiveTypeBuilder) Name

type StructType

type StructType struct {
	// contains filtered or unexported fields
}

@Builder(type="pointer")

func (*StructType) DeclaredType

func (s *StructType) DeclaredType() string

func (*StructType) Equal

func (s *StructType) Equal(s1 *StructType) bool

func (*StructType) Fields

func (s *StructType) Fields() []*Field

func (*StructType) IsPointer

func (s *StructType) IsPointer() bool

type StructTypeBuilder

type StructTypeBuilder struct {
	// contains filtered or unexported fields
}

func NewStructTypeBuilder

func NewStructTypeBuilder() *StructTypeBuilder

func (*StructTypeBuilder) Alias

func (*StructTypeBuilder) AstStruct

func (*StructTypeBuilder) Build

func (b *StructTypeBuilder) Build() *StructType

func (*StructTypeBuilder) Fields

func (b *StructTypeBuilder) Fields(v []*Field) *StructTypeBuilder

func (*StructTypeBuilder) ImpCache

func (*StructTypeBuilder) ImportPath

func (b *StructTypeBuilder) ImportPath(v string) *StructTypeBuilder

func (*StructTypeBuilder) IsPointer

func (b *StructTypeBuilder) IsPointer(v bool) *StructTypeBuilder

func (*StructTypeBuilder) Name

func (*StructTypeBuilder) Node

func (*StructTypeBuilder) ParentImport

func (b *StructTypeBuilder) ParentImport(v string) *StructTypeBuilder

type Type

type Type interface {
	DeclaredType() string
	IsPointer() bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL