Documentation
¶
Index ¶
- type Type
- func (*Type[T]) Enum() []any
- func (t Type[T]) IsNull() bool
- func (t Type[T]) IsSet() bool
- func (t Type[T]) IsZero() bool
- func (*Type[T]) JSONSchema() (jsonschema.Schema, error)
- func (t Type[T]) MarshalJSON() ([]byte, error)
- func (t Type[T]) MustValue() T
- func (t Type[T]) Ptr() *T
- func (t *Type[T]) Set(value T)
- func (t *Type[T]) SetNull()
- func (t *Type[T]) UnmarshalJSON(data []byte) error
- func (t *Type[T]) Unset()
- func (t Type[T]) Value() (T, bool)
- func (t Type[T]) ValueOrDefault(defaultValue T) T
- func (t Type[T]) ValueOrZero() T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type[T any] struct { // contains filtered or unexported fields }
func (*Type[T]) JSONSchema ¶
func (*Type[T]) JSONSchema() (jsonschema.Schema, error)
func (Type[T]) MarshalJSON ¶
MarshalJSON handles JSON serialization
func (*Type[T]) UnmarshalJSON ¶
UnmarshalJSON handles JSON deserialization
func (Type[T]) ValueOrDefault ¶
func (t Type[T]) ValueOrDefault(defaultValue T) T
func (Type[T]) ValueOrZero ¶
func (t Type[T]) ValueOrZero() T
Click to show internal directories.
Click to hide internal directories.