Skip to content

Commit 883c829

Browse files
committed
add bytes in snapshot to get raw data
1 parent f9be571 commit 883c829

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

snapshots.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ func (snapshot *DataSnapshot) Val(v interface{}) error {
3131
return json.NewDecoder(bytes.NewReader(snapshot.raw)).Decode(v)
3232
}
3333

34+
// Bytes returns snapshot raw data
35+
func (snapshot *DataSnapshot) Bytes() []byte {
36+
return snapshot.raw
37+
}
38+
3439
// ChildSnapshot type
3540
type ChildSnapshot struct {
3641
PrevChildKey string

0 commit comments

Comments
 (0)