presenters

package
v2.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 39 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockHeaderFeederSpec

type BlockHeaderFeederSpec struct {
	CoordinatorV1Address       *ethkey.EIP55Address  `json:"coordinatorV1Address"`
	CoordinatorV2Address       *ethkey.EIP55Address  `json:"coordinatorV2Address"`
	CoordinatorV2PlusAddress   *ethkey.EIP55Address  `json:"coordinatorV2PlusAddress"`
	WaitBlocks                 int32                 `json:"waitBlocks"`
	LookbackBlocks             int32                 `json:"lookbackBlocks"`
	BlockhashStoreAddress      ethkey.EIP55Address   `json:"blockhashStoreAddress"`
	BatchBlockhashStoreAddress ethkey.EIP55Address   `json:"batchBlockhashStoreAddress"`
	PollPeriod                 time.Duration         `json:"pollPeriod"`
	RunTimeout                 time.Duration         `json:"runTimeout"`
	EVMChainID                 *utils.Big            `json:"evmChainID"`
	FromAddresses              []ethkey.EIP55Address `json:"fromAddresses"`
	GetBlockhashesBatchSize    uint16                `json:"getBlockhashesBatchSize"`
	StoreBlockhashesBatchSize  uint16                `json:"storeBlockhashesBatchSize"`

	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

BlockHeaderFeederSpec defines the job parameters for a blcok header feeder job.

func NewBlockHeaderFeederSpec

func NewBlockHeaderFeederSpec(spec *job.BlockHeaderFeederSpec) *BlockHeaderFeederSpec

NewBlockHeaderFeederSpec creates a new BlockHeaderFeederSpec for the given parameters.

type BlockhashStoreSpec

type BlockhashStoreSpec struct {
	CoordinatorV1Address     *ethkey.EIP55Address  `json:"coordinatorV1Address"`
	CoordinatorV2Address     *ethkey.EIP55Address  `json:"coordinatorV2Address"`
	CoordinatorV2PlusAddress *ethkey.EIP55Address  `json:"coordinatorV2PlusAddress"`
	WaitBlocks               int32                 `json:"waitBlocks"`
	LookbackBlocks           int32                 `json:"lookbackBlocks"`
	BlockhashStoreAddress    ethkey.EIP55Address   `json:"blockhashStoreAddress"`
	PollPeriod               time.Duration         `json:"pollPeriod"`
	RunTimeout               time.Duration         `json:"runTimeout"`
	EVMChainID               *utils.Big            `json:"evmChainID"`
	FromAddresses            []ethkey.EIP55Address `json:"fromAddresses"`
	CreatedAt                time.Time             `json:"createdAt"`
	UpdatedAt                time.Time             `json:"updatedAt"`
}

BlockhashStoreSpec defines the job parameters for a blockhash store feeder job.

func NewBlockhashStoreSpec

func NewBlockhashStoreSpec(spec *job.BlockhashStoreSpec) *BlockhashStoreSpec

NewBlockhashStoreSpec creates a new BlockhashStoreSpec for the given parameters.

type BootstrapSpec

type BootstrapSpec struct {
	ContractID                             string                 `json:"contractID"`
	Relay                                  relay.Network          `json:"relay"`
	RelayConfig                            map[string]interface{} `json:"relayConfig"`
	BlockchainTimeout                      models.Interval        `json:"blockchainTimeout"`
	ContractConfigTrackerSubscribeInterval models.Interval        `json:"contractConfigTrackerSubscribeInterval"`
	ContractConfigTrackerPollInterval      models.Interval        `json:"contractConfigTrackerPollInterval"`
	ContractConfigConfirmations            uint16                 `json:"contractConfigConfirmations"`
	CreatedAt                              time.Time              `json:"createdAt"`
	UpdatedAt                              time.Time              `json:"updatedAt"`
}

BootstrapSpec defines the spec details of a BootstrapSpec Job

func NewBootstrapSpec

func NewBootstrapSpec(spec *job.BootstrapSpec) *BootstrapSpec

NewBootstrapSpec initializes a new BootstrapSpec from a job.BootstrapSpec

type BridgeResource

type BridgeResource struct {
	JAID
	Name          string `json:"name"`
	URL           string `json:"url"`
	Confirmations uint32 `json:"confirmations"`
	// The IncomingToken is only provided when creating a Bridge
	IncomingToken          string       `json:"incomingToken,omitempty"`
	OutgoingToken          string       `json:"outgoingToken"`
	MinimumContractPayment *assets.Link `json:"minimumContractPayment"`
	CreatedAt              time.Time    `json:"createdAt"`
}

BridgeResource represents a Bridge JSONAPI resource.

func NewBridgeResource

func NewBridgeResource(b bridges.BridgeType) *BridgeResource

NewBridgeResource constructs a new BridgeResource

func (BridgeResource) GetName

func (r BridgeResource) GetName() string

GetName implements the api2go EntityNamer interface

type CSAKeyResource

type CSAKeyResource struct {
	JAID
	PubKey  string `json:"publicKey"`
	Version int    `json:"version"`
}

CSAKeyResource represents a CSA key JSONAPI resource.

func NewCSAKeyResource

func NewCSAKeyResource(key csakey.KeyV2) *CSAKeyResource

func NewCSAKeyResources

func NewCSAKeyResources(keys []csakey.KeyV2) []CSAKeyResource

func (CSAKeyResource) GetName

func (CSAKeyResource) GetName() string

GetName implements the api2go EntityNamer interface

type ChainResource

type ChainResource struct {
	JAID
	Enabled bool   `json:"enabled"`
	Config  string `json:"config"` // TOML
}

type Check

type Check struct {
	JAID
	Name   string          `json:"name"`
	Status services.Status `json:"status"`
	Output string          `json:"output"`
}

func (Check) GetName

func (c Check) GetName() string

type CosmosChainResource

type CosmosChainResource struct {
	ChainResource
}

CosmosChainResource is an Cosmos chain JSONAPI resource.

func NewCosmosChainResource

func NewCosmosChainResource(chain types.ChainStatus) CosmosChainResource

NewCosmosChainResource returns a new CosmosChainResource for chain.

func (CosmosChainResource) GetName

func (r CosmosChainResource) GetName() string

GetName implements the api2go EntityNamer interface

type CosmosKeyResource

type CosmosKeyResource struct {
	JAID
	PubKey string `json:"publicKey"`
}

CosmosKeyResource represents a Cosmos key JSONAPI resource.

func NewCosmosKeyResource

func NewCosmosKeyResource(key cosmoskey.Key) *CosmosKeyResource

func NewCosmosKeyResources

func NewCosmosKeyResources(keys []cosmoskey.Key) []CosmosKeyResource

func (CosmosKeyResource) GetName

func (CosmosKeyResource) GetName() string

GetName implements the api2go EntityNamer interface

type CosmosMsgResource

type CosmosMsgResource struct {
	JAID
	ChainID    string
	ContractID string
	State      string
	TxHash     *string
}

CosmosMsgResource repesents a Cosmos message JSONAPI resource.

func NewCosmosMsgResource

func NewCosmosMsgResource(id int64, chainID string, contractID string) CosmosMsgResource

NewCosmosMsgResource returns a new partial CosmosMsgResource.

func (CosmosMsgResource) GetName

func (CosmosMsgResource) GetName() string

GetName implements the api2go EntityNamer interface

type CosmosNodeResource

type CosmosNodeResource struct {
	NodeResource
}

CosmosNodeResource is a Cosmos node JSONAPI resource.

func NewCosmosNodeResource

func NewCosmosNodeResource(node types.NodeStatus) CosmosNodeResource

NewCosmosNodeResource returns a new CosmosNodeResource for node.

func (CosmosNodeResource) GetName

func (r CosmosNodeResource) GetName() string

GetName implements the api2go EntityNamer interface

type CronSpec

type CronSpec struct {
	CronSchedule string    `json:"schedule" tom:"schedule"`
	CreatedAt    time.Time `json:"createdAt"`
	UpdatedAt    time.Time `json:"updatedAt"`
}

CronSpec defines the spec details of a Cron Job

func NewCronSpec

func NewCronSpec(spec *job.CronSpec) *CronSpec

NewCronSpec generates a new CronSpec from a job.CronSpec

type DKGEncryptKeyResource

type DKGEncryptKeyResource struct {
	JAID
	PublicKey string `json:"publicKey"`
}

DKGEncryptKeyResource is just that.

func NewDKGEncryptKeyResource

func NewDKGEncryptKeyResource(key dkgencryptkey.Key) *DKGEncryptKeyResource

NewDKGEncryptKeyResource creates a new DKGEncryptKeyResource from the given DKG sign key.

func NewDKGEncryptKeyResources

func NewDKGEncryptKeyResources(keys []dkgencryptkey.Key) (resources []DKGEncryptKeyResource)

NewDKGEncryptKeyResources creates many DKGEncryptKeyResource objects from the given DKG sign keys.

func (DKGEncryptKeyResource) GetName

func (DKGEncryptKeyResource) GetName() string

GetName implements jsonapi.EntityNamer

type DKGSignKeyResource

type DKGSignKeyResource struct {
	JAID
	PublicKey string `json:"publicKey"`
}

DKGSignKeyResource is just that.

func NewDKGSignKeyResource

func NewDKGSignKeyResource(key dkgsignkey.Key) *DKGSignKeyResource

NewDKGSignKeyResource creates a new DKGSignKeyResource from the given DKG sign key.

func NewDKGSignKeyResources

func NewDKGSignKeyResources(keys []dkgsignkey.Key) (resources []DKGSignKeyResource)

NewDKGSignKeyResources creates many DKGSignKeyResource objects from the given DKG sign keys.

func (DKGSignKeyResource) GetName

func (DKGSignKeyResource) GetName() string

GetName implements jsonapi.EntityNamer

type DirectRequestSpec

type DirectRequestSpec struct {
	ContractAddress             ethkey.EIP55Address      `json:"contractAddress"`
	MinIncomingConfirmations    clnull.Uint32            `json:"minIncomingConfirmations"`
	MinIncomingConfirmationsEnv bool                     `json:"minIncomingConfirmationsEnv,omitempty"`
	MinContractPayment          *assets.Link             `json:"minContractPaymentLinkJuels"`
	Requesters                  models.AddressCollection `json:"requesters"`
	Initiator                   string                   `json:"initiator"`
	CreatedAt                   time.Time                `json:"createdAt"`
	UpdatedAt                   time.Time                `json:"updatedAt"`
	EVMChainID                  *utils.Big               `json:"evmChainID"`
}

DirectRequestSpec defines the spec details of a DirectRequest Job

func NewDirectRequestSpec

func NewDirectRequestSpec(spec *job.DirectRequestSpec) *DirectRequestSpec

NewDirectRequestSpec initializes a new DirectRequestSpec from a job.DirectRequestSpec

type ETHKeyResource

type ETHKeyResource struct {
	JAID
	EVMChainID     utils.Big    `json:"evmChainID"`
	Address        string       `json:"address"`
	NextNonce      int64        `json:"nextNonce"`
	EthBalance     *assets.Eth  `json:"ethBalance"`
	LinkBalance    *assets.Link `json:"linkBalance"`
	Disabled       bool         `json:"disabled"`
	CreatedAt      time.Time    `json:"createdAt"`
	UpdatedAt      time.Time    `json:"updatedAt"`
	MaxGasPriceWei *utils.Big   `json:"maxGasPriceWei"`
}

ETHKeyResource represents a ETH key JSONAPI resource. It holds the hex representation of the address plus its ETH & LINK balances

func NewETHKeyResource

func NewETHKeyResource(k ethkey.KeyV2, state ethkey.State, opts ...NewETHKeyOption) *ETHKeyResource

NewETHKeyResource constructs a new ETHKeyResource from a Key.

Use the functional options to inject the ETH and LINK balances

func (ETHKeyResource) GetName

func (r ETHKeyResource) GetName() string

GetName implements the api2go EntityNamer interface

This is named as such for backwards compatibility with the operator ui TODO - Standardise this to ethKeys

type EVMChainResource

type EVMChainResource struct {
	ChainResource
}

EVMChainResource is an EVM chain JSONAPI resource.

func NewEVMChainResource

func NewEVMChainResource(chain types.ChainStatus) EVMChainResource

NewEVMChainResource returns a new EVMChainResource for chain.

func (EVMChainResource) GetName

func (r EVMChainResource) GetName() string

GetName implements the api2go EntityNamer interface

type EVMForwarderResource

type EVMForwarderResource struct {
	JAID
	Address    common.Address `json:"address"`
	EVMChainID utils.Big      `json:"evmChainId"`
	CreatedAt  time.Time      `json:"createdAt"`
	UpdatedAt  time.Time      `json:"updatedAt"`
}

EVMForwarderResource is an EVM forwarder JSONAPI resource.

func NewEVMForwarderResource

func NewEVMForwarderResource(fwd forwarders.Forwarder) EVMForwarderResource

NewEVMForwarderResource returns a new EVMForwarderResource for chain.

func (EVMForwarderResource) GetName

func (r EVMForwarderResource) GetName() string

GetName implements the api2go EntityNamer interface

type EVMNodeResource

type EVMNodeResource struct {
	NodeResource
}

EVMNodeResource is an EVM node JSONAPI resource.

func NewEVMNodeResource

func NewEVMNodeResource(node types.NodeStatus) EVMNodeResource

NewEVMNodeResource returns a new EVMNodeResource for node.

func (EVMNodeResource) GetName

func (r EVMNodeResource) GetName() string

GetName implements the api2go EntityNamer interface

type EthTxResource

type EthTxResource struct {
	JAID
	State      string          `json:"state"`
	Data       hexutil.Bytes   `json:"data"`
	From       *common.Address `json:"from"`
	GasLimit   string          `json:"gasLimit"`
	GasPrice   string          `json:"gasPrice"`
	Hash       common.Hash     `json:"hash"`
	Hex        string          `json:"rawHex"`
	Nonce      string          `json:"nonce"`
	SentAt     string          `json:"sentAt"`
	To         *common.Address `json:"to"`
	Value      string          `json:"value"`
	EVMChainID utils.Big       `json:"evmChainID"`
}

EthTxResource represents a Ethereum Transaction JSONAPI resource.

func NewEthTxResource

func NewEthTxResource(tx txmgr.Tx) EthTxResource

NewEthTxResource generates a EthTxResource from an Eth.Tx.

For backwards compatibility, there is no id set when initializing from an EthTx as the id being used was the EthTxAttempt Hash. This should really use it's proper id

func NewEthTxResourceFromAttempt

func NewEthTxResourceFromAttempt(txa txmgr.TxAttempt) EthTxResource

func (EthTxResource) GetName

func (EthTxResource) GetName() string

GetName implements the api2go EntityNamer interface

type ExternalInitiatorAuthentication

type ExternalInitiatorAuthentication struct {
	Name           string        `json:"name,omitempty"`
	URL            models.WebURL `json:"url,omitempty"`
	AccessKey      string        `json:"incomingAccessKey,omitempty"`
	Secret         string        `json:"incomingSecret,omitempty"`
	OutgoingToken  string        `json:"outgoingToken,omitempty"`
	OutgoingSecret string        `json:"outgoingSecret,omitempty"`
}

ExternalInitiatorAuthentication includes initiator and authentication details.

func NewExternalInitiatorAuthentication

func NewExternalInitiatorAuthentication(
	ei bridges.ExternalInitiator,
	eia auth.Token,
) *ExternalInitiatorAuthentication

NewExternalInitiatorAuthentication creates an instance of ExternalInitiatorAuthentication.

func (*ExternalInitiatorAuthentication) GetID

GetID returns the jsonapi ID.

func (*ExternalInitiatorAuthentication) GetName

GetName returns the collection name for jsonapi.

func (*ExternalInitiatorAuthentication) SetID

SetID is used to conform to the UnmarshallIdentifier interface for deserializing from jsonapi documents.

type ExternalInitiatorResource

type ExternalInitiatorResource struct {
	JAID
	Name          string         `json:"name"`
	URL           *models.WebURL `json:"url"`
	AccessKey     string         `json:"accessKey"`
	OutgoingToken string         `json:"outgoingToken"`
	CreatedAt     time.Time      `json:"createdAt"`
	UpdatedAt     time.Time      `json:"updatedAt"`
}

func (ExternalInitiatorResource) GetName

GetName returns the collection name for jsonapi.

type FeatureResource

type FeatureResource struct {
	JAID
	Enabled bool `json:"enabled"`
}

FeatureResource represents a Feature JSONAPI resource.

func NewFeatureResource

func NewFeatureResource(name string, enabled bool) *FeatureResource

NewFeedsManagerResource constructs a new FeedsManagerResource.

func (FeatureResource) GetName

func (r FeatureResource) GetName() string

GetName implements the api2go EntityNamer interface

type FluxMonitorSpec

type FluxMonitorSpec struct {
	ContractAddress     ethkey.EIP55Address `json:"contractAddress"`
	Threshold           float32             `json:"threshold"`
	AbsoluteThreshold   float32             `json:"absoluteThreshold"`
	PollTimerPeriod     string              `json:"pollTimerPeriod"`
	PollTimerDisabled   bool                `json:"pollTimerDisabled"`
	IdleTimerPeriod     string              `json:"idleTimerPeriod"`
	IdleTimerDisabled   bool                `json:"idleTimerDisabled"`
	DrumbeatEnabled     bool                `json:"drumbeatEnabled"`
	DrumbeatSchedule    *string             `json:"drumbeatSchedule"`
	DrumbeatRandomDelay *string             `json:"drumbeatRandomDelay"`
	MinPayment          *assets.Link        `json:"minPayment"`
	CreatedAt           time.Time           `json:"createdAt"`
	UpdatedAt           time.Time           `json:"updatedAt"`
	EVMChainID          *utils.Big          `json:"evmChainID"`
}

FluxMonitorSpec defines the spec details of a FluxMonitor Job

func NewFluxMonitorSpec

func NewFluxMonitorSpec(spec *job.FluxMonitorSpec) *FluxMonitorSpec

NewFluxMonitorSpec initializes a new DirectFluxMonitorSpec from a job.FluxMonitorSpec

type GatewaySpec added in v2.3.0

type GatewaySpec struct {
	GatewayConfig map[string]interface{} `json:"gatewayConfig"`
	CreatedAt     time.Time              `json:"createdAt"`
	UpdatedAt     time.Time              `json:"updatedAt"`
}

func NewGatewaySpec added in v2.3.0

func NewGatewaySpec(spec *job.GatewaySpec) *GatewaySpec

type JAID

type JAID struct {
	ID string `json:"-"`
}

JAID represents a JSON API ID. It implements the api2go MarshalIdentifier and UnmarshalIdentitier interface.

func NewJAID

func NewJAID(id string) JAID

func NewJAIDInt32

func NewJAIDInt32(id int32) JAID

NewJAIDInt32 converts an int32 into a JAID

func NewJAIDInt64

func NewJAIDInt64(id int64) JAID

NewJAIDInt64 converts an int64 into a JAID

func (JAID) GetID

func (jaid JAID) GetID() string

GetID implements the api2go MarshalIdentifier interface.

func (*JAID) SetID

func (jaid *JAID) SetID(value string) error

SetID implements the api2go UnmarshalIdentitier interface.

type JobError

type JobError struct {
	ID          int64     `json:"id"`
	Description string    `json:"description"`
	Occurrences uint      `json:"occurrences"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

JobError represents errors on the job

func NewJobError

func NewJobError(e job.SpecError) JobError

type JobResource

type JobResource struct {
	JAID
	Name                   string                  `json:"name"`
	Type                   JobSpecType             `json:"type"`
	SchemaVersion          uint32                  `json:"schemaVersion"`
	GasLimit               clnull.Uint32           `json:"gasLimit"`
	ForwardingAllowed      bool                    `json:"forwardingAllowed"`
	MaxTaskDuration        models.Interval         `json:"maxTaskDuration"`
	ExternalJobID          uuid.UUID               `json:"externalJobID"`
	DirectRequestSpec      *DirectRequestSpec      `json:"directRequestSpec"`
	FluxMonitorSpec        *FluxMonitorSpec        `json:"fluxMonitorSpec"`
	CronSpec               *CronSpec               `json:"cronSpec"`
	OffChainReportingSpec  *OffChainReportingSpec  `json:"offChainReportingOracleSpec"`
	OffChainReporting2Spec *OffChainReporting2Spec `json:"offChainReporting2OracleSpec"`
	KeeperSpec             *KeeperSpec             `json:"keeperSpec"`
	VRFSpec                *VRFSpec                `json:"vrfSpec"`
	WebhookSpec            *WebhookSpec            `json:"webhookSpec"`
	BlockhashStoreSpec     *BlockhashStoreSpec     `json:"blockhashStoreSpec"`
	BlockHeaderFeederSpec  *BlockHeaderFeederSpec  `json:"blockHeaderFeederSpec"`
	BootstrapSpec          *BootstrapSpec          `json:"bootstrapSpec"`
	GatewaySpec            *GatewaySpec            `json:"gatewaySpec"`
	PipelineSpec           PipelineSpec            `json:"pipelineSpec"`
	Errors                 []JobError              `json:"errors"`
}

JobResource represents a JobResource

func NewJobResource

func NewJobResource(j job.Job) *JobResource

NewJobResource initializes a new JSONAPI job resource

func (JobResource) GetName

func (r JobResource) GetName() string

GetName implements the api2go EntityNamer interface

type JobSpecType

type JobSpecType string

JobSpecType defines the the the spec type of the job

const (
	DirectRequestJobSpec     JobSpecType = "directrequest"
	FluxMonitorJobSpec       JobSpecType = "fluxmonitor"
	OffChainReportingJobSpec JobSpecType = "offchainreporting"
	KeeperJobSpec            JobSpecType = "keeper"
	CronJobSpec              JobSpecType = "cron"
	VRFJobSpec               JobSpecType = "vrf"
	WebhookJobSpec           JobSpecType = "webhook"
	BlockhashStoreJobSpec    JobSpecType = "blockhashstore"
	BlockHeaderFeederJobSpec JobSpecType = "blockheaderfeeder"
	BootstrapJobSpec         JobSpecType = "bootstrap"
	GatewayJobSpec           JobSpecType = "gateway"
)

func (JobSpecType) String

func (t JobSpecType) String() string

type KeeperSpec

type KeeperSpec struct {
	ContractAddress ethkey.EIP55Address `json:"contractAddress"`
	FromAddress     ethkey.EIP55Address `json:"fromAddress"`
	CreatedAt       time.Time           `json:"createdAt"`
	UpdatedAt       time.Time           `json:"updatedAt"`
	EVMChainID      *utils.Big          `json:"evmChainID"`
}

KeeperSpec defines the spec details of a Keeper Job

func NewKeeperSpec

func NewKeeperSpec(spec *job.KeeperSpec) *KeeperSpec

NewKeeperSpec generates a new KeeperSpec from a job.KeeperSpec

type NewETHKeyOption

type NewETHKeyOption func(*ETHKeyResource)

NewETHKeyOption defines a functional option which allows customisation of the EthKeyResource

func SetETHKeyEthBalance

func SetETHKeyEthBalance(ethBalance *assets.Eth) NewETHKeyOption

func SetETHKeyLinkBalance

func SetETHKeyLinkBalance(linkBalance *assets.Link) NewETHKeyOption

func SetETHKeyMaxGasPriceWei

func SetETHKeyMaxGasPriceWei(maxGasPriceWei *utils.Big) NewETHKeyOption

type NodeResource added in v2.1.0

type NodeResource struct {
	JAID
	ChainID string `json:"chainID"`
	Name    string `json:"name"`
	Config  string `json:"config"` // TOML
	State   string `json:"state"`
}

type OCR2KeysBundleResource

type OCR2KeysBundleResource struct {
	JAID
	ChainType         string `json:"chainType"`
	OnchainPublicKey  string `json:"onchainPublicKey"`
	OffChainPublicKey string `json:"offchainPublicKey"`
	ConfigPublicKey   string `json:"configPublicKey"`
}

OCR2KeysBundleResource represents a bundle of OCRs keys as JSONAPI resource

func NewOCR2KeysBundleResource

func NewOCR2KeysBundleResource(key ocr2key.KeyBundle) *OCR2KeysBundleResource

func NewOCR2KeysBundleResources

func NewOCR2KeysBundleResources(keys []ocr2key.KeyBundle) []OCR2KeysBundleResource

func (OCR2KeysBundleResource) GetName

func (r OCR2KeysBundleResource) GetName() string

GetName implements the api2go EntityNamer interface

type OCRKeysBundleResource

type OCRKeysBundleResource struct {
	JAID
	OnChainSigningAddress ocrkey.OnChainSigningAddress `json:"onChainSigningAddress"`
	OffChainPublicKey     ocrkey.OffChainPublicKey     `json:"offChainPublicKey"`
	ConfigPublicKey       ocrkey.ConfigPublicKey       `json:"configPublicKey"`
}

OCRKeysBundleResource represents a bundle of OCRs keys as JSONAPI resource

func NewOCRKeysBundleResource

func NewOCRKeysBundleResource(key ocrkey.KeyV2) *OCRKeysBundleResource

func NewOCRKeysBundleResources

func NewOCRKeysBundleResources(keys []ocrkey.KeyV2) []OCRKeysBundleResource

func (OCRKeysBundleResource) GetName

func (r OCRKeysBundleResource) GetName() string

GetName implements the api2go EntityNamer interface

type OffChainReporting2Spec

type OffChainReporting2Spec struct {
	ContractID                        string                 `json:"contractID"`
	Relay                             relay.Network          `json:"relay"`
	RelayConfig                       map[string]interface{} `json:"relayConfig"`
	P2PV2Bootstrappers                pq.StringArray         `json:"p2pv2Bootstrappers"`
	OCRKeyBundleID                    null.String            `json:"ocrKeyBundleID"`
	TransmitterID                     null.String            `json:"transmitterID"`
	ObservationTimeout                models.Interval        `json:"observationTimeout"`
	BlockchainTimeout                 models.Interval        `json:"blockchainTimeout"`
	ContractConfigTrackerPollInterval models.Interval        `json:"contractConfigTrackerPollInterval"`
	ContractConfigConfirmations       uint16                 `json:"contractConfigConfirmations"`
	CreatedAt                         time.Time              `json:"createdAt"`
	UpdatedAt                         time.Time              `json:"updatedAt"`
	CollectTelemetry                  bool                   `json:"collectTelemetry"`
}

OffChainReporting2Spec defines the spec details of a OffChainReporting2 Job

func NewOffChainReporting2Spec

func NewOffChainReporting2Spec(spec *job.OCR2OracleSpec) *OffChainReporting2Spec

NewOffChainReporting2Spec initializes a new OffChainReportingSpec from a job.OCR2OracleSpec

type OffChainReportingSpec

type OffChainReportingSpec struct {
	ContractAddress                           ethkey.EIP55Address  `json:"contractAddress"`
	P2PBootstrapPeers                         pq.StringArray       `json:"p2pBootstrapPeers"`
	P2PV2Bootstrappers                        pq.StringArray       `json:"p2pv2Bootstrappers"`
	IsBootstrapPeer                           bool                 `json:"isBootstrapPeer"`
	EncryptedOCRKeyBundleID                   *models.Sha256Hash   `json:"keyBundleID"`
	TransmitterAddress                        *ethkey.EIP55Address `json:"transmitterAddress"`
	ObservationTimeout                        models.Interval      `json:"observationTimeout"`
	ObservationTimeoutEnv                     bool                 `json:"observationTimeoutEnv,omitempty"`
	BlockchainTimeout                         models.Interval      `json:"blockchainTimeout"`
	BlockchainTimeoutEnv                      bool                 `json:"blockchainTimeoutEnv,omitempty"`
	ContractConfigTrackerSubscribeInterval    models.Interval      `json:"contractConfigTrackerSubscribeInterval"`
	ContractConfigTrackerSubscribeIntervalEnv bool                 `json:"contractConfigTrackerSubscribeIntervalEnv,omitempty"`
	ContractConfigTrackerPollInterval         models.Interval      `json:"contractConfigTrackerPollInterval"`
	ContractConfigTrackerPollIntervalEnv      bool                 `json:"contractConfigTrackerPollIntervalEnv,omitempty"`
	ContractConfigConfirmations               uint16               `json:"contractConfigConfirmations"`
	ContractConfigConfirmationsEnv            bool                 `json:"contractConfigConfirmationsEnv,omitempty"`
	CreatedAt                                 time.Time            `json:"createdAt"`
	UpdatedAt                                 time.Time            `json:"updatedAt"`
	EVMChainID                                *utils.Big           `json:"evmChainID"`
	DatabaseTimeout                           *models.Interval     `json:"databaseTimeout"`
	DatabaseTimeoutEnv                        bool                 `json:"databaseTimeoutEnv,omitempty"`
	ObservationGracePeriod                    *models.Interval     `json:"observationGracePeriod"`
	ObservationGracePeriodEnv                 bool                 `json:"observationGracePeriodEnv,omitempty"`
	ContractTransmitterTransmitTimeout        *models.Interval     `json:"contractTransmitterTransmitTimeout"`
	ContractTransmitterTransmitTimeoutEnv     bool                 `json:"contractTransmitterTransmitTimeoutEnv,omitempty"`
	CollectTelemetry                          bool                 `json:"collectTelemetry,omitempty"`
}

OffChainReportingSpec defines the spec details of a OffChainReporting Job

func NewOffChainReportingSpec

func NewOffChainReportingSpec(spec *job.OCROracleSpec) *OffChainReportingSpec

NewOffChainReportingSpec initializes a new OffChainReportingSpec from a job.OCROracleSpec

type P2PKeyResource

type P2PKeyResource struct {
	JAID
	PeerID string `json:"peerId"`
	PubKey string `json:"publicKey"`
}

P2PKeyResource represents a P2P key JSONAPI resource.

func NewP2PKeyResource

func NewP2PKeyResource(key p2pkey.KeyV2) *P2PKeyResource

func NewP2PKeyResources

func NewP2PKeyResources(keys []p2pkey.KeyV2) []P2PKeyResource

func (P2PKeyResource) GetName

func (P2PKeyResource) GetName() string

GetName implements the api2go EntityNamer interface

type PipelineRunResource

type PipelineRunResource struct {
	JAID
	Outputs []*string `json:"outputs"`
	// XXX: Here for backwards compatibility, can be removed later
	// Deprecated: Errors
	Errors       []*string                 `json:"errors"`
	AllErrors    []*string                 `json:"allErrors"`
	FatalErrors  []*string                 `json:"fatalErrors"`
	Inputs       pipeline.JSONSerializable `json:"inputs"`
	TaskRuns     []PipelineTaskRunResource `json:"taskRuns"`
	CreatedAt    time.Time                 `json:"createdAt"`
	FinishedAt   null.Time                 `json:"finishedAt"`
	PipelineSpec PipelineSpec              `json:"pipelineSpec"`
}

Corresponds with models.d.ts PipelineRun

func NewPipelineRunResource

func NewPipelineRunResource(pr pipeline.Run, lggr logger.Logger) PipelineRunResource

func NewPipelineRunResources

func NewPipelineRunResources(prs []pipeline.Run, lggr logger.Logger) []PipelineRunResource

func (PipelineRunResource) GetName

func (r PipelineRunResource) GetName() string

GetName implements the api2go EntityNamer interface

type PipelineSpec

type PipelineSpec struct {
	ID           int32  `json:"id"`
	JobID        int32  `json:"jobID"`
	DotDAGSource string `json:"dotDagSource"`
}

PipelineSpec defines the spec details of the pipeline

func NewPipelineSpec

func NewPipelineSpec(spec *pipeline.Spec) PipelineSpec

NewPipelineSpec generates a new PipelineSpec from a pipeline.Spec

type PipelineTaskRunResource

type PipelineTaskRunResource struct {
	Type       pipeline.TaskType `json:"type"`
	CreatedAt  time.Time         `json:"createdAt"`
	FinishedAt null.Time         `json:"finishedAt"`
	Output     *string           `json:"output"`
	Error      *string           `json:"error"`
	DotID      string            `json:"dotId"`
}

Corresponds with models.d.ts PipelineTaskRun

func NewPipelineTaskRunResource

func NewPipelineTaskRunResource(tr pipeline.TaskRun) PipelineTaskRunResource

func (PipelineTaskRunResource) GetName

func (r PipelineTaskRunResource) GetName() string

GetName implements the api2go EntityNamer interface

type RegistrationSettings

type RegistrationSettings struct {
	JAID
	Settings protocol.CredentialCreation `json:"settings"`
}

RegistrationSettings represents an enrollment settings object

func NewRegistrationSettings

func NewRegistrationSettings(settings protocol.CredentialCreation) *RegistrationSettings

NewRegistrationSettings creates a new structure to enroll a new hardware key for authentication

func (RegistrationSettings) GetName

func (r RegistrationSettings) GetName() string

GetName implements the api2go EntityNamer interface

type ServiceLogConfigResource

type ServiceLogConfigResource struct {
	JAID
	ServiceName     []string `json:"serviceName"`
	LogLevel        []string `json:"logLevel"`
	DefaultLogLevel string   `json:"defaultLogLevel"`
}

func (ServiceLogConfigResource) GetName

func (r ServiceLogConfigResource) GetName() string

GetName implements the api2go EntityNamer interface

type SolanaChainResource

type SolanaChainResource struct {
	ChainResource
}

SolanaChainResource is an Solana chain JSONAPI resource.

func NewSolanaChainResource

func NewSolanaChainResource(chain types.ChainStatus) SolanaChainResource

NewSolanaChainResource returns a new SolanaChainResource for chain.

func (SolanaChainResource) GetName

func (r SolanaChainResource) GetName() string

GetName implements the api2go EntityNamer interface

type SolanaKeyResource

type SolanaKeyResource struct {
	JAID
	PubKey string `json:"publicKey"`
}

SolanaKeyResource represents a Solana key JSONAPI resource.

func NewSolanaKeyResource

func NewSolanaKeyResource(key solkey.Key) *SolanaKeyResource

func NewSolanaKeyResources

func NewSolanaKeyResources(keys []solkey.Key) []SolanaKeyResource

func (SolanaKeyResource) GetName

func (SolanaKeyResource) GetName() string

GetName implements the api2go EntityNamer interface

type SolanaMsgResource

type SolanaMsgResource struct {
	JAID
	ChainID string
	From    string `json:"from"`
	To      string `json:"to"`
	Amount  uint64 `json:"amount"`
}

SolanaMsgResource repesents a Solana message JSONAPI resource.

func NewSolanaMsgResource

func NewSolanaMsgResource(id string, chainID string) SolanaMsgResource

NewSolanaMsgResource returns a new partial SolanaMsgResource.

func (SolanaMsgResource) GetName

func (SolanaMsgResource) GetName() string

GetName implements the api2go EntityNamer interface

type SolanaNodeResource

type SolanaNodeResource struct {
	NodeResource
}

SolanaNodeResource is a Solana node JSONAPI resource.

func NewSolanaNodeResource

func NewSolanaNodeResource(node types.NodeStatus) SolanaNodeResource

NewSolanaNodeResource returns a new SolanaNodeResource for node.

func (SolanaNodeResource) GetName

func (r SolanaNodeResource) GetName() string

GetName implements the api2go EntityNamer interface

type StarkNetChainResource

type StarkNetChainResource struct {
	ChainResource
}

StarkNetChainResource is an StarkNet chain JSONAPI resource.

func NewStarkNetChainResource

func NewStarkNetChainResource(chain types.ChainStatus) StarkNetChainResource

NewStarkNetChainResource returns a new StarkNetChainResource for chain.

func (StarkNetChainResource) GetName

func (r StarkNetChainResource) GetName() string

GetName implements the api2go EntityNamer interface

type StarkNetKeyResource

type StarkNetKeyResource struct {
	JAID
	StarkKey string `json:"starkPubKey"`
}

StarkNetKeyResource represents a StarkNet key JSONAPI resource.

func NewStarkNetKeyResource

func NewStarkNetKeyResource(key starkkey.Key) *StarkNetKeyResource

func NewStarkNetKeyResources

func NewStarkNetKeyResources(keys []starkkey.Key) []StarkNetKeyResource

func (StarkNetKeyResource) GetName

func (StarkNetKeyResource) GetName() string

GetName implements the api2go EntityNamer interface

type StarkNetNodeResource

type StarkNetNodeResource struct {
	NodeResource
}

StarkNetNodeResource is a StarkNet node JSONAPI resource.

func NewStarkNetNodeResource

func NewStarkNetNodeResource(node types.NodeStatus) StarkNetNodeResource

NewStarkNetNodeResource returns a new StarkNetNodeResource for node.

func (StarkNetNodeResource) GetName

func (r StarkNetNodeResource) GetName() string

GetName implements the api2go EntityNamer interface

type UserResource

type UserResource struct {
	JAID
	Email             string            `json:"email"`
	Role              sessions.UserRole `json:"role"`
	HasActiveApiToken string            `json:"hasActiveApiToken"`
	CreatedAt         time.Time         `json:"createdAt"`
	UpdatedAt         time.Time         `json:"updatedAt"`
}

UserResource represents a User JSONAPI resource.

func NewUserResource

func NewUserResource(u sessions.User) *UserResource

NewUserResource constructs a new UserResource.

A User does not have an ID primary key, so we must use the email

func NewUserResources

func NewUserResources(users []sessions.User) []UserResource

func (UserResource) GetName

func (r UserResource) GetName() string

GetName implements the api2go EntityNamer interface

type VRFKeyResource

type VRFKeyResource struct {
	JAID
	Compressed   string `json:"compressed"`
	Uncompressed string `json:"uncompressed"`
	Hash         string `json:"hash"`
}

func NewVRFKeyResource

func NewVRFKeyResource(key vrfkey.KeyV2, lggr logger.Logger) *VRFKeyResource

func NewVRFKeyResources

func NewVRFKeyResources(keys []vrfkey.KeyV2, lggr logger.Logger) []VRFKeyResource

func (VRFKeyResource) GetName

func (VRFKeyResource) GetName() string

GetName implements the api2go EntityNamer interface

type VRFSpec

type VRFSpec struct {
	BatchCoordinatorAddress       *ethkey.EIP55Address  `json:"batchCoordinatorAddress"`
	BatchFulfillmentEnabled       bool                  `json:"batchFulfillmentEnabled"`
	BatchFulfillmentGasMultiplier float64               `json:"batchFulfillmentGasMultiplier"`
	CoordinatorAddress            ethkey.EIP55Address   `json:"coordinatorAddress"`
	PublicKey                     secp256k1.PublicKey   `json:"publicKey"`
	FromAddresses                 []ethkey.EIP55Address `json:"fromAddresses"`
	PollPeriod                    models.Duration       `json:"pollPeriod"`
	MinIncomingConfirmations      uint32                `json:"confirmations"`
	CreatedAt                     time.Time             `json:"createdAt"`
	UpdatedAt                     time.Time             `json:"updatedAt"`
	EVMChainID                    *utils.Big            `json:"evmChainID"`
	ChunkSize                     uint32                `json:"chunkSize"`
	RequestTimeout                models.Duration       `json:"requestTimeout"`
	BackoffInitialDelay           models.Duration       `json:"backoffInitialDelay"`
	BackoffMaxDelay               models.Duration       `json:"backoffMaxDelay"`
	GasLanePrice                  *assets.Wei           `json:"gasLanePrice"`
	VRFOwnerAddress               *ethkey.EIP55Address  `json:"vrfOwnerAddress"`
}

func NewVRFSpec

func NewVRFSpec(spec *job.VRFSpec) *VRFSpec

type WebhookSpec

type WebhookSpec struct {
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

WebhookSpec defines the spec details of a Webhook Job

func NewWebhookSpec

func NewWebhookSpec(spec *job.WebhookSpec) *WebhookSpec

NewWebhookSpec generates a new WebhookSpec from a job.WebhookSpec

Jump to

Keyboard shortcuts

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