iterator

package
v0.0.0-...-045564c Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDCIterator

type CDCIterator struct {
	// contains filtered or unexported fields
}

A CDCIterator represents a struct of cdc iterator.

func NewCDCIterator

func NewCDCIterator(stripeSvc Stripe, pos *position.Position) *CDCIterator

NewCDCIterator initializes cdc iterator.

func (*CDCIterator) Next

func (iter *CDCIterator) Next() (sdk.Record, error)

Next returns the next record.

type Interface

type Interface interface {
	Next() (sdk.Record, error)
}

An Interface defines the interface to iterator methods.

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

An Iterator represents a struct of iterator.

func NewIterator

func NewIterator(stripeSvc Stripe, pos *position.Position) *Iterator

NewIterator initializes an iterator.

func (*Iterator) Next

func (iter *Iterator) Next() (sdk.Record, error)

Next returns the next record.

type SnapshotIterator

type SnapshotIterator struct {
	// contains filtered or unexported fields
}

A SnapshotIterator represents a struct of snapshot iterator.

func NewSnapshotIterator

func NewSnapshotIterator(stripeSvc Stripe, pos *position.Position) *SnapshotIterator

NewSnapshotIterator initializes snapshot iterator.

func (*SnapshotIterator) Next

func (iter *SnapshotIterator) Next() (sdk.Record, error)

Next returns the next record. Note: The `Snapshot` iterator creates a copy of the data, which is sorted by date of creation in descending order.

type Stripe

type Stripe interface {
	GetResource(string) (models.ResourceResponse, error)
	GetEvent(createdAt int64, startingAfter, endingBefore string) (models.EventResponse, error)
}

A Stripe defines the interface of methods.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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