Documentation ¶
Index ¶
- func MapFrom(i interface{}, fromMapper FromMapper) error
- func ParseInterface(i interface{}) interface{}
- func ToMap(mapper ToMapper) map[string]interface{}
- type FromMapper
- type JSONRecord
- type MapAsset
- type MapData
- type MapKeyPath
- type MapLocation
- type MapReference
- type MapRelation
- type MapTime
- type ToMapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapFrom ¶
func MapFrom(i interface{}, fromMapper FromMapper) error
MapFrom tries to map a map to a FromMapper
func ParseInterface ¶
func ParseInterface(i interface{}) interface{}
ParseInterface deduces whether i is a skydb data value and returns a parsed value.
FIXME(limouren): this function is public because RecordQueryHandler needs it to parse predicate's expression
Types ¶
type FromMapper ¶
FromMapper defines whether a type can be converted from a map
type JSONRecord ¶
JSONRecord defines a common serialization format for skydb.Record
func (*JSONRecord) MarshalJSON ¶
func (record *JSONRecord) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*JSONRecord) UnmarshalJSON ¶
func (record *JSONRecord) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements json.Unmarshaler
type MapAsset ¶
MapAsset is skydb.Asset that can be converted from and to a map.
type MapData ¶
type MapData map[string]interface{}
MapData is record data that can be converted from a map
type MapKeyPath ¶
type MapKeyPath string
MapKeyPath is string keypath that can be converted from a map
func (*MapKeyPath) FromMap ¶
func (p *MapKeyPath) FromMap(m map[string]interface{}) error
FromMap implements FromMapper
func (MapKeyPath) ToMap ¶
func (p MapKeyPath) ToMap(m map[string]interface{})
ToMap implements ToMapper
type MapLocation ¶
MapLocation is skydb.Location that can be converted from and to a map.
func (*MapLocation) FromMap ¶
func (loc *MapLocation) FromMap(m map[string]interface{}) error
FromMap implements FromMapper
func (MapLocation) ToMap ¶
func (loc MapLocation) ToMap(m map[string]interface{})
ToMap implements ToMapper
type MapReference ¶
MapReference is skydb.Reference that can be converted from and to a map.
func (*MapReference) FromMap ¶
func (ref *MapReference) FromMap(m map[string]interface{}) error
FromMap implements FromMapper
func (MapReference) ToMap ¶
func (ref MapReference) ToMap(m map[string]interface{})
ToMap implements ToMapper
type MapRelation ¶
MapRelation is a type specifying a relation between two users, but do not conform to any actual struct in skydb.
func (*MapRelation) FromMap ¶
func (rel *MapRelation) FromMap(m map[string]interface{}) error
FromMap implements FromMapper
func (*MapRelation) ToMap ¶
func (rel *MapRelation) ToMap(m map[string]interface{})
ToMap implements ToMapper