listresponse

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package listresponse covers all functionality to handle an API response in list format, but as well provides access to the hash format

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListResponse

type ListResponse struct {
	*hashresponse.HashResponse
	// contains filtered or unexported fields
}

ListResponse class provides extra functionality to work with API responses. It provides methods that are useful for data representation in table format. In general the apiconnector Client always returns this type of response to be as flexible as possible.

func NewListResponse

func NewListResponse(r string) *ListResponse

NewListResponse represents the constructor for struct ListResponse

func (*ListResponse) Current

func (lr *ListResponse) Current() []string

Current method to return current row

func (*ListResponse) GetList

func (lr *ListResponse) GetList() [][]string

GetList method to return the list of available rows

func (*ListResponse) HasNext

func (lr *ListResponse) HasNext() bool

HasNext method to check if there's a further row after current row

func (*ListResponse) HasPrevious

func (lr *ListResponse) HasPrevious() bool

HasPrevious method to check if there is a row available before current row.

func (*ListResponse) Next

func (lr *ListResponse) Next() []string

Next method to access next row. Use HasNext method before.

func (*ListResponse) Previous

func (lr *ListResponse) Previous() []string

Previous method to access previous row. Use HasPrevious method before.

func (*ListResponse) Rewind

func (lr *ListResponse) Rewind()

Rewind method to reset the iterator index

Jump to

Keyboard shortcuts

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