Documentation ¶
Index ¶
- func GetAny[T any](i Value) (T, bool, error)
- func GetBool(i Value) (bool, bool, error)
- func GetDuration(i Value) (time.Duration, bool, error)
- func GetFloat32(i Value) (float32, bool, error)
- func GetFloat64(i Value) (float64, bool, error)
- func GetInt(i Value) (int, bool, error)
- func GetInt16(i Value) (int16, bool, error)
- func GetInt32(i Value) (int32, bool, error)
- func GetInt64(i Value) (int64, bool, error)
- func GetInt8(i Value) (int8, bool, error)
- func GetMap[T any](i Value) (map[string]T, bool, error)
- func GetNumber(i Value) (any, bool, error)
- func GetObject[T any](i Value) (T, bool, error)
- func GetSlice[T any](i Value) ([]T, bool, error)
- func GetString(i Value) (string, bool, error)
- func GetUint(i Value) (uint, bool, error)
- func GetUint16(i Value) (uint16, bool, error)
- func GetUint32(i Value) (uint32, bool, error)
- func GetUint64(i Value) (uint64, bool, error)
- func GetUint8(i Value) (uint8, bool, error)
- func ValuesField(name string) *otherBuilder
- type Value
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAny ¶
GetAny returns the underlay value as the given generic type, if not found or parse error, returns false.
func GetMap ¶
GetMap returns the underlay value as a string map with the given generic type, if not found or parse error, returns false.
func GetObject ¶
GetObject returns the underlay value as a T object with the given generic type, if not found or parse error, returns false.
func GetSlice ¶
GetSlice returns the underlay value as a slice with the given generic type, if not found or parse error, returns false.
func ValuesField ¶
func ValuesField(name string) *otherBuilder
ValuesField returns a new ent.Field with type Values.
Types ¶
type Values ¶
Values holds the Value collection in map, the key of map is the name of Property, stores into json.
func (Values) ValidateWith ¶
ValidateWith validates the property value with the given schemas.