Datatypes
type DateDuration
DateDuration represents the elapsed time between two dates in a fuzzy human way.
type DateDuration struct {
// contains filtered or unexported fields
}
function NewDateDuration
func NewDateDuration(months int32, days int32) DateDuration
NewDateDuration returns a new DateDuration
method MarshalText
func (dd DateDuration) MarshalText() ([]byte, error)
MarshalText returns dd marshaled as text.
type Duration
Duration represents the elapsed time between two instants as an int64 microsecond count.
type Duration int64
function DurationFromNanoseconds
func DurationFromNanoseconds(d time.Duration) Duration
DurationFromNanoseconds creates a Duration represented as microseconds from a time.Duration represented as nanoseconds.
function ParseDuration
func ParseDuration(s string) (Duration, error)
ParseDuration parses an EdgeDB duration string.
method AsNanoseconds
func (d Duration) AsNanoseconds() (time.Duration, error)
AsNanoseconds returns time.Duration represented as nanoseconds, after transforming from Duration microsecond representation. Returns an error if the Duration is too long and would cause an overflow of the internal int64 representation.
type LocalDate
LocalDate is a date without a time zone. docs/stdlib/datetime#type::cal::local_date
type LocalDate struct {
// contains filtered or unexported fields
}
function NewLocalDate
func NewLocalDate(year int, month time.Month, day int) LocalDate
NewLocalDate returns a new LocalDate
method MarshalText
func (d LocalDate) MarshalText() ([]byte, error)
MarshalText returns d marshaled as text.
type LocalDateTime
LocalDateTime is a date and time without timezone. docs/stdlib/datetime#type::cal::local_datetime
type LocalDateTime struct {
// contains filtered or unexported fields
}
function NewLocalDateTime
func NewLocalDateTime(
year int, month time.Month, day, hour, minute, second, microsecond int,
) LocalDateTime
NewLocalDateTime returns a new LocalDateTime
method MarshalText
func (dt LocalDateTime) MarshalText() ([]byte, error)
MarshalText returns dt marshaled as text.
type LocalTime
LocalTime is a time without a time zone. docs/stdlib/datetime#type::cal::local_time
type LocalTime struct {
// contains filtered or unexported fields
}
function NewLocalTime
func NewLocalTime(hour, minute, second, microsecond int) LocalTime
NewLocalTime returns a new LocalTime
method MarshalText
func (t LocalTime) MarshalText() ([]byte, error)
MarshalText returns t marshaled as text.
type Memory
Memory represents memory in bytes.
type Memory int64
method MarshalText
func (m Memory) MarshalText() ([]byte, error)
MarshalText returns m marshaled as text.
type MultiRangeDateTime
MultiRangeDateTime is a type alias for a slice of RangeDateTime values.
type MultiRangeDateTime = []RangeDateTime
type MultiRangeFloat32
MultiRangeFloat32 is a type alias for a slice of RangeFloat32 values.
type MultiRangeFloat32 = []RangeFloat32
type MultiRangeFloat64
MultiRangeFloat64 is a type alias for a slice of RangeFloat64 values.
type MultiRangeFloat64 = []RangeFloat64
type MultiRangeInt32
MultiRangeInt32 is a type alias for a slice of RangeInt32 values.
type MultiRangeInt32 = []RangeInt32
type MultiRangeInt64
MultiRangeInt64 is a type alias for a slice of RangeInt64 values.
type MultiRangeInt64 = []RangeInt64
type MultiRangeLocalDate
MultiRangeLocalDate is a type alias for a slice of RangeLocalDate values.
type MultiRangeLocalDate = []RangeLocalDate
type MultiRangeLocalDateTime
MultiRangeLocalDateTime is a type alias for a slice of RangeLocalDateTime values.
type MultiRangeLocalDateTime = []RangeLocalDateTime
type Optional
Optional represents a shape field that is not required. Optional is embedded in structs to make them optional. For example:
type User struct {
edgedb.Optional
Name string `edgedb:"name"`
}
type Optional struct {
// contains filtered or unexported fields
}
method SetMissing
func (o *Optional) SetMissing(missing bool)
SetMissing sets the structs missing status. true means missing and false means present.
type OptionalBigInt
OptionalBigInt is an optional *big.Int. Optional types must be used for out parameters when a shape field is not required.
type OptionalBigInt struct {
// contains filtered or unexported fields
}
function NewOptionalBigInt
func NewOptionalBigInt(v *big.Int) OptionalBigInt
NewOptionalBigInt is a convenience function for creating an OptionalBigInt with its value set to v.
method Get
func (o OptionalBigInt) Get() (*big.Int, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalBigInt) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalBigInt) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalBool
OptionalBool is an optional bool. Optional types must be used for out parameters when a shape field is not required.
type OptionalBool struct {
// contains filtered or unexported fields
}
function NewOptionalBool
func NewOptionalBool(v bool) OptionalBool
NewOptionalBool is a convenience function for creating an OptionalBool with its value set to v.
method Get
func (o OptionalBool) Get() (bool, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalBool) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalBool) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalBytes
OptionalBytes is an optional []byte. Optional types must be used for out parameters when a shape field is not required.
type OptionalBytes struct {
// contains filtered or unexported fields
}
function NewOptionalBytes
func NewOptionalBytes(v []byte) OptionalBytes
NewOptionalBytes is a convenience function for creating an OptionalBytes with its value set to v.
method Get
func (o OptionalBytes) Get() ([]byte, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalBytes) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalBytes) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalDateDuration
OptionalDateDuration is an optional DateDuration. Optional types must be used for out parameters when a shape field is not required.
type OptionalDateDuration struct {
// contains filtered or unexported fields
}
function NewOptionalDateDuration
func NewOptionalDateDuration(v DateDuration) OptionalDateDuration
NewOptionalDateDuration is a convenience function for creating an OptionalDateDuration with its value set to v.
method Get
func (o *OptionalDateDuration) Get() (DateDuration, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalDateDuration) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalDateDuration) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalDateTime
OptionalDateTime is an optional time.Time. Optional types must be used for out parameters when a shape field is not required.
type OptionalDateTime struct {
// contains filtered or unexported fields
}
function NewOptionalDateTime
func NewOptionalDateTime(v time.Time) OptionalDateTime
NewOptionalDateTime is a convenience function for creating an OptionalDateTime with its value set to v.
method Get
func (o OptionalDateTime) Get() (time.Time, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalDateTime) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalDateTime) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalDuration
OptionalDuration is an optional Duration. Optional types must be used for out parameters when a shape field is not required.
type OptionalDuration struct {
// contains filtered or unexported fields
}
function NewOptionalDuration
func NewOptionalDuration(v Duration) OptionalDuration
NewOptionalDuration is a convenience function for creating an OptionalDuration with its value set to v.
method Get
func (o OptionalDuration) Get() (Duration, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalDuration) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalDuration) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalFloat32
OptionalFloat32 is an optional float32. Optional types must be used for out parameters when a shape field is not required.
type OptionalFloat32 struct {
// contains filtered or unexported fields
}
function NewOptionalFloat32
func NewOptionalFloat32(v float32) OptionalFloat32
NewOptionalFloat32 is a convenience function for creating an OptionalFloat32 with its value set to v.
method Get
func (o OptionalFloat32) Get() (float32, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalFloat32) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalFloat32) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalFloat64
OptionalFloat64 is an optional float64. Optional types must be used for out parameters when a shape field is not required.
type OptionalFloat64 struct {
// contains filtered or unexported fields
}
function NewOptionalFloat64
func NewOptionalFloat64(v float64) OptionalFloat64
NewOptionalFloat64 is a convenience function for creating an OptionalFloat64 with its value set to v.
method Get
func (o OptionalFloat64) Get() (float64, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalFloat64) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalFloat64) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalInt16
OptionalInt16 is an optional int16. Optional types must be used for out parameters when a shape field is not required.
type OptionalInt16 struct {
// contains filtered or unexported fields
}
function NewOptionalInt16
func NewOptionalInt16(v int16) OptionalInt16
NewOptionalInt16 is a convenience function for creating an OptionalInt16 with its value set to v.
method Get
func (o OptionalInt16) Get() (int16, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalInt16) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalInt16) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalInt32
OptionalInt32 is an optional int32. Optional types must be used for out parameters when a shape field is not required.
type OptionalInt32 struct {
// contains filtered or unexported fields
}
function NewOptionalInt32
func NewOptionalInt32(v int32) OptionalInt32
NewOptionalInt32 is a convenience function for creating an OptionalInt32 with its value set to v.
method Get
func (o OptionalInt32) Get() (int32, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalInt32) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalInt32) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalInt64
OptionalInt64 is an optional int64. Optional types must be used for out parameters when a shape field is not required.
type OptionalInt64 struct {
// contains filtered or unexported fields
}
function NewOptionalInt64
func NewOptionalInt64(v int64) OptionalInt64
NewOptionalInt64 is a convenience function for creating an OptionalInt64 with its value set to v.
method Get
func (o OptionalInt64) Get() (int64, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalInt64) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalInt64) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalLocalDate
OptionalLocalDate is an optional LocalDate. Optional types must be used for out parameters when a shape field is not required.
type OptionalLocalDate struct {
// contains filtered or unexported fields
}
function NewOptionalLocalDate
func NewOptionalLocalDate(v LocalDate) OptionalLocalDate
NewOptionalLocalDate is a convenience function for creating an OptionalLocalDate with its value set to v.
method Get
func (o OptionalLocalDate) Get() (LocalDate, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalLocalDate) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalLocalDate) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalLocalDateTime
OptionalLocalDateTime is an optional LocalDateTime. Optional types must be used for out parameters when a shape field is not required.
type OptionalLocalDateTime struct {
// contains filtered or unexported fields
}
function NewOptionalLocalDateTime
func NewOptionalLocalDateTime(v LocalDateTime) OptionalLocalDateTime
NewOptionalLocalDateTime is a convenience function for creating an OptionalLocalDateTime with its value set to v.
method Get
func (o OptionalLocalDateTime) Get() (LocalDateTime, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalLocalDateTime) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalLocalDateTime) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalLocalTime
OptionalLocalTime is an optional LocalTime. Optional types must be used for out parameters when a shape field is not required.
type OptionalLocalTime struct {
// contains filtered or unexported fields
}
function NewOptionalLocalTime
func NewOptionalLocalTime(v LocalTime) OptionalLocalTime
NewOptionalLocalTime is a convenience function for creating an OptionalLocalTime with its value set to v.
method Get
func (o OptionalLocalTime) Get() (LocalTime, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalLocalTime) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalLocalTime) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalMemory
OptionalMemory is an optional Memory. Optional types must be used for out parameters when a shape field is not required.
type OptionalMemory struct {
// contains filtered or unexported fields
}
function NewOptionalMemory
func NewOptionalMemory(v Memory) OptionalMemory
NewOptionalMemory is a convenience function for creating an OptionalMemory with its value set to v.
method Get
func (o OptionalMemory) Get() (Memory, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalMemory) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalMemory) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalRangeDateTime
OptionalRangeDateTime is an optional RangeDateTime. Optional types must be used for out parameters when a shape field is not required.
type OptionalRangeDateTime struct {
// contains filtered or unexported fields
}
function NewOptionalRangeDateTime
func NewOptionalRangeDateTime(v RangeDateTime) OptionalRangeDateTime
NewOptionalRangeDateTime is a convenience function for creating an OptionalRangeDateTime with its value set to v.
method Get
func (o *OptionalRangeDateTime) Get() (RangeDateTime, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o *OptionalRangeDateTime) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalRangeDateTime) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalRangeFloat32
OptionalRangeFloat32 is an optional RangeFloat32. Optional types must be used for out parameters when a shape field is not required.
type OptionalRangeFloat32 struct {
// contains filtered or unexported fields
}
function NewOptionalRangeFloat32
func NewOptionalRangeFloat32(v RangeFloat32) OptionalRangeFloat32
NewOptionalRangeFloat32 is a convenience function for creating an OptionalRangeFloat32 with its value set to v.
method Get
func (o OptionalRangeFloat32) Get() (RangeFloat32, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalRangeFloat32) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalRangeFloat32) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalRangeFloat64
OptionalRangeFloat64 is an optional RangeFloat64. Optional types must be used for out parameters when a shape field is not required.
type OptionalRangeFloat64 struct {
// contains filtered or unexported fields
}
function NewOptionalRangeFloat64
func NewOptionalRangeFloat64(v RangeFloat64) OptionalRangeFloat64
NewOptionalRangeFloat64 is a convenience function for creating an OptionalRangeFloat64 with its value set to v.
method Get
func (o OptionalRangeFloat64) Get() (RangeFloat64, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalRangeFloat64) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalRangeFloat64) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalRangeInt32
OptionalRangeInt32 is an optional RangeInt32. Optional types must be used for out parameters when a shape field is not required.
type OptionalRangeInt32 struct {
// contains filtered or unexported fields
}
function NewOptionalRangeInt32
func NewOptionalRangeInt32(v RangeInt32) OptionalRangeInt32
NewOptionalRangeInt32 is a convenience function for creating an OptionalRangeInt32 with its value set to v.
method Get
func (o OptionalRangeInt32) Get() (RangeInt32, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalRangeInt32) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalRangeInt32) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalRangeInt64
OptionalRangeInt64 is an optional RangeInt64. Optional types must be used for out parameters when a shape field is not required.
type OptionalRangeInt64 struct {
// contains filtered or unexported fields
}
function NewOptionalRangeInt64
func NewOptionalRangeInt64(v RangeInt64) OptionalRangeInt64
NewOptionalRangeInt64 is a convenience function for creating an OptionalRangeInt64 with its value set to v.
method Get
func (o OptionalRangeInt64) Get() (RangeInt64, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalRangeInt64) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalRangeInt64) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalRangeLocalDate
OptionalRangeLocalDate is an optional RangeLocalDate. Optional types must be used for out parameters when a shape field is not required.
type OptionalRangeLocalDate struct {
// contains filtered or unexported fields
}
function NewOptionalRangeLocalDate
func NewOptionalRangeLocalDate(v RangeLocalDate) OptionalRangeLocalDate
NewOptionalRangeLocalDate is a convenience function for creating an OptionalRangeLocalDate with its value set to v.
method Get
func (o OptionalRangeLocalDate) Get() (RangeLocalDate, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalRangeLocalDate) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalRangeLocalDate) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalRangeLocalDateTime
OptionalRangeLocalDateTime is an optional RangeLocalDateTime. Optional types must be used for out parameters when a shape field is not required.
type OptionalRangeLocalDateTime struct {
// contains filtered or unexported fields
}
function NewOptionalRangeLocalDateTime
func NewOptionalRangeLocalDateTime(
v RangeLocalDateTime,
) OptionalRangeLocalDateTime
NewOptionalRangeLocalDateTime is a convenience function for creating an OptionalRangeLocalDateTime with its value set to v.
method Get
func (o OptionalRangeLocalDateTime) Get() (RangeLocalDateTime, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalRangeLocalDateTime) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method Set
func (o *OptionalRangeLocalDateTime) Set(val RangeLocalDateTime)
Set sets the value.
method UnmarshalJSON
func (o *OptionalRangeLocalDateTime) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalRelativeDuration
OptionalRelativeDuration is an optional RelativeDuration. Optional types must be used for out parameters when a shape field is not required.
type OptionalRelativeDuration struct {
// contains filtered or unexported fields
}
function NewOptionalRelativeDuration
func NewOptionalRelativeDuration(v RelativeDuration) OptionalRelativeDuration
NewOptionalRelativeDuration is a convenience function for creating an OptionalRelativeDuration with its value set to v.
method Get
func (o OptionalRelativeDuration) Get() (RelativeDuration, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalRelativeDuration) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalRelativeDuration) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalStr
OptionalStr is an optional string. Optional types must be used for out parameters when a shape field is not required.
type OptionalStr struct {
// contains filtered or unexported fields
}
function NewOptionalStr
func NewOptionalStr(v string) OptionalStr
NewOptionalStr is a convenience function for creating an OptionalStr with its value set to v.
method Get
func (o OptionalStr) Get() (string, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalStr) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalStr) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o.
type OptionalUUID
OptionalUUID is an optional UUID. Optional types must be used for out parameters when a shape field is not required.
type OptionalUUID struct {
// contains filtered or unexported fields
}
function NewOptionalUUID
func NewOptionalUUID(v UUID) OptionalUUID
NewOptionalUUID is a convenience function for creating an OptionalUUID with its value set to v.
method Get
func (o OptionalUUID) Get() (UUID, bool)
Get returns the value and a boolean indicating if the value is present.
method MarshalJSON
func (o OptionalUUID) MarshalJSON() ([]byte, error)
MarshalJSON returns o marshaled as json.
method UnmarshalJSON
func (o *OptionalUUID) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals bytes into *o
type RangeDateTime
RangeDateTime is an interval of time.Time values.
type RangeDateTime struct {
// contains filtered or unexported fields
}
function NewRangeDateTime
func NewRangeDateTime(
lower, upper OptionalDateTime,
incLower, incUpper bool,
) RangeDateTime
NewRangeDateTime creates a new RangeDateTime value.
method IncLower
func (r RangeDateTime) IncLower() bool
IncLower returns true if the lower bound is inclusive.
method IncUpper
func (r RangeDateTime) IncUpper() bool
IncUpper returns true if the upper bound is inclusive.
method MarshalJSON
func (r RangeDateTime) MarshalJSON() ([]byte, error)
MarshalJSON returns r marshaled as json.
method UnmarshalJSON
func (r *RangeDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals bytes into *r.
type RangeFloat32
RangeFloat32 is an interval of float32 values.
type RangeFloat32 struct {
// contains filtered or unexported fields
}
function NewRangeFloat32
func NewRangeFloat32(
lower, upper OptionalFloat32,
incLower, incUpper bool,
) RangeFloat32
NewRangeFloat32 creates a new RangeFloat32 value.
method IncLower
func (r RangeFloat32) IncLower() bool
IncLower returns true if the lower bound is inclusive.
method IncUpper
func (r RangeFloat32) IncUpper() bool
IncUpper returns true if the upper bound is inclusive.
method MarshalJSON
func (r RangeFloat32) MarshalJSON() ([]byte, error)
MarshalJSON returns r marshaled as json.
method UnmarshalJSON
func (r *RangeFloat32) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals bytes into *r.
type RangeFloat64
RangeFloat64 is an interval of float64 values.
type RangeFloat64 struct {
// contains filtered or unexported fields
}
function NewRangeFloat64
func NewRangeFloat64(
lower, upper OptionalFloat64,
incLower, incUpper bool,
) RangeFloat64
NewRangeFloat64 creates a new RangeFloat64 value.
method IncLower
func (r RangeFloat64) IncLower() bool
IncLower returns true if the lower bound is inclusive.
method IncUpper
func (r RangeFloat64) IncUpper() bool
IncUpper returns true if the upper bound is inclusive.
method MarshalJSON
func (r RangeFloat64) MarshalJSON() ([]byte, error)
MarshalJSON returns r marshaled as json.
method UnmarshalJSON
func (r *RangeFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals bytes into *r.
type RangeInt32
RangeInt32 is an interval of int32 values.
type RangeInt32 struct {
// contains filtered or unexported fields
}
function NewRangeInt32
func NewRangeInt32(
lower, upper OptionalInt32,
incLower, incUpper bool,
) RangeInt32
NewRangeInt32 creates a new RangeInt32 value.
method IncLower
func (r RangeInt32) IncLower() bool
IncLower returns true if the lower bound is inclusive.
method IncUpper
func (r RangeInt32) IncUpper() bool
IncUpper returns true if the upper bound is inclusive.
method MarshalJSON
func (r RangeInt32) MarshalJSON() ([]byte, error)
MarshalJSON returns r marshaled as json.
method UnmarshalJSON
func (r *RangeInt32) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals bytes into *r.
type RangeInt64
RangeInt64 is an interval of int64 values.
type RangeInt64 struct {
// contains filtered or unexported fields
}
function NewRangeInt64
func NewRangeInt64(
lower, upper OptionalInt64,
incLower, incUpper bool,
) RangeInt64
NewRangeInt64 creates a new RangeInt64 value.
method IncLower
func (r RangeInt64) IncLower() bool
IncLower returns true if the lower bound is inclusive.
method IncUpper
func (r RangeInt64) IncUpper() bool
IncUpper returns true if the upper bound is inclusive.
method MarshalJSON
func (r RangeInt64) MarshalJSON() ([]byte, error)
MarshalJSON returns r marshaled as json.
method UnmarshalJSON
func (r *RangeInt64) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals bytes into *r.
type RangeLocalDate
RangeLocalDate is an interval of LocalDate values.
type RangeLocalDate struct {
// contains filtered or unexported fields
}
function NewRangeLocalDate
func NewRangeLocalDate(
lower, upper OptionalLocalDate,
incLower, incUpper bool,
) RangeLocalDate
NewRangeLocalDate creates a new RangeLocalDate value.
method IncLower
func (r RangeLocalDate) IncLower() bool
IncLower returns true if the lower bound is inclusive.
method IncUpper
func (r RangeLocalDate) IncUpper() bool
IncUpper returns true if the upper bound is inclusive.
method MarshalJSON
func (r RangeLocalDate) MarshalJSON() ([]byte, error)
MarshalJSON returns r marshaled as json.
method UnmarshalJSON
func (r *RangeLocalDate) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals bytes into *r.
type RangeLocalDateTime
RangeLocalDateTime is an interval of LocalDateTime values.
type RangeLocalDateTime struct {
// contains filtered or unexported fields
}
function NewRangeLocalDateTime
func NewRangeLocalDateTime(
lower, upper OptionalLocalDateTime,
incLower, incUpper bool,
) RangeLocalDateTime
NewRangeLocalDateTime creates a new RangeLocalDateTime value.
method Empty
func (r RangeLocalDateTime) Empty() bool
Empty returns true if the range is empty.
method IncLower
func (r RangeLocalDateTime) IncLower() bool
IncLower returns true if the lower bound is inclusive.
method IncUpper
func (r RangeLocalDateTime) IncUpper() bool
IncUpper returns true if the upper bound is inclusive.
method Lower
func (r RangeLocalDateTime) Lower() OptionalLocalDateTime
Lower returns the lower bound.
method MarshalJSON
func (r RangeLocalDateTime) MarshalJSON() ([]byte, error)
MarshalJSON returns r marshaled as json.
method UnmarshalJSON
func (r *RangeLocalDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals bytes into *r.
type RelativeDuration
RelativeDuration represents the elapsed time between two instants in a fuzzy human way.
type RelativeDuration struct {
// contains filtered or unexported fields
}
function NewRelativeDuration
func NewRelativeDuration(
months, days int32,
microseconds int64,
) RelativeDuration
NewRelativeDuration returns a new RelativeDuration
method MarshalText
func (rd RelativeDuration) MarshalText() ([]byte, error)
MarshalText returns rd marshaled as text.
type UUID
UUID is a universally unique identifier docs/stdlib/uuid
type UUID [16]byte
function ParseUUID
func ParseUUID(s string) (UUID, error)
ParseUUID parses s into a UUID or returns an error.
method MarshalText
func (id UUID) MarshalText() ([]byte, error)
MarshalText returns the id as a byte string.