streams

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 5 Imported by: ? modules, 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 Feed

type Feed struct {
	// Metadata corresponds to the JSON schema field "Metadata".
	Metadata SignersMetadata `json:"Metadata" yaml:"Metadata" mapstructure:"Metadata"`

	// Payload corresponds to the JSON schema field "Payload".
	Payload []FeedReport `json:"Payload" yaml:"Payload" mapstructure:"Payload"`

	// Timestamp corresponds to the JSON schema field "Timestamp".
	Timestamp int64 `json:"Timestamp" yaml:"Timestamp" mapstructure:"Timestamp"`
}

func (*Feed) UnmarshalJSON

func (j *Feed) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FeedCap

type FeedCap interface {
	sdk.CapDefinition[Feed]
	Metadata() SignersMetadataCap
	Payload() sdk.CapDefinition[[]FeedReport]
	Timestamp() sdk.CapDefinition[int64]
	// contains filtered or unexported methods
}

func ConstantFeed added in v0.4.0

func ConstantFeed(value Feed) FeedCap

func FeedWrapper added in v0.4.0

func FeedWrapper(raw sdk.CapDefinition[Feed]) FeedCap

FeedWrapper allows access to field from an sdk.CapDefinition[Feed]

func NewFeedFromFields

func NewFeedFromFields(
	metadata SignersMetadataCap,
	payload sdk.CapDefinition[[]FeedReport],
	timestamp sdk.CapDefinition[int64]) FeedCap

type FeedId

type FeedId string

The ID of the data feed.

func (*FeedId) UnmarshalJSON

func (j *FeedId) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FeedIdCap

type FeedIdCap sdk.CapDefinition[FeedId]

func FeedIdWrapper added in v0.4.0

func FeedIdWrapper(raw sdk.CapDefinition[FeedId]) FeedIdCap

FeedIdWrapper allows access to field from an sdk.CapDefinition[FeedId]

type FeedReport

type FeedReport struct {
	// BenchmarkPrice corresponds to the JSON schema field "BenchmarkPrice".
	BenchmarkPrice []uint8 `json:"BenchmarkPrice" yaml:"BenchmarkPrice" mapstructure:"BenchmarkPrice"`

	// FeedID corresponds to the JSON schema field "FeedID".
	FeedID FeedId `json:"FeedID" yaml:"FeedID" mapstructure:"FeedID"`

	// FullReport corresponds to the JSON schema field "FullReport".
	FullReport []uint8 `json:"FullReport" yaml:"FullReport" mapstructure:"FullReport"`

	// ObservationTimestamp corresponds to the JSON schema field
	// "ObservationTimestamp".
	ObservationTimestamp int64 `json:"ObservationTimestamp" yaml:"ObservationTimestamp" mapstructure:"ObservationTimestamp"`

	// ReportContext corresponds to the JSON schema field "ReportContext".
	ReportContext []uint8 `json:"ReportContext" yaml:"ReportContext" mapstructure:"ReportContext"`

	// Signatures corresponds to the JSON schema field "Signatures".
	Signatures [][]uint8 `json:"Signatures" yaml:"Signatures" mapstructure:"Signatures"`
}

func (*FeedReport) UnmarshalJSON

func (j *FeedReport) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FeedReportCap

type FeedReportCap interface {
	sdk.CapDefinition[FeedReport]
	BenchmarkPrice() sdk.CapDefinition[[]uint8]
	FeedID() FeedIdCap
	FullReport() sdk.CapDefinition[[]uint8]
	ObservationTimestamp() sdk.CapDefinition[int64]
	ReportContext() sdk.CapDefinition[[]uint8]
	Signatures() sdk.CapDefinition[[][]uint8]
	// contains filtered or unexported methods
}

func ConstantFeedReport added in v0.4.0

func ConstantFeedReport(value FeedReport) FeedReportCap

func FeedReportWrapper added in v0.4.0

func FeedReportWrapper(raw sdk.CapDefinition[FeedReport]) FeedReportCap

FeedReportWrapper allows access to field from an sdk.CapDefinition[FeedReport]

func NewFeedReportFromFields

func NewFeedReportFromFields(
	benchmarkPrice sdk.CapDefinition[[]uint8],
	feedID FeedIdCap,
	fullReport sdk.CapDefinition[[]uint8],
	observationTimestamp sdk.CapDefinition[int64],
	reportContext sdk.CapDefinition[[]uint8],
	signatures sdk.CapDefinition[[][]uint8]) FeedReportCap

type SignersMetadata

type SignersMetadata struct {
	// MinRequiredSignatures corresponds to the JSON schema field
	// "MinRequiredSignatures".
	MinRequiredSignatures int64 `json:"MinRequiredSignatures" yaml:"MinRequiredSignatures" mapstructure:"MinRequiredSignatures"`

	// Signers corresponds to the JSON schema field "Signers".
	Signers []string `json:"Signers" yaml:"Signers" mapstructure:"Signers"`
}

func (*SignersMetadata) UnmarshalJSON

func (j *SignersMetadata) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SignersMetadataCap

type SignersMetadataCap interface {
	sdk.CapDefinition[SignersMetadata]
	MinRequiredSignatures() sdk.CapDefinition[int64]
	Signers() sdk.CapDefinition[[]string]
	// contains filtered or unexported methods
}

func ConstantSignersMetadata added in v0.4.0

func ConstantSignersMetadata(value SignersMetadata) SignersMetadataCap

func NewSignersMetadataFromFields

func NewSignersMetadataFromFields(
	minRequiredSignatures sdk.CapDefinition[int64],
	signers sdk.CapDefinition[[]string]) SignersMetadataCap

func SignersMetadataWrapper added in v0.4.0

func SignersMetadataWrapper(raw sdk.CapDefinition[SignersMetadata]) SignersMetadataCap

SignersMetadataWrapper allows access to field from an sdk.CapDefinition[SignersMetadata]

type Trigger

type Trigger struct {
	// Config corresponds to the JSON schema field "config".
	Config TriggerConfig `json:"config" yaml:"config" mapstructure:"config"`

	// Outputs corresponds to the JSON schema field "outputs".
	Outputs *Feed `json:"outputs,omitempty" yaml:"outputs,omitempty" mapstructure:"outputs,omitempty"`
}

Streams Trigger

func (*Trigger) UnmarshalJSON

func (j *Trigger) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TriggerConfig

type TriggerConfig struct {
	// The IDs of the data feeds that will have their reports included in the trigger
	// event.
	FeedIds []FeedId `json:"feedIds" yaml:"feedIds" mapstructure:"feedIds"`

	// The interval in seconds after which a new trigger event is generated.
	MaxFrequencyMs uint64 `json:"maxFrequencyMs" yaml:"maxFrequencyMs" mapstructure:"maxFrequencyMs"`
}

func (TriggerConfig) New

func (*TriggerConfig) UnmarshalJSON

func (j *TriggerConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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