entx

package
v1.6.10-beta Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: GPL-3.0 Imports: 2 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) string

ConvertIDType returns uuid type by uuid flag

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 IsOnlyEntType

func IsOnlyEntType(t string) bool

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

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