position

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Position

type Position struct {
	// IteratorType is the type of the current iterator.
	IteratorType models.IteratorType `json:"iterator_type" validate:"required,iterator_type"`

	// CreatedAt is the Unix time from which the system should receive events of the resource in the CDC iterator.
	CreatedAt int64 `json:"created_at" validate:"required"`

	// Cursor is the resource or event identifier for receiving shifted data in the following requests.
	Cursor string `json:"cursor"`

	// Index is the current index of the returning record from the batch of previously received resources.
	Index int `json:"index"`
}

A Position represents a Stripe position.

func ParseSDKPosition

func ParseSDKPosition(rp sdk.Position) (Position, error)

ParseSDKPosition unmarshal sdk.Position and returns Position.

func (Position) FormatSDKPosition

func (p Position) FormatSDKPosition() (sdk.Position, error)

FormatSDKPosition marshals Position and returns sdk.Position.

func (Position) Validate

func (p Position) Validate() error

Validate validates position fields.

Jump to

Keyboard shortcuts

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