readcontract

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	// Config corresponds to the JSON schema field "Config".
	Config *Config `json:"Config,omitempty" yaml:"Config,omitempty" mapstructure:"Config,omitempty"`

	// Inputs corresponds to the JSON schema field "Inputs".
	Inputs *Input `json:"Inputs,omitempty" yaml:"Inputs,omitempty" mapstructure:"Inputs,omitempty"`

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

type ActionInput

type ActionInput struct {
	ConfidenceLevel sdk.CapDefinition[string]
	Params          sdk.CapDefinition[InputParams]
}

func (ActionInput) ToSteps

func (input ActionInput) ToSteps() sdk.StepInputs

type Config

type Config struct {
	// ContractAddress corresponds to the JSON schema field "ContractAddress".
	ContractAddress string `json:"ContractAddress" yaml:"ContractAddress" mapstructure:"ContractAddress"`

	// ContractName corresponds to the JSON schema field "ContractName".
	ContractName string `json:"ContractName" yaml:"ContractName" mapstructure:"ContractName"`

	// ContractReaderConfig corresponds to the JSON schema field
	// "ContractReaderConfig".
	ContractReaderConfig string `json:"ContractReaderConfig" yaml:"ContractReaderConfig" mapstructure:"ContractReaderConfig"`

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

func (Config) New

func (cfg Config) New(w *sdk.WorkflowSpecFactory, ref string, input ActionInput) OutputCap

func (*Config) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler.

type Input

type Input struct {
	// ConfidenceLevel corresponds to the JSON schema field "ConfidenceLevel".
	ConfidenceLevel string `json:"ConfidenceLevel" yaml:"ConfidenceLevel" mapstructure:"ConfidenceLevel"`

	// Params corresponds to the JSON schema field "Params".
	Params InputParams `json:"Params" yaml:"Params" mapstructure:"Params"`
}

func (*Input) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler.

type InputParams

type InputParams map[string]interface{}

type Output

type Output struct {
	// LatestValue corresponds to the JSON schema field "LatestValue".
	LatestValue interface{} `json:"LatestValue" yaml:"LatestValue" mapstructure:"LatestValue"`
}

func (*Output) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler.

type OutputCap

type OutputCap interface {
	sdk.CapDefinition[Output]
	LatestValue() sdk.CapDefinition[any]
	// contains filtered or unexported methods
}

func ConstantOutput

func ConstantOutput(value Output) OutputCap

func NewOutputFromFields

func NewOutputFromFields(
	latestValue sdk.CapDefinition[any]) OutputCap

func OutputWrapper

func OutputWrapper(raw sdk.CapDefinition[Output]) OutputCap

OutputWrapper allows access to field from an sdk.CapDefinition[Output]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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