Documentation
¶
Index ¶
Constants ¶
View Source
const ( EncodeTypeHmSET = 1 EncodeTypeRedisArg = 2 EncodeTypeInsertData = 3 EncodeTypeInsertDatas = 4 EncodeTypeReplaceData = 5 EncodeTypeReplaceDatas = 6 EncodeTypeUpdateData = 7 )
Variables ¶
View Source
var ( DefaultTag = "orm" DefaultCodec = NewDefaultCodec(jsonMarshal, jsonUnmarshal, DefaultTag, true, true, true) )
View Source
var DefaultMap2Structure = &Map2Structure{DefaultTag, true, true}
Functions ¶
Types ¶
type Codec ¶
type Codec interface {
SetMarshal(m Marshal, um Unmarshal) // marshal/unmarshal for single item
GetMarshal() Marshal // get marshal
GetUnmarshal() Unmarshal // get unmarshal
SetTag(tag string) // set tag
GetTag() string // get tag
Encode(typ int, v interface{}) (interface{}, error) // encode
Decode(typ int, src interface{}, dest []interface{}) error // decode
}
type Map2Structure ¶
type Map2Structure struct {
// contains filtered or unexported fields
}
func (*Map2Structure) Decode ¶
func (m *Map2Structure) Decode(src, dest interface{}) error
Click to show internal directories.
Click to hide internal directories.