requestiterator

package
v2.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestIterator

type RequestIterator struct {
	Logger         *logger.Logger
	Request        c8y.RequestOptions
	Path           iterator.Iterator
	Query          iterator.Iterator
	InputIterators flags.RequestInputIterators
	Body           interface{}
	PostActions    []flags.Action
	// contains filtered or unexported fields
}

RequestIterator iterates through a c8y rest request with given request options and path iterators

func NewRequestIterator

func NewRequestIterator(customLogger *logger.Logger, r c8y.RequestOptions, path iterator.Iterator, query iterator.Iterator, body interface{}) *RequestIterator

NewRequestIterator returns an iterator that can be used to send multiple requests until the give iterators in the path/body are exhausted

func (*RequestIterator) GetNext

func (r *RequestIterator) GetNext() (*c8y.RequestOptions, interface{}, error)

GetNext return the next request. If error is io.EOF then the iterator is finished

func (*RequestIterator) HasNext

func (r *RequestIterator) HasNext() bool

HasNext returns true if there the iterator is finished

Jump to

Keyboard shortcuts

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