golang

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeString    = "string"
	TypeByteSlice = "[]byte"
	TypeFloat32   = "float32"
	TypeFloat64   = "float64"
	TypeBool      = "bool"
	TypeInt16     = "int16"
	TypeInt64     = "int64"
)
View Source
const (
	TypeSQLNullInt64   = "sql.NullInt64"
	TypeSQLNullInt16   = "sql.NullInt16"
	TypeSQLNullFloat64 = "sql.NullFloat64"
	TypeSQLNullBool    = "sql.NullBool"
	TypeSQLNullString  = "sql.NullString"
	TypeSQLNullTime    = "sql.NullTime"

	TypeTimeTime = "time.Time"
)

Variables

This section is empty.

Functions

func Ptr

func Ptr(t string) string

Types

type File added in v0.3.0

type File struct {
	Name    string
	Package *Package
	Imports *ImportGroups
}

func NewFile added in v0.3.0

func NewFile(name string, pkg *Package) File

func (*File) CallRelativePath added in v0.3.0

func (f *File) CallRelativePath(that File, namePrefix string) string

func (*File) ImportLocal added in v0.3.0

func (f *File) ImportLocal(pkg *Package)

func (*File) ImportShared added in v0.3.0

func (f *File) ImportShared(pkg *Package)

func (*File) ImportStd added in v0.3.0

func (f *File) ImportStd(pkg *Package)

type ImportGroup added in v0.3.0

type ImportGroup struct {
	*ds.Set[string]
}

func (*ImportGroup) SortedList added in v0.3.0

func (g *ImportGroup) SortedList() []string

type ImportGroups added in v0.3.0

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

func NewImportGroups added in v0.3.0

func NewImportGroups() *ImportGroups

func (*ImportGroups) AddLocal added in v0.3.0

func (g *ImportGroups) AddLocal(pkg string)

func (*ImportGroups) AddShared added in v0.3.0

func (g *ImportGroups) AddShared(pkg string)

func (*ImportGroups) AddStd added in v0.3.0

func (g *ImportGroups) AddStd(pkg string)

func (*ImportGroups) Sorted added in v0.3.0

func (g *ImportGroups) Sorted() [][]string

func (*ImportGroups) Valid added in v0.3.0

func (g *ImportGroups) Valid() bool

type ModFile added in v0.3.0

type ModFile struct {
	Module string
}

type ModFinder added in v0.3.0

type ModFinder struct {
}

func NewModFinder added in v0.3.0

func NewModFinder() *ModFinder

func (*ModFinder) FindIn added in v0.3.0

func (f *ModFinder) FindIn(dir *fs.Directory) (*ModFile, error)

type Package added in v0.3.0

type Package struct {
	Name                string
	ProjectRelativePath string
	FullName            string
}

func BuildPackage added in v0.3.0

func BuildPackage(pkgName string, module string) (*Package, error)

func (*Package) CallToStruct added in v0.3.0

func (p *Package) CallToStruct(currentPackage *Package, structName string) string

func (*Package) IsCurrent added in v0.3.0

func (p *Package) IsCurrent(currentPackage *Package) bool

type StringEnum added in v0.3.0

type StringEnum struct {
	Name   *ds.String
	Values []*StringEnumValue
}

func NewStringEnumOfValues added in v0.3.0

func NewStringEnumOfValues(name *ds.String, values []string) *StringEnum

func (*StringEnum) AddNamedValue added in v0.3.0

func (e *StringEnum) AddNamedValue(name string, value string)

func (*StringEnum) AddValue added in v0.3.0

func (e *StringEnum) AddValue(values ...string)

type StringEnumValue added in v0.3.0

type StringEnumValue struct {
	Name  string
	Value string
}

Jump to

Keyboard shortcuts

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