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

Method GetStartPageToken

drive/cache.go:318–334  ·  view source on GitHub ↗

GetStartPageToken gets the start page token

()

Source from the content-addressed store, hash-verified

316
317// GetStartPageToken gets the start page token
318func (c *Cache) GetStartPageToken() (string, error) {
319 var pageToken string
320
321 Log.Debugf("Getting start page token from cache")
322 c.db.View(func(tx *bolt.Tx) error {
323 b := tx.Bucket(bPageToken)
324 v := b.Get([]byte("t"))
325 pageToken = string(v)
326 return nil
327 })
328 if pageToken == "" {
329 return "", fmt.Errorf("Could not get token from cache, token is empty")
330 }
331
332 Log.Tracef("Got start page token %v", pageToken)
333 return pageToken, nil
334}

Callers 1

checkChangesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected