types

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidType

func IsValidType(t string) bool

func OptionalQualifier

func OptionalQualifier(goDeps deps.Container) jen.Code

func QualifiersByType

func QualifiersByType(t string, goDeps deps.Container, enumNameType string, enumFromPackage bool) *jen.Statement

QualifiersByType maps a string type to its corresponding qualified identifier using provided dependencies. If t is enum, enumNameType is the type name for this enum Returns a *jen.Statement representing the qualified Go code for the type.

Types

type SupportedType

type SupportedType string
var (
	TypeInt     SupportedType = "int"
	TypeInt8    SupportedType = "int8"
	TypeInt16   SupportedType = "int16"
	TypeInt32   SupportedType = "int32"
	TypeInt64   SupportedType = "int64"
	TypeFloat32 SupportedType = "float32"
	TypeFloat64 SupportedType = "float64"
	TypeString  SupportedType = "string"
	TypeBool    SupportedType = "bool"
	TypeTime    SupportedType = "time"
	TypeDecimal SupportedType = "decimal"
	TypeUuid    SupportedType = "uuid"
	TypeEnum    SupportedType = "enum"

	ValidTypesMap = map[SupportedType]bool{
		TypeInt:     true,
		TypeInt8:    true,
		TypeInt16:   true,
		TypeInt32:   true,
		TypeInt64:   true,
		TypeFloat32: true,
		TypeFloat64: true,
		TypeString:  true,
		TypeBool:    true,
		TypeTime:    true,
		TypeDecimal: true,
		TypeUuid:    true,
		TypeEnum:    true,
	}
)

Jump to

Keyboard shortcuts

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