Documentation
¶
Index ¶
- Variables
- func GetScalarDescriptor(desc descriptor.Descriptor) descriptor.Descriptor
- type BigIntCodec
- type BoolCodec
- type BytesCodec
- type Codec
- type DateDurationCodec
- type DateTimeCodec
- type Decoder
- type DecoderField
- type DurationCodec
- type Encoder
- type EncoderField
- type Float32Codec
- type Float64Codec
- type Int16Codec
- type Int32Codec
- type Int64Codec
- type JSONCodec
- type LocalDateCodec
- type LocalDateTimeCodec
- type LocalTimeCodec
- type MemoryCodec
- type OptionalDecoder
- type Path
- type RelativeDurationCodec
- type StrCodec
- type UUIDCodec
Constants ¶
This section is empty.
Variables ¶
var ( // RelativeDurationID is the cal::relativeduration type descriptor ID RelativeDurationID = types.UUID{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x11} // DateDurationID is the cal::date_duration type descriptor ID DateDurationID = types.UUID{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x12} // UUIDID is the uuid type descriptor ID UUIDID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0} // StrID is the str type descriptor ID StrID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1} // BytesID is the bytes type descriptor ID BytesID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2} // Int16ID is the int16 type descriptor ID Int16ID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3} // Int32ID is the int32 type descriptor ID Int32ID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4} // Int64ID is the int64 type descriptor ID Int64ID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5} // Float32ID is the float32 type descriptor ID Float32ID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6} // Float64ID is the float64 type descriptor ID Float64ID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7} // DecimalID is the decimal type descriptor ID DecimalID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8} // BoolID is the bool type descriptor ID BoolID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9} // DateTimeID is the datetime type descriptor ID DateTimeID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x0a} // LocalDTID is the cal::local_datetime type descriptor ID LocalDTID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x0b} // LocalDateID is the cal::local_date type descriptor ID LocalDateID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x0c} // LocalTimeID is the cal::local_time type descriptor ID LocalTimeID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x0d} // DurationID is the duration type descriptor ID DurationID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x0e} // JSONID is the json type descriptor ID JSONID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x0f} // BigIntID is the bigint type descriptor ID BigIntID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x10} // MemoryID is the cfg::memory type descriptor ID MemoryID = types.UUID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0x30} // JSONBytes is a special case codec for json queries. // In go query json should return bytes not str. // but the descriptor type ID sent to the server // should still be str. JSONBytes = &BytesCodec{StrID} )
Functions ¶
func GetScalarDescriptor ¶ added in v0.13.0
func GetScalarDescriptor(desc descriptor.Descriptor) descriptor.Descriptor
GetScalarDescriptor finds the BaseScalar descriptor at the root of the inheritance chain for a Scalar descriptor.
Types ¶
type BigIntCodec ¶ added in v0.12.0
type BigIntCodec struct{}
BigIntCodec encodes/decodes *big.Int
func (*BigIntCodec) DescriptorID ¶ added in v0.12.0
func (c *BigIntCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*BigIntCodec) Type ¶ added in v0.12.0
func (c *BigIntCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type BoolCodec ¶ added in v0.12.0
type BoolCodec struct{}
BoolCodec encodes/decodes bool.
func (*BoolCodec) DescriptorID ¶ added in v0.12.0
DescriptorID returns the codecs descriptor id.
type BytesCodec ¶ added in v0.12.0
BytesCodec encodes/decodes []byte values.
func (*BytesCodec) DescriptorID ¶ added in v0.12.0
func (c *BytesCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*BytesCodec) Type ¶ added in v0.12.0
func (c *BytesCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type DateDurationCodec ¶ added in v0.12.0
type DateDurationCodec struct{}
DateDurationCodec encodes/decodes DateDuration values.
func (*DateDurationCodec) DescriptorID ¶ added in v0.12.0
func (c *DateDurationCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*DateDurationCodec) Encode ¶ added in v0.12.0
func (c *DateDurationCodec) Encode( w *buff.Writer, val interface{}, path Path, required bool, ) error
Encode encodes a value
func (*DateDurationCodec) Type ¶ added in v0.12.0
func (c *DateDurationCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type DateTimeCodec ¶ added in v0.12.0
type DateTimeCodec struct{}
DateTimeCodec encodes/decodes time.Time values.
func (*DateTimeCodec) DescriptorID ¶ added in v0.12.0
func (c *DateTimeCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*DateTimeCodec) Type ¶ added in v0.12.0
func (c *DateTimeCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type Decoder ¶ added in v0.6.0
Decoder can decode the data wire format into objects.
func BuildDecoder ¶ added in v0.6.0
func BuildDecoder( desc descriptor.Descriptor, typ reflect.Type, path Path, ) (Decoder, error)
BuildDecoder builds a Decoder from a Descriptor.
type DecoderField ¶ added in v0.6.0
type DecoderField struct {
// contains filtered or unexported fields
}
DecoderField is a link to a child decoder used by objects, named tuples and tuples.
type DurationCodec ¶ added in v0.12.0
type DurationCodec struct{}
DurationCodec encodes/decodes Duration values.
func (*DurationCodec) DescriptorID ¶ added in v0.12.0
func (c *DurationCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*DurationCodec) Type ¶ added in v0.12.0
func (c *DurationCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type Encoder ¶ added in v0.6.0
type Encoder interface {
DescriptorID() types.UUID
Encode(*buff.Writer, interface{}, Path, bool) error
}
Encoder can encode objects into the data wire format.
func BuildEncoder ¶ added in v0.6.0
func BuildEncoder( desc descriptor.Descriptor, version internal.ProtocolVersion, ) (Encoder, error)
BuildEncoder builds and Encoder from a Descriptor.
func BuildScalarEncoder ¶ added in v0.12.0
func BuildScalarEncoder(desc descriptor.Descriptor) (Encoder, error)
BuildScalarEncoder builds a scalar encoder.
type EncoderField ¶ added in v0.6.0
type EncoderField struct {
// contains filtered or unexported fields
}
EncoderField is a link to a child encoder used by objects, named tuples and tuples.
type Float32Codec ¶ added in v0.12.0
type Float32Codec struct{}
Float32Codec encodes/decodes float32.
func (*Float32Codec) DescriptorID ¶ added in v0.12.0
func (c *Float32Codec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*Float32Codec) Type ¶ added in v0.12.0
func (c *Float32Codec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type Float64Codec ¶ added in v0.12.0
type Float64Codec struct{}
Float64Codec encodes/decodes float64.
func (*Float64Codec) DescriptorID ¶ added in v0.12.0
func (c *Float64Codec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*Float64Codec) Type ¶ added in v0.12.0
func (c *Float64Codec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type Int16Codec ¶ added in v0.12.0
type Int16Codec struct{}
Int16Codec encodes/decodes int16.
func (*Int16Codec) DescriptorID ¶ added in v0.12.0
func (c *Int16Codec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*Int16Codec) Type ¶ added in v0.12.0
func (c *Int16Codec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type Int32Codec ¶ added in v0.12.0
type Int32Codec struct{}
Int32Codec encodes/decodes int32.
func (*Int32Codec) DescriptorID ¶ added in v0.12.0
func (c *Int32Codec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*Int32Codec) Type ¶ added in v0.12.0
func (c *Int32Codec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type Int64Codec ¶ added in v0.12.0
type Int64Codec struct{}
Int64Codec encodes/decodes int64.
func (*Int64Codec) DescriptorID ¶ added in v0.12.0
func (c *Int64Codec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*Int64Codec) Type ¶ added in v0.12.0
func (c *Int64Codec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type JSONCodec ¶ added in v0.12.0
type JSONCodec struct {
// contains filtered or unexported fields
}
JSONCodec encodes/decodes json.
func (*JSONCodec) DescriptorID ¶ added in v0.12.0
type LocalDateCodec ¶ added in v0.12.0
type LocalDateCodec struct{}
LocalDateCodec encodes/decodes LocalDate values.
func (*LocalDateCodec) DescriptorID ¶ added in v0.12.0
func (c *LocalDateCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*LocalDateCodec) Type ¶ added in v0.12.0
func (c *LocalDateCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type LocalDateTimeCodec ¶ added in v0.12.0
type LocalDateTimeCodec struct{}
LocalDateTimeCodec encodes/decodes LocalDateTime values.
func (*LocalDateTimeCodec) DescriptorID ¶ added in v0.12.0
func (c *LocalDateTimeCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*LocalDateTimeCodec) Encode ¶ added in v0.12.0
func (c *LocalDateTimeCodec) Encode( w *buff.Writer, val interface{}, path Path, required bool, ) error
Encode encodes a value
func (*LocalDateTimeCodec) Type ¶ added in v0.12.0
func (c *LocalDateTimeCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type LocalTimeCodec ¶ added in v0.12.0
type LocalTimeCodec struct{}
LocalTimeCodec encodes/decodes LocalTime values.
func (*LocalTimeCodec) DescriptorID ¶ added in v0.12.0
func (c *LocalTimeCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*LocalTimeCodec) Type ¶ added in v0.12.0
func (c *LocalTimeCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type MemoryCodec ¶ added in v0.12.0
type MemoryCodec struct{}
MemoryCodec encodes/decodes Memory values.
func (*MemoryCodec) DescriptorID ¶ added in v0.12.0
func (c *MemoryCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*MemoryCodec) Type ¶ added in v0.12.0
func (c *MemoryCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type OptionalDecoder ¶ added in v0.8.0
OptionalDecoder is used when decoding optional shape fields.
type Path ¶
type Path string
Path is used in error messages to show what field in a nested data structure caused the error.
type RelativeDurationCodec ¶ added in v0.12.0
type RelativeDurationCodec struct{}
RelativeDurationCodec encodes/decodes RelativeDuration values.
func (*RelativeDurationCodec) DescriptorID ¶ added in v0.12.0
func (c *RelativeDurationCodec) DescriptorID() types.UUID
DescriptorID returns the codecs descriptor id.
func (*RelativeDurationCodec) Encode ¶ added in v0.12.0
func (c *RelativeDurationCodec) Encode( w *buff.Writer, val interface{}, path Path, required bool, ) error
Encode encodes a value
func (*RelativeDurationCodec) Type ¶ added in v0.12.0
func (c *RelativeDurationCodec) Type() reflect.Type
Type returns the type the codec encodes/decodes
type StrCodec ¶ added in v0.12.0
StrCodec encodes/decodes strings.
func (*StrCodec) DescriptorID ¶ added in v0.12.0
DescriptorID returns the codecs descriptor id.
type UUIDCodec ¶ added in v0.12.0
type UUIDCodec struct{}
UUIDCodec encodes/decodes uuids.
func (*UUIDCodec) DescriptorID ¶ added in v0.12.0
DescriptorID returns the codecs descriptor id.