newSet create new Set object
(txn *Transaction, key []byte)
| 91 | |
| 92 | //newSet create new Set object |
| 93 | func newSet(txn *Transaction, key []byte) *Set { |
| 94 | now := Now() |
| 95 | return &Set{ |
| 96 | txn: txn, |
| 97 | key: key, |
| 98 | meta: &SetMeta{ |
| 99 | Object: Object{ |
| 100 | ID: UUID(), |
| 101 | CreatedAt: now, |
| 102 | UpdatedAt: now, |
| 103 | ExpireAt: 0, |
| 104 | Type: ObjectSet, |
| 105 | Encoding: ObjectEncodingHT, |
| 106 | }, |
| 107 | Len: 0, |
| 108 | }, |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | //encodeSetMeta encodes meta data into byte slice |
| 113 | func encodeSetMeta(meta *SetMeta) []byte { |