Ash Wilson | c8e6887 | 2014-09-16 10:36:56 -0400 | [diff] [blame] | 1 | package pagination |
| 2 | |
Ash Wilson | c8e6887 | 2014-09-16 10:36:56 -0400 | [diff] [blame] | 3 | // SinglePageBase may be embedded in a Page that contains all of the results from an operation at once. |
Ash Wilson | b8b16f8 | 2014-10-20 10:19:49 -0400 | [diff] [blame] | 4 | type SinglePageBase PageResult |
Ash Wilson | c8e6887 | 2014-09-16 10:36:56 -0400 | [diff] [blame] | 5 | |
| 6 | // NextPageURL always returns "" to indicate that there are no more pages to return. |
| 7 | func (current SinglePageBase) NextPageURL() (string, error) { |
| 8 | return "", nil |
| 9 | } |
Jon Perritt | db319f1 | 2015-02-17 19:32:40 -0700 | [diff] [blame^] | 10 | |
| 11 | // GetBody returns the single page's body. This method is needed to satisfy the |
| 12 | // Page interface. |
| 13 | func (current SinglePageBase) GetBody() interface{} { |
| 14 | return current.Body |
| 15 | } |