chainreader

package
v0.3.1-beholder Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoBindings = errors.New("no bindings found")
)

Functions

This section is empty.

Types

type BatchGetLatestValuesRequestByCustomID

type BatchGetLatestValuesRequestByCustomID map[string]types.ContractBatch

type BatchGetLatestValuesResultByCustomID

type BatchGetLatestValuesResultByCustomID map[string]types.ContractBatchResults

type ContractReaderByIDs

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

ContractReaderByIDs wraps types.ContractReader to allow the caller to set custom contractIDs with Bind.

func WrapContractReaderByIDs

func WrapContractReaderByIDs(contractReader types.ContractReader) ContractReaderByIDs

WrapContractReaderByIDs returns types.ContractReader behind ContractReaderByIDs interface.

func (*ContractReaderByIDs) BatchGetLatestValues

func (*ContractReaderByIDs) Bind

func (crByIds *ContractReaderByIDs) Bind(ctx context.Context, bindings map[string]types.BoundContract) error

Bind accepts a map of bound contracts where map keys are custom contractIDs which will be used by the wrapper to reference contracts.

func (*ContractReaderByIDs) GetLatestValue

func (crByIds *ContractReaderByIDs) GetLatestValue(ctx context.Context, contractID, readName string, confidenceLevel primitives.ConfidenceLevel, params, returnVal any) error

func (*ContractReaderByIDs) QueryKey

func (crByIds *ContractReaderByIDs) QueryKey(ctx context.Context, contractID string, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType any) ([]types.Sequence, error)

func (*ContractReaderByIDs) Unbind

func (crByIds *ContractReaderByIDs) Unbind(ctx context.Context, bindings map[string]types.BoundContract) error

Jump to

Keyboard shortcuts

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