golang

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const RUSTY = "github.com/mabels/wueste/entity-generator/src/rusty"
View Source
const WUESTE = "github.com/mabels/wueste/entity-generator/src/wueste"

Variables

View Source
var KeyWords = map[string]bool{
	"break":     true,
	"default":   true,
	"func":      true,
	"interface": true,
	"select":    true,
	"case":      true,
	"defer":     true,
	"go":        true,
	"map":       true,
	"struct":    true,
	"chan":      true,
	"else":      true,

	"goto":        true,
	"package":     true,
	"switch":      true,
	"const":       true,
	"fallthrough": true,
	"if":          true,
	"range":       true,
	"type":        true,
	"continue":    true,
	"for":         true,
	"import":      true,
	"return":      true,
	"var":         true,
	"error":       true,
	"string":      true,
	"bool":        true,
	"uint8":       true,
	"uint16":      true,
	"uint32":      true,
	"uint64":      true,

	"int8":  true,
	"int16": true,
	"int32": true,
	"int64": true,

	"float32": true,
	"float64": true,

	"complex64":  true,
	"complex128": true,

	"byte": true,
	"rune": true,
}

Functions

func FileName

func FileName(fname, suffix string) string

func GoGenerator

func GoGenerator(cfg *eg.Config, schema eg.PropertyObject, writer io.Writer)

func TestFileName

func TestFileName(t *testing.T)

func TestFormatLine

func TestFormatLine(t *testing.T)

func TestGoGenerator

func TestGoGenerator(t *testing.T)

func TestKeyWordFilter

func TestKeyWordFilter(t *testing.T)

func TestPrivateName

func TestPrivateName(t *testing.T)

func TestPublicName

func TestPublicName(t *testing.T)

func TestSimpleTypeBuilder

func TestSimpleTypeBuilder(t *testing.T)

func TestSimpleTypeClazz

func TestSimpleTypeClazz(t *testing.T)

func TestSimpleTypeImpl

func TestSimpleTypeImpl(t *testing.T)

func TestSimpleTypeImplAsMap

func TestSimpleTypeImplAsMap(t *testing.T)

func TestSimpleTypeImplClone

func TestSimpleTypeImplClone(t *testing.T)

func TestSimpleTypeImplHash

func TestSimpleTypeImplHash(t *testing.T)

func TestSimpleTypeImplLess

func TestSimpleTypeImplLess(t *testing.T)

func TestSimpleTypeParam

func TestSimpleTypeParam(t *testing.T)

func TestWriteBlock

func TestWriteBlock(t *testing.T)

func TestWriterWriteLine

func TestWriterWriteLine(t *testing.T)

func TestWriterWriteLineEmpty

func TestWriterWriteLineEmpty(t *testing.T)

Types

type ForIfWhileLang

type ForIfWhileLang struct {
	KeyWords map[string]bool
}

func (*ForIfWhileLang) AsType

func (x *ForIfWhileLang) AsType(p eg.Property) string

func (*ForIfWhileLang) AsTypeOptional

func (x *ForIfWhileLang) AsTypeOptional(p eg.PropertyItem, opts ...string) string

func (*ForIfWhileLang) AsTypePtr

func (x *ForIfWhileLang) AsTypePtr(p eg.Property) string

func (*ForIfWhileLang) KeyWordFilter

func (x *ForIfWhileLang) KeyWordFilter(prefix, name string) string

func (*ForIfWhileLang) Optional

func (x *ForIfWhileLang) Optional(optional bool, typeStr string, opts ...string) string

func (*ForIfWhileLang) PrivateName

func (x *ForIfWhileLang) PrivateName(name string, add ...string) string

func (*ForIfWhileLang) Ptr

func (x *ForIfWhileLang) Ptr(p eg.Property, typeStr string) string

func (*ForIfWhileLang) PublicName

func (x *ForIfWhileLang) PublicName(name string, add ...string) string

type ObjectType

type ObjectType[T any] interface {
	Clone() T
	Equals(other T) bool
	AsMap() map[string]interface{}
}

type SimpleType

type SimpleType struct {
	String          string
	OptionalString  rusty.Optional[string]
	Float64         float64
	OptionalFloat64 rusty.Optional[float64]
	Int64           int64
	OptionalInt64   rusty.Optional[int64]
	Uint64          uint64
	OptionalUint64  rusty.Optional[uint64]
	Bool            bool
	OptionalBool    rusty.Optional[bool]
}

type SimpleTypeObject

type SimpleTypeObject interface {
	String() string
	OptionalString() rusty.Optional[string]
	Float64() float64
	OptionalFloat64() rusty.Optional[float64]
	Int64() int64
	OptionalInt64() rusty.Optional[int64]
	Uint64() uint64
	OptionalUint64() rusty.Optional[uint64]
	Bool() bool
	OptionalBool() rusty.Optional[bool]
}

Jump to

Keyboard shortcuts

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