Documentation ¶
Index ¶
- Constants
- Variables
- func IsEmpty[T any](val *[]T) bool
- func IsNull[T any](val *[]T) bool
- func IsUndefined[T any](val *[]T) bool
- func MarshalFieldsJSON(v any) ([]byte, error)
- func ParseUnixSec(v int64) time.Time
- func UnmarshalEsTime(data []byte, strParser StrParser, numParser NumParser, typeNames ...string) (time.Time, error)
- func UnwrapValue[T any](val *[]T) []T
- type AggregateMetricDouble
- type AggregateMetricDoubleMax
- type AggregateMetricDoubleMaxSum
- type AggregateMetricDoubleMaxSumValueCount
- type AggregateMetricDoubleMaxValueCount
- type AggregateMetricDoubleMin
- type AggregateMetricDoubleMinMax
- type AggregateMetricDoubleMinMaxSum
- type AggregateMetricDoubleMinMaxValueCount
- type AggregateMetricDoubleMinSum
- type AggregateMetricDoubleMinSumValueCount
- type AggregateMetricDoubleMinValueCount
- type AggregateMetricDoubleSum
- type AggregateMetricDoubleSumValueCount
- type AggregateMetricDoubleValueCount
- type BasicDate
- type BasicDateTime
- type BasicDateTimeNoMillis
- type BasicOrdinalDate
- type BasicOrdinalDateTime
- type BasicOrdinalDateTimeNoMillis
- type BasicTTime
- type BasicTTimeNoMillis
- type BasicTime
- type BasicTimeNoMillis
- type BasicWeekDate
- type BasicWeekDateTime
- type BasicWeekDateTimeNoMillis
- type Boolean
- type BooleanStr
- type Date
- type DateHour
- type DateHourMinute
- type DateHourMinuteSecond
- type DateHourMinuteSecondFraction
- type DateHourMinuteSecondMillis
- type DateOptionalTime
- type DateTime
- type DateTimeNoMillis
- type EpochMillis
- type EpochSecond
- type Field
- func MapField[T, U any](field Field[T], mapper func(v T) U) Field[U]
- func NewField[T any](v *[]T) Field[T]
- func NewFieldNull[T any]() Field[T]
- func NewFieldSinglePointer[T any](v *T, nilIsNull bool) Field[T]
- func NewFieldSingleValue[T any](v T) Field[T]
- func NewFieldSlice[T any](v []T, nilIsNull bool) Field[T]
- func NewFieldUnsafe[T any](v *[]T) Field[T]
- func (f Field[T]) IsEmpty() bool
- func (f Field[T]) IsNull() bool
- func (f Field[T]) IsUndefined() bool
- func (f Field[T]) MarshalJSON() ([]byte, error)
- func (f *Field[T]) SetEmpty()
- func (f *Field[T]) SetNull()
- func (f *Field[T]) SetSingleValue(value T)
- func (f *Field[T]) SetUndefined()
- func (f *Field[T]) SetValue(value []T)
- func (b *Field[T]) UnmarshalJSON(data []byte) error
- func (f Field[T]) Unwrap() []T
- func (f Field[T]) UnwrapSingle() T
- func (f Field[T]) Value() *[]T
- func (f Field[T]) ValueAny(single bool) any
- func (f Field[T]) ValueSingle() *T
- func (f Field[T]) ValueSingleZero() T
- func (f Field[T]) ValueZero() []T
- type Geopoint
- type Geoshape
- type Hour
- type HourMinute
- type HourMinuteSecond
- type HourMinuteSecondFraction
- type HourMinuteSecondMillis
- type InvalidTypeError
- type NumParser
- type OrdinalDate
- type OrdinalDateTime
- type OrdinalDateTimeNoMillis
- type StrParser
- type StrictBasicWeekDate
- type StrictBasicWeekDateTime
- type StrictBasicWeekDateTimeNoMillis
- type StrictDate
- type StrictDateHour
- type StrictDateHourMinute
- type StrictDateHourMinuteSecond
- type StrictDateHourMinuteSecondFraction
- type StrictDateHourMinuteSecondMillis
- type StrictDateOptionalTime
- type StrictDateOptionalTimeEpochMillis
- type StrictDateOptionalTimeNanos
- type StrictDateOptionalTimeNanosEpochMillis
- type StrictDateTime
- type StrictDateTimeNoMillis
- type StrictHour
- type StrictHourMinute
- type StrictHourMinuteSecond
- type StrictHourMinuteSecondFraction
- type StrictHourMinuteSecondMillis
- type StrictOrdinalDate
- type StrictOrdinalDateTime
- type StrictOrdinalDateTimeNoMillis
- type StrictTTime
- type StrictTTimeNoMillis
- type StrictTime
- type StrictTimeNoMillis
- type StrictYear
- type StrictYearMonth
- type StrictYearMonthDay
- type TTime
- type TTimeNoMillis
- type Time
- type TimeNoMillis
- type UninstantiatedField
- type Year
- type YearMonth
- type YearMonthDay
Constants ¶
const ( StructTag = "esjson" // If a struct fields has this tag set (as `esjson:"single"`), // it will always marshal into single value, even if the field has many values. TagSingle = "single" )
Variables ¶
var ErrIncorrectType = errors.New("incorrect")
Functions ¶
func IsEmpty ¶
IsEmpty determines if f would be treated as null in Elasticsearch. In its search context, null field is one of null, undefined (nonexistent), or an empty array.
func IsUndefined ¶
func MarshalFieldsJSON ¶
MarshalFieldsJSON encodes v into JSON. Some or all fields of v are expected to be Field[T any]. There's no point using this function if v has no Field[T], only being a bit more expensive.
It outputs `null` for null Field, skips for an undefined Field.
v must:
- be a struct type
- have no unexported fields
If v:
- is not struct, returns ErrIncorrectType.
- has any unexported field, then its behavior is undefined.
MarshalFieldsJSON retrieves underlying values of Field type by calling ValueAny. Then value will be unmarshalled with json.Unmarshal. If unmarshalling returns err, then MarshalFieldsJSON returns the error.
func ParseUnixSec ¶
func UnmarshalEsTime ¶
func UnwrapValue ¶
func UnwrapValue[T any](val *[]T) []T
Types ¶
type AggregateMetricDouble ¶
type AggregateMetricDoubleMax ¶
type AggregateMetricDoubleMax struct {
Max float64 `json:"max"`
}
type AggregateMetricDoubleMin ¶
type AggregateMetricDoubleMin struct {
Min float64 `json:"min"`
}
type AggregateMetricDoubleSum ¶
type AggregateMetricDoubleSum struct {
Sum float64 `json:"sum"`
}
type AggregateMetricDoubleValueCount ¶
type AggregateMetricDoubleValueCount struct {
ValueCount uint64 `json:"value_count"`
}
type BasicDateTime ¶
func (BasicDateTime) MarshalJSON ¶
func (t BasicDateTime) MarshalJSON() ([]byte, error)
func (BasicDateTime) String ¶
func (t BasicDateTime) String() string
func (*BasicDateTime) UnmarshalJSON ¶
func (t *BasicDateTime) UnmarshalJSON(data []byte) error
type BasicDateTimeNoMillis ¶
func (BasicDateTimeNoMillis) MarshalJSON ¶
func (t BasicDateTimeNoMillis) MarshalJSON() ([]byte, error)
func (BasicDateTimeNoMillis) String ¶
func (t BasicDateTimeNoMillis) String() string
func (*BasicDateTimeNoMillis) UnmarshalJSON ¶
func (t *BasicDateTimeNoMillis) UnmarshalJSON(data []byte) error
type BasicOrdinalDate ¶
func (BasicOrdinalDate) MarshalJSON ¶
func (t BasicOrdinalDate) MarshalJSON() ([]byte, error)
func (BasicOrdinalDate) String ¶
func (t BasicOrdinalDate) String() string
func (*BasicOrdinalDate) UnmarshalJSON ¶
func (t *BasicOrdinalDate) UnmarshalJSON(data []byte) error
type BasicOrdinalDateTime ¶
func (BasicOrdinalDateTime) MarshalJSON ¶
func (t BasicOrdinalDateTime) MarshalJSON() ([]byte, error)
func (BasicOrdinalDateTime) String ¶
func (t BasicOrdinalDateTime) String() string
func (*BasicOrdinalDateTime) UnmarshalJSON ¶
func (t *BasicOrdinalDateTime) UnmarshalJSON(data []byte) error
type BasicOrdinalDateTimeNoMillis ¶
func (BasicOrdinalDateTimeNoMillis) MarshalJSON ¶
func (t BasicOrdinalDateTimeNoMillis) MarshalJSON() ([]byte, error)
func (BasicOrdinalDateTimeNoMillis) String ¶
func (t BasicOrdinalDateTimeNoMillis) String() string
func (*BasicOrdinalDateTimeNoMillis) UnmarshalJSON ¶
func (t *BasicOrdinalDateTimeNoMillis) UnmarshalJSON(data []byte) error
type BasicTTime ¶
func (BasicTTime) MarshalJSON ¶
func (t BasicTTime) MarshalJSON() ([]byte, error)
func (BasicTTime) String ¶
func (t BasicTTime) String() string
func (*BasicTTime) UnmarshalJSON ¶
func (t *BasicTTime) UnmarshalJSON(data []byte) error
type BasicTTimeNoMillis ¶
func (BasicTTimeNoMillis) MarshalJSON ¶
func (t BasicTTimeNoMillis) MarshalJSON() ([]byte, error)
func (BasicTTimeNoMillis) String ¶
func (t BasicTTimeNoMillis) String() string
func (*BasicTTimeNoMillis) UnmarshalJSON ¶
func (t *BasicTTimeNoMillis) UnmarshalJSON(data []byte) error
type BasicTimeNoMillis ¶
func (BasicTimeNoMillis) MarshalJSON ¶
func (t BasicTimeNoMillis) MarshalJSON() ([]byte, error)
func (BasicTimeNoMillis) String ¶
func (t BasicTimeNoMillis) String() string
func (*BasicTimeNoMillis) UnmarshalJSON ¶
func (t *BasicTimeNoMillis) UnmarshalJSON(data []byte) error
type BasicWeekDate ¶
func (BasicWeekDate) MarshalJSON ¶
func (t BasicWeekDate) MarshalJSON() ([]byte, error)
func (BasicWeekDate) String ¶
func (t BasicWeekDate) String() string
func (*BasicWeekDate) UnmarshalJSON ¶
func (t *BasicWeekDate) UnmarshalJSON(data []byte) error
type BasicWeekDateTime ¶
func (BasicWeekDateTime) MarshalJSON ¶
func (t BasicWeekDateTime) MarshalJSON() ([]byte, error)
func (BasicWeekDateTime) String ¶
func (t BasicWeekDateTime) String() string
func (*BasicWeekDateTime) UnmarshalJSON ¶
func (t *BasicWeekDateTime) UnmarshalJSON(data []byte) error
type BasicWeekDateTimeNoMillis ¶
func (BasicWeekDateTimeNoMillis) MarshalJSON ¶
func (t BasicWeekDateTimeNoMillis) MarshalJSON() ([]byte, error)
func (BasicWeekDateTimeNoMillis) String ¶
func (t BasicWeekDateTimeNoMillis) String() string
func (*BasicWeekDateTimeNoMillis) UnmarshalJSON ¶
func (t *BasicWeekDateTimeNoMillis) UnmarshalJSON(data []byte) error
type Boolean ¶
type Boolean bool
Boolean is elastic boolean type. It can be unmarshalled from boolean literal or string literal of "true" / "false" or "" (empty string). see: https://www.elastic.co/guide/en/elasticsearch/reference/8.4/boolean.html
It marshals into boolean literal.
func (Boolean) MarshalJSON ¶
MarshalJSON marshals this type into byte slice representing JSON boolean literal, true or false.
func (*Boolean) UnmarshalJSON ¶
type BooleanStr ¶
type BooleanStr bool
BooleanStr is elastic boolean type. It can be unmarshalled from boolean literal of string literal of "true" / "false" or "" (empty string). see: https://www.elastic.co/guide/en/elasticsearch/reference/8.4/boolean.html
It marshals into string literal, "true" or "false".
func (BooleanStr) MarshalJSON ¶
func (b BooleanStr) MarshalJSON() ([]byte, error)
MarshalJSON marshals this type into byte slice representing JSON string literal, "true" or "false". This never converts to an empty string.
func (BooleanStr) String ¶
func (b BooleanStr) String() string
func (*BooleanStr) UnmarshalJSON ¶
func (b *BooleanStr) UnmarshalJSON(data []byte) error
type DateHourMinute ¶
func (DateHourMinute) MarshalJSON ¶
func (t DateHourMinute) MarshalJSON() ([]byte, error)
func (DateHourMinute) String ¶
func (t DateHourMinute) String() string
func (*DateHourMinute) UnmarshalJSON ¶
func (t *DateHourMinute) UnmarshalJSON(data []byte) error
type DateHourMinuteSecond ¶
func (DateHourMinuteSecond) MarshalJSON ¶
func (t DateHourMinuteSecond) MarshalJSON() ([]byte, error)
func (DateHourMinuteSecond) String ¶
func (t DateHourMinuteSecond) String() string
func (*DateHourMinuteSecond) UnmarshalJSON ¶
func (t *DateHourMinuteSecond) UnmarshalJSON(data []byte) error
type DateHourMinuteSecondFraction ¶
func (DateHourMinuteSecondFraction) MarshalJSON ¶
func (t DateHourMinuteSecondFraction) MarshalJSON() ([]byte, error)
func (DateHourMinuteSecondFraction) String ¶
func (t DateHourMinuteSecondFraction) String() string
func (*DateHourMinuteSecondFraction) UnmarshalJSON ¶
func (t *DateHourMinuteSecondFraction) UnmarshalJSON(data []byte) error
type DateHourMinuteSecondMillis ¶
func (DateHourMinuteSecondMillis) MarshalJSON ¶
func (t DateHourMinuteSecondMillis) MarshalJSON() ([]byte, error)
func (DateHourMinuteSecondMillis) String ¶
func (t DateHourMinuteSecondMillis) String() string
func (*DateHourMinuteSecondMillis) UnmarshalJSON ¶
func (t *DateHourMinuteSecondMillis) UnmarshalJSON(data []byte) error
type DateOptionalTime ¶
func (DateOptionalTime) MarshalJSON ¶
func (t DateOptionalTime) MarshalJSON() ([]byte, error)
func (DateOptionalTime) String ¶
func (t DateOptionalTime) String() string
func (*DateOptionalTime) UnmarshalJSON ¶
func (t *DateOptionalTime) UnmarshalJSON(data []byte) error
type DateTimeNoMillis ¶
func (DateTimeNoMillis) MarshalJSON ¶
func (t DateTimeNoMillis) MarshalJSON() ([]byte, error)
func (DateTimeNoMillis) String ¶
func (t DateTimeNoMillis) String() string
func (*DateTimeNoMillis) UnmarshalJSON ¶
func (t *DateTimeNoMillis) UnmarshalJSON(data []byte) error
type EpochMillis ¶
func (EpochMillis) MarshalJSON ¶
func (t EpochMillis) MarshalJSON() ([]byte, error)
func (EpochMillis) String ¶
func (t EpochMillis) String() string
func (*EpochMillis) UnmarshalJSON ¶
func (t *EpochMillis) UnmarshalJSON(data []byte) error
type EpochSecond ¶
func (EpochSecond) MarshalJSON ¶
func (t EpochSecond) MarshalJSON() ([]byte, error)
func (EpochSecond) String ¶
func (t EpochSecond) String() string
func (*EpochSecond) UnmarshalJSON ¶
func (t *EpochSecond) UnmarshalJSON(data []byte) error
type Field ¶
type Field[T any] struct { // contains filtered or unexported fields }
Field is a helper type to store an Elasticsearch JSON field. Field supports only undefined, null, T and T[], while Elasticsearch allows it to be one of undefined, null, null[], (null | T)[], T, T[] or T[][]. see: https://www.elastic.co/guide/en/elasticsearch/reference/8.4/array.html
func MapField ¶
MapField returns a new Field[T] whose values are elements of field mapped through mapper.
func NewField ¶
NewField returns a new Field. The returned Field does not points to the data that v does. Instead Field will use cloned content of v if not nil.
func NewFieldNull ¶
func NewFieldSinglePointer ¶
func NewFieldSingleValue ¶
func NewFieldSlice ¶
NewFieldSlice returns a new Field. The returned Field uses cloned v.
func NewFieldUnsafe ¶
NewFieldUnsafe returns a new Field. This does not clone v.
func (Field[T]) IsUndefined ¶
func (Field[T]) MarshalJSON ¶
MarshalJSON encodes f into a json format. It always marshalls as []T.
For most cases, a struct that contains Field[T] should be marshalled through MarshalFieldsJSON.
func (*Field[T]) SetSingleValue ¶
func (f *Field[T]) SetSingleValue(value T)
func (*Field[T]) SetUndefined ¶
func (f *Field[T]) SetUndefined()
func (*Field[T]) UnmarshalJSON ¶
func (Field[T]) UnwrapSingle ¶
func (f Field[T]) UnwrapSingle() T
func (Field[T]) ValueAny ¶
ValueAny returns inner value in any type. This can be used without any instantiation.
ValueAny returns nil if f is null or undefined. For other cases:
- If single is true, it returns either single T or zero value of T if and only if inner value is zero length.
- If single is false, it returns []T. It could be length of zero.
func (Field[T]) ValueSingle ¶
func (f Field[T]) ValueSingle() *T
func (Field[T]) ValueSingleZero ¶
func (f Field[T]) ValueSingleZero() T
ValueSingleZero gets the inner value of f, or falls back to zero value for T. If the inner value non-empty, it returns that value. Otherwise, returns zero value of T.
type Geopoint ¶
Elasticsearch geopoint type.
For historical reason, it has 6 formats to represent same data type. This type marshal into only one format, simple json consists of lat and lon keys populated with Number, namely, `{"lat":123, "lon":456}`.
see: https://www.elastic.co/guide/en/elasticsearch/reference/8.4/geo-point.html
func UnmarshalEsGeopointJSON ¶
func UnmarshalEsGeopointText ¶
func (*Geopoint) UnmarshalJSON ¶
func (*Geopoint) UnmarshalText ¶
type Geoshape ¶
type Geoshape struct { // avoid embedding this because it could confuse user when re-defined type is made in user code. Geometry geom.Geometry }
TODO: test against elasticsearch 8.4
func (Geoshape) MarshalJSON ¶
func (*Geoshape) UnmarshalJSON ¶
type HourMinute ¶
func (HourMinute) MarshalJSON ¶
func (t HourMinute) MarshalJSON() ([]byte, error)
func (HourMinute) String ¶
func (t HourMinute) String() string
func (*HourMinute) UnmarshalJSON ¶
func (t *HourMinute) UnmarshalJSON(data []byte) error
type HourMinuteSecond ¶
func (HourMinuteSecond) MarshalJSON ¶
func (t HourMinuteSecond) MarshalJSON() ([]byte, error)
func (HourMinuteSecond) String ¶
func (t HourMinuteSecond) String() string
func (*HourMinuteSecond) UnmarshalJSON ¶
func (t *HourMinuteSecond) UnmarshalJSON(data []byte) error
type HourMinuteSecondFraction ¶
func (HourMinuteSecondFraction) MarshalJSON ¶
func (t HourMinuteSecondFraction) MarshalJSON() ([]byte, error)
func (HourMinuteSecondFraction) String ¶
func (t HourMinuteSecondFraction) String() string
func (*HourMinuteSecondFraction) UnmarshalJSON ¶
func (t *HourMinuteSecondFraction) UnmarshalJSON(data []byte) error
type HourMinuteSecondMillis ¶
func (HourMinuteSecondMillis) MarshalJSON ¶
func (t HourMinuteSecondMillis) MarshalJSON() ([]byte, error)
func (HourMinuteSecondMillis) String ¶
func (t HourMinuteSecondMillis) String() string
func (*HourMinuteSecondMillis) UnmarshalJSON ¶
func (t *HourMinuteSecondMillis) UnmarshalJSON(data []byte) error
type InvalidTypeError ¶
type InvalidTypeError struct { // name of Go type Type string SupposedToBe []any InputValue []byte }
func (*InvalidTypeError) Error ¶
func (e *InvalidTypeError) Error() string
type OrdinalDate ¶
func (OrdinalDate) MarshalJSON ¶
func (t OrdinalDate) MarshalJSON() ([]byte, error)
func (OrdinalDate) String ¶
func (t OrdinalDate) String() string
func (*OrdinalDate) UnmarshalJSON ¶
func (t *OrdinalDate) UnmarshalJSON(data []byte) error
type OrdinalDateTime ¶
func (OrdinalDateTime) MarshalJSON ¶
func (t OrdinalDateTime) MarshalJSON() ([]byte, error)
func (OrdinalDateTime) String ¶
func (t OrdinalDateTime) String() string
func (*OrdinalDateTime) UnmarshalJSON ¶
func (t *OrdinalDateTime) UnmarshalJSON(data []byte) error
type OrdinalDateTimeNoMillis ¶
func (OrdinalDateTimeNoMillis) MarshalJSON ¶
func (t OrdinalDateTimeNoMillis) MarshalJSON() ([]byte, error)
func (OrdinalDateTimeNoMillis) String ¶
func (t OrdinalDateTimeNoMillis) String() string
func (*OrdinalDateTimeNoMillis) UnmarshalJSON ¶
func (t *OrdinalDateTimeNoMillis) UnmarshalJSON(data []byte) error
type StrictBasicWeekDate ¶
func (StrictBasicWeekDate) MarshalJSON ¶
func (t StrictBasicWeekDate) MarshalJSON() ([]byte, error)
func (StrictBasicWeekDate) String ¶
func (t StrictBasicWeekDate) String() string
func (*StrictBasicWeekDate) UnmarshalJSON ¶
func (t *StrictBasicWeekDate) UnmarshalJSON(data []byte) error
type StrictBasicWeekDateTime ¶
func (StrictBasicWeekDateTime) MarshalJSON ¶
func (t StrictBasicWeekDateTime) MarshalJSON() ([]byte, error)
func (StrictBasicWeekDateTime) String ¶
func (t StrictBasicWeekDateTime) String() string
func (*StrictBasicWeekDateTime) UnmarshalJSON ¶
func (t *StrictBasicWeekDateTime) UnmarshalJSON(data []byte) error
type StrictBasicWeekDateTimeNoMillis ¶
func (StrictBasicWeekDateTimeNoMillis) MarshalJSON ¶
func (t StrictBasicWeekDateTimeNoMillis) MarshalJSON() ([]byte, error)
func (StrictBasicWeekDateTimeNoMillis) String ¶
func (t StrictBasicWeekDateTimeNoMillis) String() string
func (*StrictBasicWeekDateTimeNoMillis) UnmarshalJSON ¶
func (t *StrictBasicWeekDateTimeNoMillis) UnmarshalJSON(data []byte) error
type StrictDate ¶
func (StrictDate) MarshalJSON ¶
func (t StrictDate) MarshalJSON() ([]byte, error)
func (StrictDate) String ¶
func (t StrictDate) String() string
func (*StrictDate) UnmarshalJSON ¶
func (t *StrictDate) UnmarshalJSON(data []byte) error
type StrictDateHour ¶
func (StrictDateHour) MarshalJSON ¶
func (t StrictDateHour) MarshalJSON() ([]byte, error)
func (StrictDateHour) String ¶
func (t StrictDateHour) String() string
func (*StrictDateHour) UnmarshalJSON ¶
func (t *StrictDateHour) UnmarshalJSON(data []byte) error
type StrictDateHourMinute ¶
func (StrictDateHourMinute) MarshalJSON ¶
func (t StrictDateHourMinute) MarshalJSON() ([]byte, error)
func (StrictDateHourMinute) String ¶
func (t StrictDateHourMinute) String() string
func (*StrictDateHourMinute) UnmarshalJSON ¶
func (t *StrictDateHourMinute) UnmarshalJSON(data []byte) error
type StrictDateHourMinuteSecond ¶
func (StrictDateHourMinuteSecond) MarshalJSON ¶
func (t StrictDateHourMinuteSecond) MarshalJSON() ([]byte, error)
func (StrictDateHourMinuteSecond) String ¶
func (t StrictDateHourMinuteSecond) String() string
func (*StrictDateHourMinuteSecond) UnmarshalJSON ¶
func (t *StrictDateHourMinuteSecond) UnmarshalJSON(data []byte) error
type StrictDateHourMinuteSecondFraction ¶
func (StrictDateHourMinuteSecondFraction) MarshalJSON ¶
func (t StrictDateHourMinuteSecondFraction) MarshalJSON() ([]byte, error)
func (StrictDateHourMinuteSecondFraction) String ¶
func (t StrictDateHourMinuteSecondFraction) String() string
func (*StrictDateHourMinuteSecondFraction) UnmarshalJSON ¶
func (t *StrictDateHourMinuteSecondFraction) UnmarshalJSON(data []byte) error
type StrictDateHourMinuteSecondMillis ¶
func (StrictDateHourMinuteSecondMillis) MarshalJSON ¶
func (t StrictDateHourMinuteSecondMillis) MarshalJSON() ([]byte, error)
func (StrictDateHourMinuteSecondMillis) String ¶
func (t StrictDateHourMinuteSecondMillis) String() string
func (*StrictDateHourMinuteSecondMillis) UnmarshalJSON ¶
func (t *StrictDateHourMinuteSecondMillis) UnmarshalJSON(data []byte) error
type StrictDateOptionalTime ¶
func (StrictDateOptionalTime) MarshalJSON ¶
func (t StrictDateOptionalTime) MarshalJSON() ([]byte, error)
func (StrictDateOptionalTime) String ¶
func (t StrictDateOptionalTime) String() string
func (*StrictDateOptionalTime) UnmarshalJSON ¶
func (t *StrictDateOptionalTime) UnmarshalJSON(data []byte) error
type StrictDateOptionalTimeEpochMillis ¶
func (StrictDateOptionalTimeEpochMillis) MarshalJSON ¶
func (t StrictDateOptionalTimeEpochMillis) MarshalJSON() ([]byte, error)
func (StrictDateOptionalTimeEpochMillis) String ¶
func (t StrictDateOptionalTimeEpochMillis) String() string
func (*StrictDateOptionalTimeEpochMillis) UnmarshalJSON ¶
func (t *StrictDateOptionalTimeEpochMillis) UnmarshalJSON(data []byte) error
type StrictDateOptionalTimeNanos ¶
func (StrictDateOptionalTimeNanos) MarshalJSON ¶
func (t StrictDateOptionalTimeNanos) MarshalJSON() ([]byte, error)
func (StrictDateOptionalTimeNanos) String ¶
func (t StrictDateOptionalTimeNanos) String() string
func (*StrictDateOptionalTimeNanos) UnmarshalJSON ¶
func (t *StrictDateOptionalTimeNanos) UnmarshalJSON(data []byte) error
type StrictDateOptionalTimeNanosEpochMillis ¶
func (StrictDateOptionalTimeNanosEpochMillis) MarshalJSON ¶
func (t StrictDateOptionalTimeNanosEpochMillis) MarshalJSON() ([]byte, error)
func (StrictDateOptionalTimeNanosEpochMillis) String ¶
func (t StrictDateOptionalTimeNanosEpochMillis) String() string
func (*StrictDateOptionalTimeNanosEpochMillis) UnmarshalJSON ¶
func (t *StrictDateOptionalTimeNanosEpochMillis) UnmarshalJSON(data []byte) error
type StrictDateTime ¶
func (StrictDateTime) MarshalJSON ¶
func (t StrictDateTime) MarshalJSON() ([]byte, error)
func (StrictDateTime) String ¶
func (t StrictDateTime) String() string
func (*StrictDateTime) UnmarshalJSON ¶
func (t *StrictDateTime) UnmarshalJSON(data []byte) error
type StrictDateTimeNoMillis ¶
func (StrictDateTimeNoMillis) MarshalJSON ¶
func (t StrictDateTimeNoMillis) MarshalJSON() ([]byte, error)
func (StrictDateTimeNoMillis) String ¶
func (t StrictDateTimeNoMillis) String() string
func (*StrictDateTimeNoMillis) UnmarshalJSON ¶
func (t *StrictDateTimeNoMillis) UnmarshalJSON(data []byte) error
type StrictHour ¶
func (StrictHour) MarshalJSON ¶
func (t StrictHour) MarshalJSON() ([]byte, error)
func (StrictHour) String ¶
func (t StrictHour) String() string
func (*StrictHour) UnmarshalJSON ¶
func (t *StrictHour) UnmarshalJSON(data []byte) error
type StrictHourMinute ¶
func (StrictHourMinute) MarshalJSON ¶
func (t StrictHourMinute) MarshalJSON() ([]byte, error)
func (StrictHourMinute) String ¶
func (t StrictHourMinute) String() string
func (*StrictHourMinute) UnmarshalJSON ¶
func (t *StrictHourMinute) UnmarshalJSON(data []byte) error
type StrictHourMinuteSecond ¶
func (StrictHourMinuteSecond) MarshalJSON ¶
func (t StrictHourMinuteSecond) MarshalJSON() ([]byte, error)
func (StrictHourMinuteSecond) String ¶
func (t StrictHourMinuteSecond) String() string
func (*StrictHourMinuteSecond) UnmarshalJSON ¶
func (t *StrictHourMinuteSecond) UnmarshalJSON(data []byte) error
type StrictHourMinuteSecondFraction ¶
func (StrictHourMinuteSecondFraction) MarshalJSON ¶
func (t StrictHourMinuteSecondFraction) MarshalJSON() ([]byte, error)
func (StrictHourMinuteSecondFraction) String ¶
func (t StrictHourMinuteSecondFraction) String() string
func (*StrictHourMinuteSecondFraction) UnmarshalJSON ¶
func (t *StrictHourMinuteSecondFraction) UnmarshalJSON(data []byte) error
type StrictHourMinuteSecondMillis ¶
func (StrictHourMinuteSecondMillis) MarshalJSON ¶
func (t StrictHourMinuteSecondMillis) MarshalJSON() ([]byte, error)
func (StrictHourMinuteSecondMillis) String ¶
func (t StrictHourMinuteSecondMillis) String() string
func (*StrictHourMinuteSecondMillis) UnmarshalJSON ¶
func (t *StrictHourMinuteSecondMillis) UnmarshalJSON(data []byte) error
type StrictOrdinalDate ¶
func (StrictOrdinalDate) MarshalJSON ¶
func (t StrictOrdinalDate) MarshalJSON() ([]byte, error)
func (StrictOrdinalDate) String ¶
func (t StrictOrdinalDate) String() string
func (*StrictOrdinalDate) UnmarshalJSON ¶
func (t *StrictOrdinalDate) UnmarshalJSON(data []byte) error
type StrictOrdinalDateTime ¶
func (StrictOrdinalDateTime) MarshalJSON ¶
func (t StrictOrdinalDateTime) MarshalJSON() ([]byte, error)
func (StrictOrdinalDateTime) String ¶
func (t StrictOrdinalDateTime) String() string
func (*StrictOrdinalDateTime) UnmarshalJSON ¶
func (t *StrictOrdinalDateTime) UnmarshalJSON(data []byte) error
type StrictOrdinalDateTimeNoMillis ¶
func (StrictOrdinalDateTimeNoMillis) MarshalJSON ¶
func (t StrictOrdinalDateTimeNoMillis) MarshalJSON() ([]byte, error)
func (StrictOrdinalDateTimeNoMillis) String ¶
func (t StrictOrdinalDateTimeNoMillis) String() string
func (*StrictOrdinalDateTimeNoMillis) UnmarshalJSON ¶
func (t *StrictOrdinalDateTimeNoMillis) UnmarshalJSON(data []byte) error
type StrictTTime ¶
func (StrictTTime) MarshalJSON ¶
func (t StrictTTime) MarshalJSON() ([]byte, error)
func (StrictTTime) String ¶
func (t StrictTTime) String() string
func (*StrictTTime) UnmarshalJSON ¶
func (t *StrictTTime) UnmarshalJSON(data []byte) error
type StrictTTimeNoMillis ¶
func (StrictTTimeNoMillis) MarshalJSON ¶
func (t StrictTTimeNoMillis) MarshalJSON() ([]byte, error)
func (StrictTTimeNoMillis) String ¶
func (t StrictTTimeNoMillis) String() string
func (*StrictTTimeNoMillis) UnmarshalJSON ¶
func (t *StrictTTimeNoMillis) UnmarshalJSON(data []byte) error
type StrictTime ¶
func (StrictTime) MarshalJSON ¶
func (t StrictTime) MarshalJSON() ([]byte, error)
func (StrictTime) String ¶
func (t StrictTime) String() string
func (*StrictTime) UnmarshalJSON ¶
func (t *StrictTime) UnmarshalJSON(data []byte) error
type StrictTimeNoMillis ¶
func (StrictTimeNoMillis) MarshalJSON ¶
func (t StrictTimeNoMillis) MarshalJSON() ([]byte, error)
func (StrictTimeNoMillis) String ¶
func (t StrictTimeNoMillis) String() string
func (*StrictTimeNoMillis) UnmarshalJSON ¶
func (t *StrictTimeNoMillis) UnmarshalJSON(data []byte) error
type StrictYear ¶
func (StrictYear) MarshalJSON ¶
func (t StrictYear) MarshalJSON() ([]byte, error)
func (StrictYear) String ¶
func (t StrictYear) String() string
func (*StrictYear) UnmarshalJSON ¶
func (t *StrictYear) UnmarshalJSON(data []byte) error
type StrictYearMonth ¶
func (StrictYearMonth) MarshalJSON ¶
func (t StrictYearMonth) MarshalJSON() ([]byte, error)
func (StrictYearMonth) String ¶
func (t StrictYearMonth) String() string
func (*StrictYearMonth) UnmarshalJSON ¶
func (t *StrictYearMonth) UnmarshalJSON(data []byte) error
type StrictYearMonthDay ¶
func (StrictYearMonthDay) MarshalJSON ¶
func (t StrictYearMonthDay) MarshalJSON() ([]byte, error)
func (StrictYearMonthDay) String ¶
func (t StrictYearMonthDay) String() string
func (*StrictYearMonthDay) UnmarshalJSON ¶
func (t *StrictYearMonthDay) UnmarshalJSON(data []byte) error
type TTimeNoMillis ¶
func (TTimeNoMillis) MarshalJSON ¶
func (t TTimeNoMillis) MarshalJSON() ([]byte, error)
func (TTimeNoMillis) String ¶
func (t TTimeNoMillis) String() string
func (*TTimeNoMillis) UnmarshalJSON ¶
func (t *TTimeNoMillis) UnmarshalJSON(data []byte) error
type TimeNoMillis ¶
func (TimeNoMillis) MarshalJSON ¶
func (t TimeNoMillis) MarshalJSON() ([]byte, error)
func (TimeNoMillis) String ¶
func (t TimeNoMillis) String() string
func (*TimeNoMillis) UnmarshalJSON ¶
func (t *TimeNoMillis) UnmarshalJSON(data []byte) error
type UninstantiatedField ¶
type UninstantiatedField interface { ValueAny(mustSingle bool) any IsNull() bool IsUndefined() bool }
Parts of Field[T] that can be used without an instantiation.
type YearMonthDay ¶
func (YearMonthDay) MarshalJSON ¶
func (t YearMonthDay) MarshalJSON() ([]byte, error)
func (YearMonthDay) String ¶
func (t YearMonthDay) String() string
func (*YearMonthDay) UnmarshalJSON ¶
func (t *YearMonthDay) UnmarshalJSON(data []byte) error