API.md
April 4, 2020 · View on GitHub
Table of contents
- \Swaggest\GoCodeBuilder\GoCodeBuilder
- \Swaggest\GoCodeBuilder\Import
- \Swaggest\GoCodeBuilder\Exception
- \Swaggest\GoCodeBuilder\JsonSchema\StructHookCallback
- \Swaggest\GoCodeBuilder\JsonSchema\GoBuilderPathToNameHook (interface)
- \Swaggest\GoCodeBuilder\JsonSchema\MarshalEnum
- \Swaggest\GoCodeBuilder\JsonSchema\GeneratedStruct
- \Swaggest\GoCodeBuilder\JsonSchema\Options
- \Swaggest\GoCodeBuilder\JsonSchema\UnmarshalUnion
- \Swaggest\GoCodeBuilder\JsonSchema\TypeBuilder
- \Swaggest\GoCodeBuilder\JsonSchema\StripPrefixPathToNameHook
- \Swaggest\GoCodeBuilder\JsonSchema\GoBuilderStructHook (interface)
- \Swaggest\GoCodeBuilder\JsonSchema\MarshalingTestFunc
- \Swaggest\GoCodeBuilder\JsonSchema\Exception
- \Swaggest\GoCodeBuilder\JsonSchema\GoBuilder
- \Swaggest\GoCodeBuilder\JsonSchema\MarshalJson
- \Swaggest\GoCodeBuilder\JsonSchema\MarshalUnion
- \Swaggest\GoCodeBuilder\Style\Comment
- \Swaggest\GoCodeBuilder\Style\Initialisms
- \Swaggest\GoCodeBuilder\Templates\Imports
- \Swaggest\GoCodeBuilder\Templates\GoTemplate (abstract)
- \Swaggest\GoCodeBuilder\Templates\Code
- \Swaggest\GoCodeBuilder\Templates\GoFile
- \Swaggest\GoCodeBuilder\Templates\Constant\TypeConstBlock
- \Swaggest\GoCodeBuilder\Templates\Func\FuncDef
- \Swaggest\GoCodeBuilder\Templates\Func\FuncIface
- \Swaggest\GoCodeBuilder\Templates\Func\Arguments
- \Swaggest\GoCodeBuilder\Templates\Func\Result
- \Swaggest\GoCodeBuilder\Templates\Func\Argument
- \Swaggest\GoCodeBuilder\Templates\Iface\IfaceDef
- \Swaggest\GoCodeBuilder\Templates\Mapping\Mapping
- \Swaggest\GoCodeBuilder\Templates\Struct\StructDef
- \Swaggest\GoCodeBuilder\Templates\Struct\StructType
- \Swaggest\GoCodeBuilder\Templates\Struct\FluentSetter
- \Swaggest\GoCodeBuilder\Templates\Struct\Tags
- \Swaggest\GoCodeBuilder\Templates\Struct\StructFunctions
- \Swaggest\GoCodeBuilder\Templates\Struct\StructProperty
- \Swaggest\GoCodeBuilder\Templates\Struct\StructFields
- \Swaggest\GoCodeBuilder\Templates\Struct\StructCast
- \Swaggest\GoCodeBuilder\Templates\Struct\StructIface
- \Swaggest\GoCodeBuilder\Templates\Type\NoOmitEmpty (interface)
- \Swaggest\GoCodeBuilder\Templates\Type\AnyType (interface)
- \Swaggest\GoCodeBuilder\Templates\Type\FuncType
- \Swaggest\GoCodeBuilder\Templates\Type\Type
- \Swaggest\GoCodeBuilder\Templates\Type\NamedType (interface)
- \Swaggest\GoCodeBuilder\Templates\Type\Map
- \Swaggest\GoCodeBuilder\Templates\Type\TypeUtil
- \Swaggest\GoCodeBuilder\Templates\Type\Slice
- \Swaggest\GoCodeBuilder\Templates\Type\TypeCast
- \Swaggest\GoCodeBuilder\Templates\Type\TypeCastException
- \Swaggest\GoCodeBuilder\Templates\Type\Pointer
- \Swaggest\GoCodeBuilder\TypeCast\CastRegistry
- \Swaggest\GoCodeBuilder\TypeCast\RegistryMux
- \Swaggest\GoCodeBuilder\TypeCast\Registry (interface)
- \Swaggest\GoCodeBuilder\TypeCast\PropertyCast
- \Swaggest\GoCodeBuilder\TypeCast\CastFunctions (interface)
- \Swaggest\GoCodeBuilder\TypeCast\Time
Class: \Swaggest\GoCodeBuilder\GoCodeBuilder
GoCodeBuilder provides file manager and names processor.
| Visibility | Function |
|---|---|
| public | __construct() : void |
| public | exportableName(mixed requireBase=false) : void |
| public | privateName(mixed $name) : void |
| public | setBuilderVersion(mixed $builderVersion) : void |
| public | storeToDisk(mixed $srcPath) : void |
| protected | toCamelCase(string lowerFirst=false) : string |
This class extends \Swaggest\CodeBuilder\CodeBuilder
Class: \Swaggest\GoCodeBuilder\Import
| Visibility | Function |
|---|---|
| public | __construct(mixed alias=null, mixed $defaultPackageName=null) : void |
| public | getPackage() : string |
| public | getReferencePrefix() : mixed |
Class: \Swaggest\GoCodeBuilder\Exception
| Visibility | Function |
|---|
This class extends \Exception
This class implements \Throwable
Class: \Swaggest\GoCodeBuilder\JsonSchema\StructHookCallback
| Visibility | Function |
|---|---|
| public | __construct(\Closure $closure) : void StructHookCallback constructor. |
| public | process(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef path, mixed $schema) : void |
This class implements \Swaggest\GoCodeBuilder\JsonSchema\GoBuilderStructHook
Interface: \Swaggest\GoCodeBuilder\JsonSchema\GoBuilderPathToNameHook
| Visibility | Function |
|---|---|
| public | pathToName(mixed $path) : void |
Class: \Swaggest\GoCodeBuilder\JsonSchema\MarshalEnum
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Type\Type type</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Type\NamedType](#interface-swaggestgocodebuildertemplatestypenamedtype)</em> <strong>base, array enum</strong>, <em>[\Swaggest\GoCodeBuilder\JsonSchema\GoBuilder](#class-swaggestgocodebuilderjsonschemagobuilder)</em> <strong>builder) : void MarshalEnum constructor. |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\JsonSchema\GeneratedStruct
| Visibility | Function |
|---|
Class: \Swaggest\GoCodeBuilder\JsonSchema\Options
| Visibility | Function |
|---|---|
| public static | setUpProperties(\Swaggest\GoCodeBuilder\JsonSchema\Properties/\Swaggest\GoCodeBuilder\JsonSchema\static ownerSchema) : void |
This class extends \Swaggest\JsonSchema\Structure\ClassStructure
This class implements \Swaggest\JsonSchema\Structure\WithResolvedValue, \Swaggest\JsonSchema\Structure\ObjectItemContract, \Traversable, \Iterator, \JsonSerializable, \ArrayAccess, \Swaggest\JsonSchema\Structure\ClassStructureContract
Class: \Swaggest\GoCodeBuilder\JsonSchema\UnmarshalUnion
| Visibility | Function |
|---|---|
| public | patternVarName(mixed $pattern) : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\JsonSchema\TypeBuilder
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\JsonSchema\Schema path, \Swaggest\GoCodeBuilder\JsonSchema\GoBuilder goBuilder</strong>, <em>\Swaggest\GoCodeBuilder\JsonSchema\StructDef/null/[\Swaggest\GoCodeBuilder\Templates\Struct\StructDef](#class-swaggestgocodebuildertemplatesstructstructdef)</em> <strong>parentStruct=null, bool $isRequired=false) : void TypeBuilder constructor. |
| public | build() : \Swaggest\GoCodeBuilder\Templates\Type\AnyType |
Class: \Swaggest\GoCodeBuilder\JsonSchema\StripPrefixPathToNameHook
| Visibility | Function |
|---|---|
| public | pathToName(mixed $path) : void |
This class implements \Swaggest\GoCodeBuilder\JsonSchema\GoBuilderPathToNameHook
Interface: \Swaggest\GoCodeBuilder\JsonSchema\GoBuilderStructHook
| Visibility | Function |
|---|---|
| public | process(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef path, \Swaggest\GoCodeBuilder\JsonSchema\Schema $schema) : null |
Class: \Swaggest\GoCodeBuilder\JsonSchema\MarshalingTestFunc
| Visibility | Function |
|---|---|
| public static | make(\Swaggest\GoCodeBuilder\JsonSchema\GeneratedStruct struct</strong>, <em>[\Swaggest\GoCodeBuilder\JsonSchema\Options](#class-swaggestgocodebuilderjsonschemaoptions)</em> <strong>options=null) : void |
Class: \Swaggest\GoCodeBuilder\JsonSchema\Exception
| Visibility | Function |
|---|
This class extends \Exception
This class implements \Throwable
Class: \Swaggest\GoCodeBuilder\JsonSchema\GoBuilder
| Visibility | Function |
|---|---|
| public | __construct() : void |
| public | getClass(\Swaggest\GoCodeBuilder\JsonSchema\Schema path) : \Swaggest\GoCodeBuilder\Templates\Struct\StructDef |
| public | getCode() : mixed |
| public | getGeneratedStruct(\Swaggest\GoCodeBuilder\JsonSchema\Schema path) : mixed/\Swaggest\GoCodeBuilder\JsonSchema\GeneratedStruct |
| public | getGeneratedStructs() : \Swaggest\GoCodeBuilder\JsonSchema\GeneratedStruct[] |
| public | getType(\Swaggest\GoCodeBuilder\JsonSchema\Schema path='#', \Swaggest\GoCodeBuilder\JsonSchema\StructDef/null/\Swaggest\GoCodeBuilder\Templates\Struct\StructDef isRequired=false) : \Swaggest\GoCodeBuilder\Templates\Type\AnyType |
| public | pathToName(mixed $path) : void |
Class: \Swaggest\GoCodeBuilder\JsonSchema\MarshalJson
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\JsonSchema\GoBuilder builder</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Struct\StructDef](#class-swaggestgocodebuildertemplatesstructstructdef)</em> <strong>type) : void |
| public | addNamedProperty(mixed $name) : void |
| public | addPatternProperty(string regex</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Struct\StructProperty](#class-swaggestgocodebuildertemplatesstructstructproperty)</em> <strong>structProperty) : \Swaggest\GoCodeBuilder\JsonSchema$this |
| public | addSomeOf(mixed name) : void |
| public | enableAdditionalProperties(\Swaggest\GoCodeBuilder\Templates\Struct\StructProperty $structProperty) : void |
| public | forbidAdditionalProperties() : void |
| public | isAdditionalPropertiesEnabled() : bool |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\JsonSchema\MarshalUnion
| Visibility | Function |
|---|---|
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Style\Comment
| Visibility | Function |
|---|---|
| public static | sentence(mixed $s) : void |
Class: \Swaggest\GoCodeBuilder\Style\Initialisms
| Visibility | Function |
|---|---|
| public | __construct() : void |
| public | process(mixed $goName) : void |
Class: \Swaggest\GoCodeBuilder\Templates\Imports
| Visibility | Function |
|---|---|
| public | add(\Swaggest\GoCodeBuilder\Import import</strong>)</strong> : <em>\Swaggest\GoCodeBuilder\Templates\this |
| public | addByName(mixed alias=null) : void |
| public | demand() : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\GoTemplate (abstract)
| Visibility | Function |
|---|---|
| public | escapeValue(mixed $value) : void |
| public | getComment() : string |
| public | ifThenElse(mixed then, string $else='') : void |
| public | padLines(mixed text, bool forcePad=false) : void |
| public | setComment(mixed $comment) : void |
| public | stripEmptyLines(mixed $text) : void |
| public | tabIndents(mixed spaces=4) : void |
| public | trim(mixed $s) : void |
| protected | renderComment() : void |
This class extends \Swaggest\CodeBuilder\AbstractTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Code
| Visibility | Function |
|---|---|
| public | __construct(mixed $body=null) : void |
| public | addSnippet(mixed prepend=false, mixed $uniqueKey=null) : void |
| public | imports() : \Swaggest\GoCodeBuilder\Templates\Imports |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\GoFile
| Visibility | Function |
|---|---|
| public | __construct(string importPath=null) : void GoFile constructor. |
| public | commitTransaction() : void |
| public | dropTransaction(bool $ignoreMissing=true) : void |
| public | getCode() : \Swaggest\GoCodeBuilder\Templates\Code |
| public | getComment() : mixed |
| public static | getCurrentGoFile() : mixed |
| public | getImportPath() : null |
| public | getImports() : \Swaggest\GoCodeBuilder\Templates\Imports |
| public | getPackage() : mixed |
| public | setCode(\Swaggest\GoCodeBuilder\Templates\Code $code) : \Swaggest\GoCodeBuilder\Templates\GoFile |
| public static | setCurrentGoFile(\Swaggest\GoCodeBuilder\Templates\GoFile $currentGoFile=null) : \Swaggest\GoCodeBuilder\Templates\GoFile/null previous go file |
| public | setDependentCode(mixed value) : void |
| public | setImportPath(null $importPath) : \Swaggest\GoCodeBuilder\Templates\GoFile |
| public | setPackage(mixed $package) : \Swaggest\GoCodeBuilder\Templates\GoFile |
| public | setSkipImportComment(boolean $skipImportComment) : \Swaggest\GoCodeBuilder\Templates\GoFile |
| public | startTransaction() : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Constant\TypeConstBlock
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Type\Type $type) : void |
| public | addValue(mixed value, mixed $comment=null) : void |
| public | getValues() : mixed |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Func\FuncDef
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Func\FuncIface
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Func\FuncDef $funcDef) : void FuncIface constructor. |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Func\Arguments
| Visibility | Function |
|---|---|
| public | add(mixed name</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Type\AnyType](#interface-swaggestgocodebuildertemplatestypeanytype)</em> <strong>type, bool $isVariadic=false) : void |
| public | count() : void |
| public | toTypesString() : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Func\Result
| Visibility | Function |
|---|---|
| public | toTypesString() : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\Func\Arguments
Class: \Swaggest\GoCodeBuilder\Templates\Func\Argument
| Visibility | Function |
|---|---|
| public | __construct(string name</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Type\AnyType](#interface-swaggestgocodebuildertemplatestypeanytype)</em> <strong>type, bool $isVariadic=false) : void Argument constructor. |
| public | getType() : mixed |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Iface\IfaceDef
| Visibility | Function |
|---|---|
| public | __construct(mixed comment=null) : void |
| public | addFunc(\Swaggest\GoCodeBuilder\Templates\Func\FuncDef prepend=false) : void |
| public | addType(\Swaggest\GoCodeBuilder\Templates\Type\Type prepend=false) : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Mapping\Mapping
| Visibility | Function |
|---|
Class: \Swaggest\GoCodeBuilder\Templates\Struct\StructDef
| Visibility | Function |
|---|---|
| public | __construct(string comment='') : voidStructDef constructor. |
| public | addFunc(\Swaggest\GoCodeBuilder\Templates\Func\FuncDef prepend=false) : void |
| public | addProperty(\Swaggest\GoCodeBuilder\Templates\Struct\StructProperty prepend=false) : void |
| public | getCode() : mixed |
| public | getFuncs() : \Swaggest\GoCodeBuilder\Templates\Func\FuncDef[] |
| public | getImport() : \Swaggest\GoCodeBuilder\Templates\Struct\Import/null |
| public | getName() : mixed |
| public | getProperties() : \Swaggest\GoCodeBuilder\Templates\Struct\StructProperty[] |
| public | getType() : \Swaggest\GoCodeBuilder\Templates\Struct\StructType |
| public | renderFields() : void |
| public | renderFuncs() : void |
| public | setImport(\Swaggest\GoCodeBuilder\Import $import=null) : \Swaggest\GoCodeBuilder\Templates\Struct\StructDef |
| public | setName(mixed $name) : \Swaggest\GoCodeBuilder\Templates\Struct\StructDef |
| public | setType(\Swaggest\GoCodeBuilder\Templates\Type\Type $type) : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Struct\StructType
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef $structDef) : void StructType constructor. |
| public | getName() : mixed |
| public | getTypeString() : mixed |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
This class implements \Swaggest\GoCodeBuilder\Templates\Type\NamedType, \Swaggest\GoCodeBuilder\Templates\Type\AnyType
Class: \Swaggest\GoCodeBuilder\Templates\Struct\FluentSetter
| Visibility | Function |
|---|---|
| public static | addToStruct(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef structDef</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Struct\StructProperty](#class-swaggestgocodebuildertemplatesstructstructproperty)</em> <strong>goProperty) : void |
| public static | make(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef structDef</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Struct\StructProperty](#class-swaggestgocodebuildertemplatesstructstructproperty)</em> <strong>goProperty) : void |
| public static | makeMap(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef structDef</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Struct\StructProperty](#class-swaggestgocodebuildertemplatesstructstructproperty)</em> <strong>goProperty) : void |
Class: \Swaggest\GoCodeBuilder\Templates\Struct\Tags
| Visibility | Function |
|---|---|
| public | setTag(mixed value) : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Struct\StructFunctions
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef $struct) : void StructFunctions constructor. |
| protected | toString() : void |
This class extends \Swaggest\CodeBuilder\AbstractTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Struct\StructProperty
| Visibility | Function |
|---|---|
| public | __construct(mixed name</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Type\AnyType](#interface-swaggestgocodebuildertemplatestypeanytype)</em> <strong>type, \Swaggest\GoCodeBuilder\Templates\Struct\Tags $tags=null) : void |
| public | getName() : string/null |
| public | getTags() : \Swaggest\GoCodeBuilder\Templates\Struct\Tags |
| public | getType() : \Swaggest\GoCodeBuilder\Templates\Type\AnyType |
| public | setType(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Struct\StructFields
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef $struct) : void StructType constructor. |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Struct\StructCast
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef baseStruct</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Struct\StructDef](#class-swaggestgocodebuildertemplatesstructstructdef)</em> <strong>derivedStruct, array/string[] propNamesMap=array()</strong>, <em>[\Swaggest\GoCodeBuilder\TypeCast\Registry](#interface-swaggestgocodebuildertypecastregistry)</em> <strong>registry=null) : void StructCast constructor. |
| public | getBaseStruct() : \Swaggest\GoCodeBuilder\Templates\Struct\StructDef |
| public | getBaseTypeString() : string |
| public | getDerivedStruct() : \Swaggest\GoCodeBuilder\Templates\Struct\StructDef |
| public | getDerivedTypeString() : string |
| public | getLoadFrom() : mixed |
| public | getMapTo() : mixed |
| public | setPropMap(mixed derivedName) : void |
This class implements \Swaggest\GoCodeBuilder\TypeCast\CastFunctions
Class: \Swaggest\GoCodeBuilder\Templates\Struct\StructIface
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef name, string $comment='') : void |
| public | getIface() : mixed |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Interface: \Swaggest\GoCodeBuilder\Templates\Type\NoOmitEmpty
| Visibility | Function |
|---|---|
| public | isNoOmitEmpty() : bool |
Interface: \Swaggest\GoCodeBuilder\Templates\Type\AnyType
| Visibility | Function |
|---|---|
| public | getTypeString() : mixed |
| public | render() : void |
Class: \Swaggest\GoCodeBuilder\Templates\Type\FuncType
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Func\FuncDef $func) : void |
| public | getTypeString() : mixed |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
This class implements \Swaggest\GoCodeBuilder\Templates\Type\AnyType
Class: \Swaggest\GoCodeBuilder\Templates\Type\Type
| Visibility | Function |
|---|---|
| public | __construct(mixed type</strong>, <em>[\Swaggest\GoCodeBuilder\Import](#class-swaggestgocodebuilderimport)</em> <strong>import=null) : void |
| public | equals(\Swaggest\GoCodeBuilder\Templates\Type\Type $type) : void |
| public | getImport() : \Swaggest\GoCodeBuilder\Templates\Type\Import/null |
| public | getName() : mixed |
| public | getTypeString() : mixed |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
This class implements \Swaggest\GoCodeBuilder\Templates\Type\NamedType, \Swaggest\GoCodeBuilder\Templates\Type\AnyType
Interface: \Swaggest\GoCodeBuilder\Templates\Type\NamedType
| Visibility | Function |
|---|---|
| public | getName() : string |
This class implements \Swaggest\GoCodeBuilder\Templates\Type\AnyType
Class: \Swaggest\GoCodeBuilder\Templates\Type\Map
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Type\AnyType keyType</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Type\AnyType](#interface-swaggestgocodebuildertemplatestypeanytype)</em> <strong>valueType) : void Map constructor. |
| public | getKeyType() : \Swaggest\GoCodeBuilder\Templates\Type\AnyType |
| public | getTypeString() : mixed |
| public | getValueType() : \Swaggest\GoCodeBuilder\Templates\Type\AnyType |
| public | renderName() : void |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
This class implements \Swaggest\GoCodeBuilder\Templates\Type\AnyType
Class: \Swaggest\GoCodeBuilder\Templates\Type\TypeUtil
| Visibility | Function |
|---|---|
| public static | equals(\Swaggest\GoCodeBuilder\Templates\Type\AnyType one</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Type\AnyType](#interface-swaggestgocodebuildertemplatestypeanytype)</em> <strong>two) : void |
| public static | fromString(string $typeString) : \Swaggest\GoCodeBuilder\Templates\Type\AnyType/\Swaggest\GoCodeBuilder\Templates\Type\Type |
| public static | getBasicType(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : mixed |
| public static | isCastable(\Swaggest\GoCodeBuilder\Templates\Type\AnyType to</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Type\AnyType](#interface-swaggestgocodebuildertemplatestypeanytype)</em> <strong>from) : bool |
| public static | isFloat(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : bool |
| public static | isInt(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : bool |
| public static | isNumber(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : bool |
| public static | resolvePointer(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : void |
Class: \Swaggest\GoCodeBuilder\Templates\Type\Slice
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : void Slice constructor. |
| public | getType() : \Swaggest\GoCodeBuilder\Templates\Type\AnyType |
| public | getTypeString() : mixed |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
This class implements \Swaggest\GoCodeBuilder\Templates\Type\AnyType
Class: \Swaggest\GoCodeBuilder\Templates\Type\TypeCast
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Type\AnyType toType</strong>, <em>[\Swaggest\GoCodeBuilder\Templates\Type\AnyType](#interface-swaggestgocodebuildertemplatestypeanytype)</em> <strong>fromType, string fromVarName, \Swaggest\GoCodeBuilder\TypeCast\Registry $registry=null) : void TypeCast constructor. |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
Class: \Swaggest\GoCodeBuilder\Templates\Type\TypeCastException
| Visibility | Function |
|---|
This class extends \Exception
This class implements \Throwable
Class: \Swaggest\GoCodeBuilder\Templates\Type\Pointer
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : void Pointer constructor. |
| public | getType() : \Swaggest\GoCodeBuilder\Templates\Type\AnyType |
| public | getTypeString() : mixed |
| public | isNoOmitEmpty() : bool |
| public | setNoOmitEmpty(bool $noOmitEmpty) : void |
| public static | tryDereferenceOnce(\Swaggest\GoCodeBuilder\Templates\Type\AnyType $type) : \Swaggest\GoCodeBuilder\Templates\Type\AnyType |
| protected | toString() : void |
This class extends \Swaggest\GoCodeBuilder\Templates\GoTemplate
This class implements \Swaggest\GoCodeBuilder\Templates\Type\AnyType, \Swaggest\GoCodeBuilder\Templates\Type\NoOmitEmpty
Class: \Swaggest\GoCodeBuilder\TypeCast\CastRegistry
| Visibility | Function |
|---|---|
| public | addStructCast(\Swaggest\GoCodeBuilder\TypeCast\CastFunctions $cast) : void |
| public | canProcess(string fromTypeString) : bool |
| public | process(string fromTypeString, string fromVarName, string $assignOp) : string |
| public | resetUsedCastFuncs() : \Swaggest\GoCodeBuilder\Templates\Func\FuncDef[] |
This class implements \Swaggest\GoCodeBuilder\TypeCast\Registry
Class: \Swaggest\GoCodeBuilder\TypeCast\RegistryMux
| Visibility | Function |
|---|---|
| public | addRegistry(\Swaggest\GoCodeBuilder\TypeCast\Registry $registry) : void |
| public | canProcess(string fromTypeString) : bool |
| public static | getStd() : \Swaggest\GoCodeBuilder\TypeCast\static |
| public | process(string fromTypeString, string fromVarName, string $assignOp) : \Swaggest\GoCodeBuilder\TypeCast\Code/string |
This class implements \Swaggest\GoCodeBuilder\TypeCast\Registry
Interface: \Swaggest\GoCodeBuilder\TypeCast\Registry
| Visibility | Function |
|---|---|
| public | canProcess(string fromTypeString) : bool |
| public | process(string fromTypeString, string fromVarName, string $assignOp) : \Swaggest\GoCodeBuilder\TypeCast\Code/string |
Class: \Swaggest\GoCodeBuilder\TypeCast\PropertyCast
| Visibility | Function |
|---|---|
| public | __construct(\Swaggest\GoCodeBuilder\Templates\Struct\StructDef propertyName, \Swaggest\GoCodeBuilder\Templates\Type\AnyType derivedType</strong>, <em>[\Swaggest\GoCodeBuilder\TypeCast\Registry](#interface-swaggestgocodebuildertypecastregistry)</em> <strong>typeRegistry) : void PropertyCast constructor. |
| public | getBaseTypeString() : string |
| public | getDerivedTypeString() : string |
| public | getLoadFrom() : mixed |
| public | getMapTo() : mixed |
This class implements \Swaggest\GoCodeBuilder\TypeCast\CastFunctions
Interface: \Swaggest\GoCodeBuilder\TypeCast\CastFunctions
| Visibility | Function |
|---|---|
| public | getBaseTypeString() : string |
| public | getDerivedTypeString() : string |
| public | getLoadFrom() : \Swaggest\GoCodeBuilder\Templates\Func\FuncDef |
| public | getMapTo() : \Swaggest\GoCodeBuilder\Templates\Func\FuncDef |
Class: \Swaggest\GoCodeBuilder\TypeCast\Time
| Visibility | Function |
|---|---|
| public | canProcess(string fromTypeString) : bool |
| public | process(string fromTypeString, string fromVarName, string $assignOp) : \Swaggest\GoCodeBuilder\TypeCast\Code/string |
This class implements \Swaggest\GoCodeBuilder\TypeCast\Registry