Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionallySet ¶
OptionallySet allows distinguishing between "Missing Field" (Schema Cold Start) and "Zero Value" (Valid Data).
func SetOpt ¶
func SetOpt[T any](value T) OptionallySet[T]
SetOpt is a helper that creates an OptionallySet with IsSet=true.
func UnsetOpt ¶
func UnsetOpt[T any]() OptionallySet[T]
UnsetOpt is a helper that creates an OptionallySet with IsSet=false.
func (OptionallySet[T]) IsZero ¶
func (o OptionallySet[T]) IsZero() bool
func (OptionallySet[T]) MarshalJSON ¶
func (o OptionallySet[T]) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*OptionallySet[T]) UnmarshalJSON ¶
func (o *OptionallySet[T]) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.