entx

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertEntTypeToGotype

func ConvertEntTypeToGotype(prop string) string

ConvertEntTypeToGotype returns go type from ent type

func ConvertEntTypeToGotypeInSingleApi

func ConvertEntTypeToGotypeInSingleApi(prop string) string

ConvertEntTypeToGotypeInSingleApi returns go type from ent type in single API service

func ConvertEntTypeToProtoType

func ConvertEntTypeToProtoType(typeName string) string

ConvertEntTypeToProtoType returns prototype from ent type

func ConvertIDType

func ConvertIDType(useUUID bool, t string) string

ConvertIDType returns uuid type by uuid flag

func ConvertIdFieldToUpper added in v1.6.33

func ConvertIdFieldToUpper(target string) string

ConvertIdFieldToUpper is used to convert snack format Id to Ent format

func ConvertIdTypeToBaseMessage added in v1.6.29

func ConvertIdTypeToBaseMessage(t string) string

ConvertIdTypeToBaseMessage returns base message name when id type is not uint64 or string.

func ConvertOnlyEntTypeToGoType

func ConvertOnlyEntTypeToGoType(t string) string

ConvertOnlyEntTypeToGoType converts the type that only ent has to go type.

func ConvertProtoTypeToGoType

func ConvertProtoTypeToGoType(typeName string) string

ConvertProtoTypeToGoType returns go type from proto type

func ConvertSpecificNounToUpper

func ConvertSpecificNounToUpper(str string) string

ConvertSpecificNounToUpper is used to convert snack format to Ent format

func IsBaseProperty

func IsBaseProperty(prop string) bool

IsBaseProperty returns true when prop name is id, created_at, updated_at, deleted_at

func IsGoTypeNotPrototype

func IsGoTypeNotPrototype(prop string) bool

IsGoTypeNotPrototype returns true when property type is prototype but not go type

func IsNotIDField added in v1.6.33

func IsNotIDField(field string) bool

IsNotIDField Judge whether the field is not an ID field

func IsOnlyEntType

func IsOnlyEntType(t string) bool

IsOnlyEntType returns true when the type is only in ent schema. e.g. uint8

func IsPageProperty added in v1.6.23

func IsPageProperty(prop string) bool

IsPageProperty returns true when prop name is pageNo, pageSize

func IsTimeProperty

func IsTimeProperty(prop string) bool

IsTimeProperty returns true when the string contains time suffix

func IsUUIDType

func IsUUIDType(prop string) bool

IsUUIDType returns true when prop is Ent's UUID type

func IsUpperProperty

func IsUpperProperty(prop string) bool

IsUpperProperty returns true when the string contains Ent upper string such as uuid, api and id

Types

This section is empty.

Jump to

Keyboard shortcuts

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