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 MapKeyPath
- type MapLocation
- type MapReference
- type MapRelation
- type MapSequence
- 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 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 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