Documentation ¶
Index ¶
- func MapFrom(i interface{}, fromMapper FromMapper) error
- func ParseLiteral(i interface{}) interface{}
- func ToMap(mapper ToMapper) map[string]interface{}
- type FromMapper
- type JSONRecord
- type MapACLEntry
- type MapAsset
- type MapData
- type MapFieldACLEntry
- type MapGeometry
- type MapKeyPath
- type MapLocation
- type MapReference
- type MapRelation
- type MapSequence
- type MapTime
- type MapUnknown
- 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 ParseLiteral ¶
func ParseLiteral(i interface{}) interface{}
ParseLiteral deduces whether i is a skydb data value and returns a parsed value.
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) FromMap ¶
func (record *JSONRecord) FromMap(m map[string]interface{}) error
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 MapACLEntry ¶
type MapACLEntry skydb.RecordACLEntry
func (*MapACLEntry) FromMap ¶
func (ace *MapACLEntry) FromMap(m map[string]interface{}) error
FromMap initializes a RecordACLEntry from a unmarshalled JSON of access control definition
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 MapFieldACLEntry ¶ added in v1.1.0
type MapFieldACLEntry skydb.FieldACLEntry
func (*MapFieldACLEntry) FromMap ¶ added in v1.1.0
func (ace *MapFieldACLEntry) FromMap(m map[string]interface{}) error
FromMap initializes a FieldACLEntry from a unmarshalled JSON of field access control definition
type MapGeometry ¶ added in v0.23.0
MapGeometry is skydb.Geometry that can be converted from and to a map.
func (*MapGeometry) FromMap ¶ added in v0.23.0
func (geom *MapGeometry) FromMap(m map[string]interface{}) error
FromMap implements FromMapper
func (MapGeometry) ToMap ¶ added in v0.23.0
func (geom MapGeometry) ToMap(m map[string]interface{})
ToMap implements ToMapper
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
type MapSequence ¶
type MapSequence struct{}
MapSequence is skydb.Sequence that can convert to map
func (MapSequence) ToMap ¶
func (seq MapSequence) ToMap(m map[string]interface{})
ToMap implements ToMapper
type MapTime ¶
MapTime is time.Time that can be converted from and to a map.
type MapUnknown ¶ added in v0.20.0
MapUnknown is skydb.Unknown that can convert to map
func (*MapUnknown) FromMap ¶ added in v0.20.0
func (val *MapUnknown) FromMap(m map[string]interface{}) error
FromMap implements FromMapper
func (MapUnknown) ToMap ¶ added in v0.20.0
func (val MapUnknown) ToMap(m map[string]interface{})
ToMap implements ToMapper