MCPcopy Create free account
hub / github.com/plexdrive/plexdrive / StoreStartPageToken

Method StoreStartPageToken

drive/cache.go:302–315  ·  view source on GitHub ↗

StoreStartPageToken stores the page token for changes

(token string)

Source from the content-addressed store, hash-verified

300
301// StoreStartPageToken stores the page token for changes
302func (c *Cache) StoreStartPageToken(token string) error {
303 Log.Debugf("Storing page token %v in cache", token)
304 err := c.db.Update(func(tx *bolt.Tx) error {
305 b := tx.Bucket(bPageToken)
306 return b.Put([]byte("t"), []byte(token))
307 })
308
309 if nil != err {
310 Log.Debugf("%v", err)
311 return fmt.Errorf("Could not store token %v", token)
312 }
313
314 return nil
315}
316
317// GetStartPageToken gets the start page token
318func (c *Cache) GetStartPageToken() (string, error) {

Callers 1

checkChangesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected