definition

package
v0.75.7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromProto

func FromProto(protoConfig *vegapb.DataSourceDefinition, tm *time.Time) (common.DataSourceType, error)

FromProto tries to build the Definiition object from the given proto object.

Types

type ContentType

type ContentType int32
const (
	ContentTypeInvalid ContentType = iota
	ContentTypeOracle
	ContentTypeEthOracle
	ContentTypeInternalTimeTermination
	ContentTypeInternalTimeTriggerTermination
)

type Definition

type Definition struct {
	common.DataSourceType
}

func New

func New(tp ContentType) *Definition

New creates a new EMPTY Definition object. TODO: eth oracle type too.

func NewWith

func NewWith(dst common.DataSourceType) *Definition

func (*Definition) Content

func (s *Definition) Content() interface{}

func (Definition) DeepClone

func (s Definition) DeepClone() common.DataSourceType

DeepClone returns a clone of the Definition object.

func (*Definition) EnsureValidChainID added in v0.74.0

func (s *Definition) EnsureValidChainID(ids []uint64) bool

func (*Definition) GetEthCallSpec

func (s *Definition) GetEthCallSpec() ethcallcommon.Spec

GetEthCallSpec returns the base object - EthCallSpec from the Definition.

func (*Definition) GetFilters

func (s *Definition) GetFilters() []*common.SpecFilter

GetFilters tries to get the filters from the Definition if they exist.

func (*Definition) GetInternalTimeTriggerSpecConfiguration

func (s *Definition) GetInternalTimeTriggerSpecConfiguration() timetrigger.SpecConfiguration

func (*Definition) GetSignedOracleSpecConfiguration

func (s *Definition) GetSignedOracleSpecConfiguration() signedoracle.SpecConfiguration

GetSignedOracleSpecConfiguration returns the base object - vega oracle SpecConfiguration from the Definition.

func (*Definition) GetSigners

func (s *Definition) GetSigners() []*common.Signer

GetSigners tries to get the signers from the Definition if they exist.

func (*Definition) GetSpecConfiguration

func (s *Definition) GetSpecConfiguration() common.DataSourceType

func (*Definition) GetTimeTriggers

func (s *Definition) GetTimeTriggers() common.InternalTimeTriggers

Definition is also a `Timer`.

func (*Definition) GetVegaTimeSpecConfiguration

func (s *Definition) GetVegaTimeSpecConfiguration() vegatime.SpecConfiguration

func (*Definition) IntoProto

func (s *Definition) IntoProto() *vegapb.DataSourceDefinition

IntoProto returns the proto object from Definition that is - vegapb.DataSourceDefinition that may have external or internal SourceType. Returns the whole proto object.

func (*Definition) IsEthCallSpec

func (s *Definition) IsEthCallSpec() bool

func (*Definition) IsExternal

func (s *Definition) IsExternal() (bool, error)

func (*Definition) IsTriggered

func (s *Definition) IsTriggered(tm time.Time) bool

func (*Definition) SetFilterDecimals

func (s *Definition) SetFilterDecimals(d uint64) *Definition

func (*Definition) SetOracleConfig

func (s *Definition) SetOracleConfig(oc common.DataSourceType) *Definition

SetOracleConfig sets a given oracle config in the receiver. If the receiver is not external oracle type data source - it is not changed. This method does not care about object previous contents.

func (*Definition) SetTimeTriggerConditionConfig

func (s *Definition) SetTimeTriggerConditionConfig(c []*common.SpecCondition) *Definition

SetTimeTriggerConditionConfig sets a given conditions config in the receiver. If the receiver is not a time triggered data source - it does not set anything to it. This method does not care about object previous contents.

func (*Definition) SetTimeTriggerTriggersConfig

func (s *Definition) SetTimeTriggerTriggersConfig(tr common.InternalTimeTriggers) *Definition

func (Definition) String

func (s Definition) String() string

func (*Definition) Type

func (s *Definition) Type() (ContentType, bool)

func (*Definition) UpdateFilters

func (s *Definition) UpdateFilters(filters []*common.SpecFilter) error

UpdateFilters updates the Definition Filters.

Jump to

Keyboard shortcuts

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