Documentation ¶
Index ¶
- Variables
- func Encode(v interface{}) ([]byte, error)
- func New(obj *Object) []byte
- func Sort(obj []Object) func(i, j int) bool
- type Object
- func Decode(data []byte) (Object, error)
- func DecodeFromReader(r io.Reader) (Object, error)
- func DecodeList(data []byte) ([]Object, error)
- func DecodeListData(objects []Object) ([]Object, error)
- func DecodeListFromReader(r io.Reader) ([]Object, error)
- func DecodeListRaw(data []byte) ([]Object, error)
- func DecodeRaw(data []byte) (Object, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyObject = []byte(`{ "created": 0, "updated": 0, "index": "", "data": "e30=" }`)
EmptyObject byte array value
Functions ¶
Types ¶
type Object ¶
type Object struct { Created int64 `json:"created"` Updated int64 `json:"updated"` Index string `json:"index"` Data string `json:"data"` }
Object : data structure of elements
func DecodeFromReader ¶
DecodeFromReader object from io reader
func DecodeListData ¶
DecodeListData will decode the data field in an objects list
func DecodeListFromReader ¶
DecodeListFromReader objects from io reader
Click to show internal directories.
Click to hide internal directories.