presenters

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 added in v1.10.17

type ChainResource struct {
	JAID
	Enabled   bool           `json:"enabled"`
	Config    types.ChainCfg `json:"config"`
	CreatedAt time.Time      `json:"createdAt"`
	UpdatedAt time.Time      `json:"updatedAt"`
}

func NewChainResource added in v1.10.17

func NewChainResource(chain types.Chain) ChainResource

func (ChainResource) GetName added in v1.10.17

func (r ChainResource) GetName() string

GetName implements the api2go EntityNamer interface

type Check

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

func (Check) GetName

func (c Check) GetName() string

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 DirectRequestSpec

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

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"`
	EthBalance  *assets.Eth  `json:"ethBalance"`
	LinkBalance *assets.Link `json:"linkBalance"`
	IsFunding   bool         `json:"isFunding"`
	CreatedAt   time.Time    `json:"createdAt"`
	UpdatedAt   time.Time    `json:"updatedAt"`
}

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, error)

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 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 bulletprooftxmanager.EthTx) 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 (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 added in v1.10.17

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

FeatureResource represents a Feature JSONAPI resource.

func NewFeatureResource added in v1.10.17

func NewFeatureResource(name string, enabled bool) *FeatureResource

NewFeedsManagerResource constructs a new FeedsManagerResource.

func (FeatureResource) GetName added in v1.10.17

func (r FeatureResource) GetName() string

GetName implements the api2go EntityNamer interface

type FeedsManagerResource

type FeedsManagerResource struct {
	JAID
	Name                   string           `json:"name"`
	URI                    string           `json:"uri"`
	PublicKey              crypto.PublicKey `json:"publicKey"`
	JobTypes               []string         `json:"jobTypes"`
	IsBootstrapPeer        bool             `json:"isBootstrapPeer"`
	BootstrapPeerMultiaddr null.String      `json:"bootstrapPeerMultiaddr"`
	IsConnectionActive     bool             `json:"isConnectionActive"`
	CreatedAt              time.Time        `json:"createdAt"`
}

FeedsManagerResource represents a Feeds Manager JSONAPI resource.

func NewFeedsManagerResource

func NewFeedsManagerResource(ms feeds.FeedsManager) *FeedsManagerResource

NewFeedsManagerResource constructs a new FeedsManagerResource.

func NewFeedsManagerResources

func NewFeedsManagerResources(mss []feeds.FeedsManager) []FeedsManagerResource

NewJobResources initializes a slice of JSONAPI feed manager resources

func (FeedsManagerResource) GetName

func (r FeedsManagerResource) 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"`
}

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 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 NewJAIDUint

func NewJAIDUint(id uint) JAID

NewJAIDUint converts an uint 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 JobProposalResource

type JobProposalResource struct {
	JAID
	Spec           string                  `json:"spec"`
	Status         feeds.JobProposalStatus `json:"status"`
	ExternalJobID  *string                 `json:"external_job_id"`
	FeedsManagerID string                  `json:"feeds_manager_id"`
	Multiaddrs     []string                `json:"multiaddrs"`
	ProposedAt     time.Time               `json:"proposedAt"`
	CreatedAt      time.Time               `json:"createdAt"`
}

JobProposalResource represents a job proposal JSONAPI resource.

func NewJobProposalResource

func NewJobProposalResource(jp feeds.JobProposal) *JobProposalResource

NewJobProposalResource constructs a new JobProposalResource.

func NewJobProposalResources

func NewJobProposalResources(jps []feeds.JobProposal) []JobProposalResource

NewJobProposalResources initializes a slice of JSONAPI job proposal resources

func (JobProposalResource) GetName

func (r JobProposalResource) GetName() string

GetName implements the api2go EntityNamer interface

type JobResource

type JobResource struct {
	JAID
	Name                  string                 `json:"name"`
	Type                  JobSpecType            `json:"type"`
	SchemaVersion         uint32                 `json:"schemaVersion"`
	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"`
	KeeperSpec            *KeeperSpec            `json:"keeperSpec"`
	VRFSpec               *VRFSpec               `json:"vrfSpec"`
	WebhookSpec           *WebhookSpec           `json:"webhookSpec"`
	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 NewJobResources

func NewJobResources(js []job.Job) []JobResource

NewJobResources initializes a slice of JSONAPI job resources

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"
)

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"`
}

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) error

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

type NodeResource added in v1.10.17

type NodeResource struct {
	JAID
	Name       string      `json:"name"`
	EVMChainID utils.Big   `json:"evmChainID"`
	WSURL      null.String `json:"wsURL"`
	HTTPURL    null.String `json:"httpURL"`
	CreatedAt  time.Time   `json:"createdAt"`
	UpdatedAt  time.Time   `json:"updatedAt"`
}

func NewNodeResource added in v1.10.17

func NewNodeResource(node types.Node) NodeResource

func (NodeResource) GetName added in v1.10.17

func (r NodeResource) 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 OffChainReportingSpec

type OffChainReportingSpec struct {
	ContractAddress                        ethkey.EIP55Address  `json:"contractAddress"`
	P2PPeerID                              *p2pkey.PeerID       `json:"p2pPeerID"`
	P2PBootstrapPeers                      pq.StringArray       `json:"p2pBootstrapPeers"`
	IsBootstrapPeer                        bool                 `json:"isBootstrapPeer"`
	EncryptedOCRKeyBundleID                *models.Sha256Hash   `json:"keyBundleID"`
	TransmitterAddress                     *ethkey.EIP55Address `json:"transmitterAddress"`
	ObservationTimeout                     models.Interval      `json:"observationTimeout"`
	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"`
}

OffChainReportingSpec defines the spec details of a OffChainReporting Job

func NewOffChainReportingSpec

func NewOffChainReportingSpec(spec *job.OffchainReportingOracleSpec) *OffChainReportingSpec

NewOffChainReportingSpec initializes a new OffChainReportingSpec from a job.OffchainReportingOracleSpec

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   time.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 time.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 added in v1.10.17

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

RegistrationSettings represents an enrollment settings object

func NewRegistrationSettings added in v1.10.17

func NewRegistrationSettings(settings protocol.CredentialCreation) *RegistrationSettings

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

func (RegistrationSettings) GetName added in v1.10.17

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"`
}

func (ServiceLogConfigResource) GetName

func (r ServiceLogConfigResource) GetName() string

GetName implements the api2go EntityNamer interface

type UserResource

type UserResource struct {
	JAID
	Email     string    `json:"email"`
	CreatedAt time.Time `json:"createdAt"`
}

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 (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) *VRFKeyResource

func NewVRFKeyResources

func NewVRFKeyResources(keys []vrfkey.KeyV2) []VRFKeyResource

func (VRFKeyResource) GetName

func (VRFKeyResource) GetName() string

GetName implements the api2go EntityNamer interface

type VRFSpec

type VRFSpec struct {
	CoordinatorAddress ethkey.EIP55Address `json:"coordinatorAddress"`
	PublicKey          secp256k1.PublicKey `json:"publicKey"`
	Confirmations      uint32              `json:"confirmations"`
	CreatedAt          time.Time           `json:"createdAt"`
	UpdatedAt          time.Time           `json:"updatedAt"`
}

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