ripper

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: MIT Imports: 4 Imported by: 1

README

ripper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paginate

func Paginate(p *PaginateParams, pageToken string, totalSize int64) (offset int, limit int, nextPageToken string, err error)

Paginate the results by page_token, returns offset, limit and next_page_token.

func SetDefaultPageSize

func SetDefaultPageSize(pageSize int) bool

SetDefaultPageSize sets the default value of pageSize.

func SetMaxPageSize

func SetMaxPageSize(pageSize int) bool

SetMaxPageSize sets the max limit to pageSize.

Types

type IPaginateParams

type IPaginateParams interface {
	GetParent() string
	GetPageSize() int32
	GetPageToken() string
	GetOrderBy() string
	GetFilter() string
}

IPaginateParams is an interface for paginate params.

type PaginateParams

type PaginateParams struct {
	Page     int
	Parent   string
	PageSize int
	OrderBy  string
	Filter   string
}

PaginateParams is the request params for pagination.

func Itop

func Itop(i IPaginateParams) (p *PaginateParams)

Itop converts IPaginateParams to PaginateParams.

func NewPaginateParams

func NewPaginateParams(page int, parent string, pageSize int, orderBy string, filter string) *PaginateParams

NewPaginateParams returns a PaginateParams pointer.

type PaginationError added in v0.2.0

type PaginationError interface {
	error
	Field() string
	// contains filtered or unexported methods
}

PaginationError is an interface for pagination error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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