Documentation
¶
Index ¶
- Variables
- func FormatDuration(ns int64) string
- func ParseDuration(duration string) (int64, error)
- type Bound
- type BoundExcluded
- type BoundIncluded
- type CborMarshaler
- type CborUnmarshaler
- type CustomDateTime
- type CustomDuration
- type CustomDurationString
- type CustomNil
- type DecimalString
- type Future
- type GeometryCollection
- type GeometryLine
- type GeometryMultiLine
- type GeometryMultiPoint
- type GeometryMultiPolygon
- type GeometryPoint
- type GeometryPolygon
- type Range
- type RecordID
- type RecordIDType
- type RecordRangeID
- type Table
- type UUID
- type UUIDString
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TagNone uint64 = 6 TagTable uint64 = 7 TagRecordID uint64 = 8 TagCustomDatetime uint64 = 12 TagCustomDuration uint64 = 14 TagFuture uint64 = 15 TagStringUUID uint64 = 9 TagStringDecimal uint64 = 10 TagStringDuration uint64 = 13 TagSpecBinaryUUID uint64 = 37 TagRange uint64 = 49 TagBoundIncluded uint64 = 50 TagBoundExcluded uint64 = 51 TagGeometryPoint uint64 = 88 TagGeometryLine uint64 = 89 TagGeometryPolygon uint64 = 90 TagGeometryMultiPoint uint64 = 91 TagGeometryMultiLine uint64 = 92 TagGeometryMultiPolygon uint64 = 93 TagGeometryCollection uint64 = 94 )
View Source
var None = CustomNil{}
Functions ¶
func FormatDuration ¶
func ParseDuration ¶
Types ¶
type Bound ¶
type Bound[T any] interface { BoundIncluded[T] | BoundExcluded[T] }
type BoundExcluded ¶
type BoundExcluded[T any] struct { Value T }
func (*BoundExcluded[T]) MarshalCBOR ¶
func (be *BoundExcluded[T]) MarshalCBOR() ([]byte, error)
func (*BoundExcluded[T]) UnmarshalCBOR ¶
func (be *BoundExcluded[T]) UnmarshalCBOR(data []byte) error
type BoundIncluded ¶
type BoundIncluded[T any] struct { Value T }
func (*BoundIncluded[T]) MarshalCBOR ¶
func (bi *BoundIncluded[T]) MarshalCBOR() ([]byte, error)
func (*BoundIncluded[T]) UnmarshalCBOR ¶
func (bi *BoundIncluded[T]) UnmarshalCBOR(data []byte) error
type CborMarshaler ¶
type CborMarshaler struct {
}
func (CborMarshaler) Marshal ¶
func (c CborMarshaler) Marshal(v interface{}) ([]byte, error)
func (CborMarshaler) NewEncoder ¶
func (c CborMarshaler) NewEncoder(w io.Writer) codec.Encoder
type CborUnmarshaler ¶
type CborUnmarshaler struct {
}
func (CborUnmarshaler) NewDecoder ¶
func (c CborUnmarshaler) NewDecoder(r io.Reader) codec.Decoder
func (CborUnmarshaler) Unmarshal ¶
func (c CborUnmarshaler) Unmarshal(data []byte, dst interface{}) error
type CustomDateTime ¶
CustomDateTime embeds time.Time
func (*CustomDateTime) MarshalCBOR ¶
func (d *CustomDateTime) MarshalCBOR() ([]byte, error)
func (*CustomDateTime) String ¶
func (d *CustomDateTime) String() string
func (*CustomDateTime) SurrealString ¶
func (d *CustomDateTime) SurrealString() string
func (*CustomDateTime) UnmarshalCBOR ¶
func (d *CustomDateTime) UnmarshalCBOR(data []byte) error
type CustomDuration ¶
func (*CustomDuration) MarshalCBOR ¶
func (d *CustomDuration) MarshalCBOR() ([]byte, error)
func (*CustomDuration) String ¶
func (d *CustomDuration) String() string
func (*CustomDuration) ToCustomDurationString ¶
func (d *CustomDuration) ToCustomDurationString() CustomDurationString
func (*CustomDuration) UnmarshalCBOR ¶
func (d *CustomDuration) UnmarshalCBOR(data []byte) error
type CustomDurationString ¶
type CustomDurationString string
func (*CustomDurationString) String ¶
func (d *CustomDurationString) String() string
func (*CustomDurationString) ToCustomDuration ¶
func (d *CustomDurationString) ToCustomDuration() CustomDuration
func (*CustomDurationString) ToDuration ¶
func (d *CustomDurationString) ToDuration() time.Duration
type CustomNil ¶
type CustomNil struct {
}
func (*CustomNil) MarshalCBOR ¶
func (*CustomNil) UnMarshalCBOR ¶
type DecimalString ¶
type DecimalString string
type Future ¶
type Future struct {
// contains filtered or unexported fields
}
func (*Future) SurrealString ¶
type GeometryCollection ¶
type GeometryCollection []any
type GeometryLine ¶
type GeometryLine []GeometryPoint
type GeometryMultiLine ¶
type GeometryMultiLine []GeometryLine
type GeometryMultiPoint ¶
type GeometryMultiPoint []GeometryPoint
type GeometryMultiPolygon ¶
type GeometryMultiPolygon []GeometryPolygon
type GeometryPoint ¶
func NewGeometryPoint ¶
func NewGeometryPoint(latitude, longitude float64) GeometryPoint
func (*GeometryPoint) GetCoordinates ¶
func (gp *GeometryPoint) GetCoordinates() [2]float64
func (*GeometryPoint) MarshalCBOR ¶
func (gp *GeometryPoint) MarshalCBOR() ([]byte, error)
func (*GeometryPoint) UnmarshalCBOR ¶
func (gp *GeometryPoint) UnmarshalCBOR(data []byte) error
type GeometryPolygon ¶
type GeometryPolygon []GeometryLine
type Range ¶
func (*Range[T, TBeg, TEnd]) GetJoinString ¶
func (*Range[T, TBeg, TEnd]) MarshalCBOR ¶
func (*Range[T, TBeg, TEnd]) UnmarshalCBOR ¶
type RecordID ¶
func NewRecordID ¶
func ParseRecordID ¶
func (*RecordID) MarshalCBOR ¶
func (*RecordID) SurrealString ¶
func (*RecordID) UnmarshalCBOR ¶
type RecordRangeID ¶
func (*RecordRangeID[T, TBeg, TEnd]) String ¶
func (rr *RecordRangeID[T, TBeg, TEnd]) String() string
type UUIDString ¶
type UUIDString string
Click to show internal directories.
Click to hide internal directories.