view

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultView

type DefaultView struct {
	Paginator *paginator.Paginator
	Proximity int
}

DefaultView viewer interface implementation The paginator will look like the one from google

func New

func New(p *paginator.Paginator) DefaultView

New DefaultView constructor

func (DefaultView) Current

func (v DefaultView) Current() int

Current returns current page number

func (DefaultView) Last

func (v DefaultView) Last() int

Last returns last page number

func (DefaultView) Next

func (v DefaultView) Next() int

Next returns next page number or zero if current page is the last page

func (DefaultView) Pages

func (v DefaultView) Pages() []int

Pages returns the list of pages

func (DefaultView) Prev

func (v DefaultView) Prev() int

Prev returns previous page number or zero if current page is first page

type Viewer

type Viewer interface {
	Pages() []int
}

Viewer interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL