requestiterator

package
v2.45.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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