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