consts

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseValue

func ParseValue(rawValue string, dataType DataType, params ...string) (any, error)

func ToString

func ToString(value reflect.Value) string

func UnderlineToCamelCase

func UnderlineToCamelCase(value string, capitalizeFirst bool) string

Types

type DataType

type DataType string
const (
	Unknown DataType = ""
	Bool    DataType = "bool"
	Int     DataType = "int"
	Int8    DataType = "int8"
	Int16   DataType = "int16"
	Int32   DataType = "int32"
	Int64   DataType = "int64"
	Uint    DataType = "uint"
	Uint8   DataType = "uint8"
	Uint16  DataType = "uint16"
	Uint32  DataType = "uint32"
	Uint64  DataType = "uint64"
	Float   DataType = "float"
	Double  DataType = "double"
	String  DataType = "string"
	Array   DataType = "array"
	Array2  DataType = "array2"
	Map     DataType = "map"
)

func ParseDataType

func ParseDataType(typeStr string) (DataType, []string)

type RowType

type RowType string
const (
	NameRow RowType = "__name__"
	TypeRow RowType = "__type__"
	SideRow RowType = "__side__"
	DescRow RowType = "__desc__"
	RuleRow RowType = "__rule__"
)

type RuleType

type RuleType string
const (
	NoRule      RuleType = ""
	KeyRule     RuleType = "key"
	UniqueRule  RuleType = "unique"
	RequireRule RuleType = "require"
	RangeRule   RuleType = "range"
	LengthRule  RuleType = "length"
	DecimalRule RuleType = "decimal"
)

Jump to

Keyboard shortcuts

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