(dataStore base.DataStore, docID string, expirySecs int)
| 39 | } |
| 40 | |
| 41 | func getWithTouch(dataStore base.DataStore, docID string, expirySecs int) ([]byte, error) { |
| 42 | var rawDocBytes []byte |
| 43 | var err error |
| 44 | if expirySecs > 0 { |
| 45 | expiry := base.SecondsToCbsExpiry(expirySecs) |
| 46 | rawDocBytes, _, err = dataStore.GetAndTouchRaw(docID, expiry) |
| 47 | } else { |
| 48 | rawDocBytes, _, err = dataStore.GetRaw(docID) |
| 49 | } |
| 50 | if err != nil { |
| 51 | return nil, err |
| 52 | } |
| 53 | return rawDocBytes, nil |
| 54 | } |
| 55 | |
| 56 | func getSpecialBytes(dataStore base.DataStore, doctype string, docID string, localDocExpirySecs int) ([]byte, error) { |
| 57 | key := RealSpecialDocID(doctype, docID) |
no test coverage detected