Documentation ¶
Overview ¶
Package cmd is the front-end interface for the application as a command-line utility.
KeyStoreAuthenticator ¶
KeyStoreAuthenticator prompts the user for their password, which is used to unlock their keystore file to interact with the Ethereum blockchain. Since multiple keystore files can exist at the configured directory, the KeyStoreAuthenticator will try the password on all keystore files present.
Client ¶
Client is how the application is invoked from the command line. When you run the binary, for example `./chainlink n`, client.RunNode is called to start the Chainlink core. Similarly, running `./chainlink j` returns information on all jobs in the node, and `./chainlink s` with another argument as a JobID gives information specific to that job.
Renderer ¶
Renderer helps format and display data (based on the kind of data it is) to the command line.
Index ¶
- Variables
- func NewApp(client *Client) *cli.App
- type APIInitializer
- type AppFactory
- type BridgePresenter
- type BridgePresenters
- type CSAKeyPresenter
- type CSAKeyPresenters
- type ChainlinkAppFactory
- type ChainlinkRunner
- type ChangePasswordPrompter
- type Client
- func (cli *Client) ChangePassword(c *clipkg.Context) (err error)
- func (cli *Client) ConfigureEVMChain(c *cli.Context) (err error)
- func (cli *Client) ConfigureTerraChain(c *cli.Context) (err error)
- func (cli *Client) CreateBridge(c *cli.Context) (err error)
- func (cli *Client) CreateCSAKey(c *cli.Context) (err error)
- func (cli *Client) CreateETHKey(c *cli.Context) (err error)
- func (cli *Client) CreateEVMChain(c *cli.Context) (err error)
- func (cli *Client) CreateEVMNode(c *cli.Context) (err error)
- func (cli *Client) CreateExternalInitiator(c *clipkg.Context) (err error)
- func (cli *Client) CreateJob(c *cli.Context) (err error)
- func (cli *Client) CreateMigration(c *clipkg.Context) error
- func (cli *Client) CreateOCR2KeyBundle(c *cli.Context) error
- func (cli *Client) CreateOCRKeyBundle(c *cli.Context) error
- func (cli *Client) CreateP2PKey(c *cli.Context) (err error)
- func (cli *Client) CreateSolanaKey(c *cli.Context) (err error)
- func (cli *Client) CreateTerraChain(c *cli.Context) (err error)
- func (cli *Client) CreateTerraKey(c *cli.Context) (err error)
- func (cli *Client) CreateTerraNode(c *cli.Context) (err error)
- func (cli *Client) CreateVRFKey(c *cli.Context) error
- func (cli *Client) DeleteETHKey(c *cli.Context) (err error)
- func (cli *Client) DeleteExternalInitiator(c *clipkg.Context) (err error)
- func (cli *Client) DeleteJob(c *cli.Context) error
- func (cli *Client) DeleteOCR2KeyBundle(c *cli.Context) error
- func (cli *Client) DeleteOCRKeyBundle(c *cli.Context) error
- func (cli *Client) DeleteP2PKey(c *cli.Context) (err error)
- func (cli *Client) DeleteSolanaKey(c *cli.Context) (err error)
- func (cli *Client) DeleteTerraKey(c *cli.Context) (err error)
- func (cli *Client) DeleteVRFKey(c *cli.Context) error
- func (cli *Client) ExportCSAKey(c *cli.Context) (err error)
- func (cli *Client) ExportETHKey(c *cli.Context) (err error)
- func (cli *Client) ExportOCR2Key(c *cli.Context) (err error)
- func (cli *Client) ExportOCRKey(c *cli.Context) (err error)
- func (cli *Client) ExportP2PKey(c *cli.Context) (err error)
- func (cli *Client) ExportSolanaKey(c *cli.Context) (err error)
- func (cli *Client) ExportTerraKey(c *cli.Context) (err error)
- func (cli *Client) ExportVRFKey(c *cli.Context) error
- func (cli *Client) GetConfiguration(c *clipkg.Context) (err error)
- func (cli *Client) ImportCSAKey(c *cli.Context) (err error)
- func (cli *Client) ImportETHKey(c *cli.Context) (err error)
- func (cli *Client) ImportOCR2Key(c *cli.Context) (err error)
- func (cli *Client) ImportOCRKey(c *cli.Context) (err error)
- func (cli *Client) ImportP2PKey(c *cli.Context) (err error)
- func (cli *Client) ImportSolanaKey(c *cli.Context) (err error)
- func (cli *Client) ImportTerraKey(c *cli.Context) (err error)
- func (cli *Client) ImportVRFKey(c *cli.Context) error
- func (cli *Client) IndexBridges(c *cli.Context) (err error)
- func (cli *Client) IndexEVMChains(c *cli.Context) (err error)
- func (cli *Client) IndexEVMNodes(c *cli.Context) (err error)
- func (cli *Client) IndexExternalInitiators(c *clipkg.Context) (err error)
- func (cli *Client) IndexTerraChains(c *cli.Context) (err error)
- func (cli *Client) IndexTerraNodes(c *cli.Context) (err error)
- func (cli *Client) IndexTransactions(c *cli.Context) error
- func (cli *Client) IndexTxAttempts(c *cli.Context) error
- func (cli *Client) ListCSAKeys(c *cli.Context) (err error)
- func (cli *Client) ListETHKeys(c *cli.Context) (err error)
- func (cli *Client) ListJobs(c *cli.Context) (err error)
- func (cli *Client) ListOCR2KeyBundles(c *cli.Context) error
- func (cli *Client) ListOCRKeyBundles(c *cli.Context) error
- func (cli *Client) ListP2PKeys(c *cli.Context) (err error)
- func (cli *Client) ListSolanaKeys(c *cli.Context) (err error)
- func (cli *Client) ListTerraKeys(c *cli.Context) (err error)
- func (cli *Client) ListVRFKeys(c *cli.Context) error
- func (cli *Client) MigrateDatabase(c *clipkg.Context) error
- func (cli *Client) PrepareTestDatabase(c *clipkg.Context) error
- func (cli *Client) PrepareTestDatabaseUserOnly(c *clipkg.Context) error
- func (cli *Client) RebroadcastTransactions(c *clipkg.Context) (err error)
- func (cli *Client) RemoteLogin(c *clipkg.Context) error
- func (cli *Client) RemoveBridge(c *cli.Context) (err error)
- func (cli *Client) RemoveEVMChain(c *cli.Context) (err error)
- func (cli *Client) RemoveEVMNode(c *cli.Context) (err error)
- func (cli *Client) RemoveTerraChain(c *cli.Context) (err error)
- func (cli *Client) RemoveTerraNode(c *cli.Context) (err error)
- func (cli *Client) ReplayFromBlock(c *clipkg.Context) (err error)
- func (cli *Client) ResetDatabase(c *clipkg.Context) error
- func (cli *Client) RollbackDatabase(c *clipkg.Context) error
- func (cli *Client) RunNode(c *clipkg.Context) error
- func (cli *Client) SendEther(c *cli.Context) (err error)
- func (cli *Client) SetEvmGasPriceDefault(c *clipkg.Context) (err error)
- func (cli *Client) SetLogLevel(c *clipkg.Context) (err error)
- func (cli *Client) SetLogPkg(c *clipkg.Context) (err error)
- func (cli *Client) SetLogSQL(c *clipkg.Context) (err error)
- func (cli *Client) SetNextNonce(c *clipkg.Context) error
- func (cli *Client) ShowBridge(c *cli.Context) (err error)
- func (cli *Client) ShowJob(c *cli.Context) (err error)
- func (cli *Client) ShowTransaction(c *cli.Context) (err error)
- func (cli *Client) Status(c *clipkg.Context) error
- func (cli *Client) StatusDatabase(c *clipkg.Context) error
- func (cli *Client) TriggerPipelineRun(c *cli.Context) error
- func (cli *Client) UpdateETHKey(c *cli.Context) (err error)
- func (cli *Client) VersionDatabase(c *clipkg.Context) error
- type CookieAuthenticator
- type CookieStore
- type DiskCookieConfig
- type DiskCookieStore
- type EVMChainPresenter
- type EVMChainPresenters
- type EVMNodePresenter
- type EVMNodePresenters
- type EthKeyPresenter
- type EthKeyPresenters
- type EthTxPresenter
- type EthTxPresenters
- type ExternalInitiatorPresenter
- type ExternalInitiatorPresenters
- type HTTPClient
- type HTTPClientConfig
- type HealthCheckPresenter
- type HealthCheckPresenters
- type JAID
- type JobPresenter
- type JobPresenters
- type MemoryCookieStore
- type OCR2KeyBundlePresenter
- type OCR2KeyBundlePresenters
- type OCRKeyBundlePresenter
- type OCRKeyBundlePresenters
- type P2PKeyPresenter
- type P2PKeyPresenters
- type PasswordPrompter
- type Prompter
- type Renderer
- type RendererJSON
- type RendererTable
- type Runner
- type SessionCookieAuthenticator
- type SessionCookieAuthenticatorConfig
- type SessionRequestBuilder
- type SolanaKeyPresenter
- type SolanaKeyPresenters
- type TableRenderer
- type TerminalKeyStoreAuthenticator
- type TerraChainPresenter
- type TerraChainPresenters
- type TerraKeyPresenter
- type TerraKeyPresenters
- type TerraNodePresenter
- type TerraNodePresenters
- type VRFKeyPresenter
- type VRFKeyPresenters
Constants ¶
This section is empty.
Variables ¶
var ErrNoCredentialFile = errors.New("no API user credential file was passed")
var ( // ErrorNoAPICredentialsAvailable is returned when not run from a terminal // and no API credentials have been provided ErrorNoAPICredentialsAvailable = errors.New("API credentials must be supplied") )
Functions ¶
Types ¶
type APIInitializer ¶
type APIInitializer interface { // Initialize creates a new user for API access, or does nothing if one exists. Initialize(orm sessions.ORM) (sessions.User, error) }
APIInitializer is the interface used to create the API User credentials needed to access the API. Does nothing if API user already exists.
func NewFileAPIInitializer ¶
func NewFileAPIInitializer(file string, lggr logger.Logger) APIInitializer
NewFileAPIInitializer creates a concrete instance of APIInitializer that pulls API user credentials from the passed file path.
func NewPromptingAPIInitializer ¶
func NewPromptingAPIInitializer(prompter Prompter) APIInitializer
NewPromptingAPIInitializer creates a concrete instance of APIInitializer that uses the terminal to solicit credentials from the user.
type AppFactory ¶
type AppFactory interface {
NewApplication(cfg config.GeneralConfig, db *sqlx.DB) (chainlink.Application, error)
}
AppFactory implements the NewApplication method.
type BridgePresenter ¶ added in v0.10.6
type BridgePresenter struct {
presenters.BridgeResource
}
func (*BridgePresenter) FriendlyConfirmations ¶ added in v0.10.6
func (p *BridgePresenter) FriendlyConfirmations() string
FriendlyConfirmations converts the confirmations to a string
func (*BridgePresenter) RenderTable ¶ added in v0.10.6
func (p *BridgePresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type BridgePresenters ¶ added in v0.10.6
type BridgePresenters []BridgePresenter
func (BridgePresenters) RenderTable ¶ added in v0.10.6
func (ps BridgePresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type CSAKeyPresenter ¶ added in v0.10.8
type CSAKeyPresenter struct { JAID presenters.CSAKeyResource }
func (*CSAKeyPresenter) RenderTable ¶ added in v0.10.8
func (p *CSAKeyPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*CSAKeyPresenter) ToRow ¶ added in v0.10.8
func (p *CSAKeyPresenter) ToRow() []string
type CSAKeyPresenters ¶ added in v0.10.8
type CSAKeyPresenters []CSAKeyPresenter
func (CSAKeyPresenters) RenderTable ¶ added in v0.10.8
func (ps CSAKeyPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type ChainlinkAppFactory ¶
type ChainlinkAppFactory struct{}
ChainlinkAppFactory is used to create a new Application.
func (ChainlinkAppFactory) NewApplication ¶
func (n ChainlinkAppFactory) NewApplication(cfg config.GeneralConfig, db *sqlx.DB) (app chainlink.Application, err error)
NewApplication returns a new instance of the node with the given config.
type ChainlinkRunner ¶
type ChainlinkRunner struct{}
ChainlinkRunner is used to run the node application.
func (ChainlinkRunner) Run ¶
func (n ChainlinkRunner) Run(ctx context.Context, app chainlink.Application) error
Run sets the log level based on config and starts the web router to listen for input and return data.
type ChangePasswordPrompter ¶
type ChangePasswordPrompter interface {
Prompt() (web.UpdatePasswordRequest, error)
}
ChangePasswordPrompter is an interface primarily used for DI to obtain a password change request from the User.
func NewChangePasswordPrompter ¶
func NewChangePasswordPrompter() ChangePasswordPrompter
NewChangePasswordPrompter returns the production password change request prompter
type Client ¶
type Client struct { Renderer Config config.GeneralConfig Logger logger.Logger AppFactory AppFactory KeyStoreAuthenticator TerminalKeyStoreAuthenticator FallbackAPIInitializer APIInitializer Runner Runner HTTP HTTPClient CookieAuthenticator CookieAuthenticator FileSessionRequestBuilder SessionRequestBuilder PromptingSessionRequestBuilder SessionRequestBuilder ChangePasswordPrompter ChangePasswordPrompter PasswordPrompter PasswordPrompter }
Client is the shell for the node, local commands and remote commands.
func (*Client) ChangePassword ¶
ChangePassword prompts the user for the old password and a new one, then posts it to Chainlink to change the password.
func (*Client) ConfigureEVMChain ¶ added in v1.2.0
ConfigureEVMChain configures an existing EVM chain.
func (*Client) ConfigureTerraChain ¶ added in v1.2.0
ConfigureTerraChain configures an existing Terra chain.
func (*Client) CreateBridge ¶ added in v0.6.6
CreateBridge adds a new bridge to the chainlink node
func (*Client) CreateCSAKey ¶ added in v0.10.8
CreateCSAKey creates a new CSA key
func (*Client) CreateETHKey ¶ added in v0.9.9
CreateETHKey creates a new ethereum key with the same password as the one used to unlock the existing key.
func (*Client) CreateEVMChain ¶ added in v1.2.0
CreateEVMChain adds a new EVM chain.
func (*Client) CreateEVMNode ¶ added in v1.2.0
CreateEVMNode adds a new node to the nodelink node
func (*Client) CreateExternalInitiator ¶
CreateExternalInitiator adds an external initiator
func (*Client) CreateJob ¶ added in v1.1.0
CreateJob creates a job Valid input is a TOML string or a path to TOML file
func (*Client) CreateMigration ¶ added in v1.0.0
CreateMigration displays the database migration status
func (*Client) CreateOCR2KeyBundle ¶ added in v1.2.0
CreateOCR2KeyBundle creates an OCR2 key bundle and saves it to the keystore
func (*Client) CreateOCRKeyBundle ¶ added in v0.8.17
CreateOCR2KeyBundle creates an OCR key bundle and saves it to the keystore
func (*Client) CreateP2PKey ¶ added in v0.8.12
CreateP2PKey creates a new P2P key
func (*Client) CreateSolanaKey ¶ added in v1.2.0
CreateSolanaKey creates a new Solana key
func (*Client) CreateTerraChain ¶ added in v1.2.0
CreateTerraChain adds a new Terra chain.
func (*Client) CreateTerraKey ¶ added in v1.2.0
CreateTerraKey creates a new Terra key
func (*Client) CreateTerraNode ¶ added in v1.2.0
CreateTerraNode adds a new node to the nodelink node
func (*Client) CreateVRFKey ¶ added in v0.8.2
CreateVRFKey creates a key in the VRF keystore, protected by the password in the vrf password file provided when starting the chainlink node.
func (*Client) DeleteETHKey ¶ added in v0.9.9
DeleteETHKey deletes an Ethereum key, address of key must be passed
func (*Client) DeleteExternalInitiator ¶
DeleteExternalInitiator removes an external initiator
func (*Client) DeleteOCR2KeyBundle ¶ added in v1.2.0
DeleteOCR2KeyBundle deletes an OCR2 key bundle
func (*Client) DeleteOCRKeyBundle ¶ added in v0.8.17
DeleteOCR2KeyBundle deletes an OCR key bundle
func (*Client) DeleteP2PKey ¶ added in v0.9.0
DeleteP2PKey deletes a P2P key, key ID must be passed
func (*Client) DeleteSolanaKey ¶ added in v1.2.0
DeleteSolanaKey deletes a Solana key, key ID must be passed
func (*Client) DeleteTerraKey ¶ added in v1.2.0
DeleteTerraKey deletes a Terra key, key ID must be passed
func (*Client) DeleteVRFKey ¶ added in v0.8.2
DeleteVRFKey deletes (hard or soft) the VRF key with given public key from the db and memory. V2 jobs referencing the VRF key will be removed if the key is deleted (no such protection for the V1 jobs exists).
func (*Client) ExportCSAKey ¶ added in v1.1.0
ExportCSAKey exports a CSA key. Key ID must be passed.
func (*Client) ExportETHKey ¶ added in v0.9.9
ExportETHKey exports an ETH key, address must be passed
func (*Client) ExportOCR2Key ¶ added in v1.2.0
ExportOCR2Key exports an OCR2 key bundle by ID
func (*Client) ExportOCRKey ¶ added in v0.9.9
ExportOCR2Key exports an OCR key bundle by ID
func (*Client) ExportP2PKey ¶ added in v0.9.9
ExportP2PKey exports a P2P key, key ID must be passed
func (*Client) ExportSolanaKey ¶ added in v1.2.0
ExportSolanaKey exports a Solana key, key ID must be passed
func (*Client) ExportTerraKey ¶ added in v1.2.0
ExportTerraKey exports a Terra key, key ID must be passed
func (*Client) ExportVRFKey ¶ added in v0.8.2
ExportVRFKey saves encrypted copy of VRF key with given public key to requested file path.
func (*Client) GetConfiguration ¶ added in v0.6.10
GetConfiguration gets the nodes environment variables
func (*Client) ImportCSAKey ¶ added in v1.1.0
ImportCSAKey imports and stores a CSA key. Path to key must be passed.
func (*Client) ImportETHKey ¶ added in v0.9.9
ImportETHKey imports an Ethereum key, file path must be passed
func (*Client) ImportOCR2Key ¶ added in v1.2.0
ImportOCR2Key imports OCR2 key bundle
func (*Client) ImportOCRKey ¶ added in v0.9.9
ImportOCR2Key imports OCR key bundle
func (*Client) ImportP2PKey ¶ added in v0.9.9
ImportP2PKey imports and stores a P2P key, path to key must be passed
func (*Client) ImportSolanaKey ¶ added in v1.2.0
ImportSolanaKey imports and stores a Solana key, path to key must be passed
func (*Client) ImportTerraKey ¶ added in v1.2.0
ImportTerraKey imports and stores a Terra key, path to key must be passed
func (*Client) ImportVRFKey ¶ added in v0.8.2
ImportVRFKey reads a file into an EncryptedVRFKey in the db
func (*Client) IndexBridges ¶ added in v0.6.6
IndexBridges returns all bridges.
func (*Client) IndexEVMChains ¶ added in v1.2.0
IndexEVMChains returns all EVM chains.
func (*Client) IndexEVMNodes ¶ added in v1.2.0
IndexEVMNodes returns all EVM nodes.
func (*Client) IndexExternalInitiators ¶ added in v0.10.11
IndexExternalInitiators lists external initiators
func (*Client) IndexTerraChains ¶ added in v1.2.0
IndexTerraChains returns all Terra chains.
func (*Client) IndexTerraNodes ¶ added in v1.2.0
IndexTerraNodes returns all Terra nodes.
func (*Client) IndexTransactions ¶ added in v0.6.6
IndexTransactions returns the list of transactions in descending order, taking an optional page parameter
func (*Client) IndexTxAttempts ¶ added in v0.6.6
IndexTxAttempts returns the list of transactions in descending order, taking an optional page parameter
func (*Client) ListCSAKeys ¶ added in v0.10.8
ListCSAKeys retrieves a list of all CSA keys
func (*Client) ListETHKeys ¶ added in v0.9.3
ListETHKeys renders the active account address with its ETH & LINK balance
func (*Client) ListOCR2KeyBundles ¶ added in v1.2.0
ListOCR2KeyBundles lists the available OCR2 Key Bundles
func (*Client) ListOCRKeyBundles ¶ added in v0.8.17
ListOCRKeyBundles lists the available OCR Key Bundles
func (*Client) ListP2PKeys ¶ added in v0.9.0
ListP2PKeys retrieves a list of all P2P keys
func (*Client) ListSolanaKeys ¶ added in v1.2.0
ListSolanaKeys retrieves a list of all Solana keys
func (*Client) ListTerraKeys ¶ added in v1.2.0
ListTerraKeys retrieves a list of all Terra keys
func (*Client) ListVRFKeys ¶ added in v0.10.5
ListKeys Lists the keys in the db
func (*Client) MigrateDatabase ¶ added in v0.10.8
MigrateDatabase migrates the database
func (*Client) PrepareTestDatabase ¶ added in v0.8.4
PrepareTestDatabase calls ResetDatabase then loads fixtures required for tests
func (*Client) PrepareTestDatabaseUserOnly ¶ added in v1.1.0
PrepareTestDatabase calls ResetDatabase then loads fixtures required for local testing against testnets. Does not include fake chain fixtures.
func (*Client) RebroadcastTransactions ¶ added in v0.8.2
RebroadcastTransactions run locally to force manual rebroadcasting of transactions in a given nonce range.
func (*Client) RemoteLogin ¶
RemoteLogin creates a cookie session to run remote commands.
func (*Client) RemoveBridge ¶
RemoveBridge removes a specific Bridge by name.
func (*Client) RemoveEVMChain ¶ added in v1.2.0
RemoveEVMChain removes a specific EVM Chain by id.
func (*Client) RemoveEVMNode ¶ added in v1.2.0
RemoveEVMNode removes a specific EVM Node by name.
func (*Client) RemoveTerraChain ¶ added in v1.2.0
RemoveTerraChain removes a specific Terra Chain by id.
func (*Client) RemoveTerraNode ¶ added in v1.2.0
RemoveTerraNode removes a specific Terra Node by name.
func (*Client) ReplayFromBlock ¶ added in v0.10.11
ReplayFromBlock replays chain data from the given block number until the most recent
func (*Client) ResetDatabase ¶ added in v0.8.4
ResetDatabase drops, creates and migrates the database specified by DATABASE_URL This is useful to setup the database for testing
func (*Client) RollbackDatabase ¶ added in v1.0.0
VersionDatabase displays the current database version.
func (*Client) SetEvmGasPriceDefault ¶ added in v1.1.0
SetEvmGasPriceDefault specifies the minimum gas price to use for outgoing transactions
func (*Client) SetLogLevel ¶ added in v0.10.4
SetLogLevel sets the log level on the node
func (*Client) SetNextNonce ¶ added in v0.8.7
SetNextNonce manually updates the keys.next_nonce field for the given key with the given nonce value
func (*Client) ShowBridge ¶
ShowBridge returns the info for the given Bridge name.
func (*Client) ShowTransaction ¶ added in v0.6.6
ShowTransaction returns the info for the given transaction hash
func (*Client) StatusDatabase ¶ added in v1.0.0
StatusDatabase displays the database migration status
func (*Client) TriggerPipelineRun ¶ added in v0.9.7
TriggerPipelineRun triggers a job run based on a job ID
func (*Client) UpdateETHKey ¶ added in v1.1.0
UpdateETHKey updates an Ethereum key's parameters, address of key must be passed as well as at least one parameter to update
type CookieAuthenticator ¶
type CookieAuthenticator interface { Cookie() (*http.Cookie, error) Authenticate(sessions.SessionRequest) (*http.Cookie, error) }
CookieAuthenticator is the interface to generating a cookie to authenticate future HTTP requests.
func NewSessionCookieAuthenticator ¶
func NewSessionCookieAuthenticator(config SessionCookieAuthenticatorConfig, store CookieStore, lggr logger.Logger) CookieAuthenticator
NewSessionCookieAuthenticator creates a SessionCookieAuthenticator using the passed config and builder.
type CookieStore ¶
CookieStore is a place to store and retrieve cookies.
type DiskCookieConfig ¶ added in v1.0.0
type DiskCookieConfig interface {
RootDir() string
}
type DiskCookieStore ¶
type DiskCookieStore struct {
Config DiskCookieConfig
}
DiskCookieStore saves a single cookie in the local cli working directory.
type EVMChainPresenter ¶ added in v1.2.0
type EVMChainPresenter struct {
presenters.EVMChainResource
}
EVMChainPresenter implements TableRenderer for an EVMChainResource.
func (EVMChainPresenter) RenderTable ¶ added in v1.2.0
func (p EVMChainPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer Just renders a single row
func (*EVMChainPresenter) ToRow ¶ added in v1.2.0
func (p *EVMChainPresenter) ToRow() []string
ToRow presents the EVMChainResource as a slice of strings.
type EVMChainPresenters ¶ added in v1.2.0
type EVMChainPresenters []EVMChainPresenter
EVMChainPresenters implements TableRenderer for a slice of EVMChainPresenters.
func (EVMChainPresenters) RenderTable ¶ added in v1.2.0
func (ps EVMChainPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type EVMNodePresenter ¶ added in v1.2.0
type EVMNodePresenter struct {
presenters.EVMNodeResource
}
EVMNodePresenter implements TableRenderer for an EVMNodeResource.
func (EVMNodePresenter) RenderTable ¶ added in v1.2.0
func (p EVMNodePresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*EVMNodePresenter) ToRow ¶ added in v1.2.0
func (p *EVMNodePresenter) ToRow() []string
ToRow presents the EVMNodeResource as a slice of strings.
type EVMNodePresenters ¶ added in v1.2.0
type EVMNodePresenters []EVMNodePresenter
EVMNodePresenters implements TableRenderer for a slice of EVMNodePresenter.
func (EVMNodePresenters) RenderTable ¶ added in v1.2.0
func (ps EVMNodePresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type EthKeyPresenter ¶ added in v0.10.6
type EthKeyPresenter struct {
presenters.ETHKeyResource
}
func (*EthKeyPresenter) RenderTable ¶ added in v0.10.6
func (p *EthKeyPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*EthKeyPresenter) ToRow ¶ added in v0.10.6
func (p *EthKeyPresenter) ToRow() []string
type EthKeyPresenters ¶ added in v0.10.6
type EthKeyPresenters []EthKeyPresenter
func (EthKeyPresenters) RenderTable ¶ added in v0.10.6
func (ps EthKeyPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type EthTxPresenter ¶ added in v0.10.6
type EthTxPresenter struct { JAID presenters.EthTxResource }
func (*EthTxPresenter) RenderTable ¶ added in v0.10.6
func (p *EthTxPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type EthTxPresenters ¶ added in v0.10.6
type EthTxPresenters []EthTxPresenter
func (EthTxPresenters) RenderTable ¶ added in v0.10.6
func (ps EthTxPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type ExternalInitiatorPresenter ¶ added in v0.10.11
type ExternalInitiatorPresenter struct { JAID presenters.ExternalInitiatorResource }
func (*ExternalInitiatorPresenter) RenderTable ¶ added in v0.10.11
func (eip *ExternalInitiatorPresenter) RenderTable(rt RendererTable) error
func (*ExternalInitiatorPresenter) ToRow ¶ added in v0.10.11
func (eip *ExternalInitiatorPresenter) ToRow() []string
type ExternalInitiatorPresenters ¶ added in v0.10.11
type ExternalInitiatorPresenters []ExternalInitiatorPresenter
func (*ExternalInitiatorPresenters) RenderTable ¶ added in v0.10.11
func (eips *ExternalInitiatorPresenters) RenderTable(rt RendererTable) error
type HTTPClient ¶
type HTTPClient interface { Get(string, ...map[string]string) (*http.Response, error) Post(string, io.Reader) (*http.Response, error) Put(string, io.Reader) (*http.Response, error) Patch(string, io.Reader, ...map[string]string) (*http.Response, error) Delete(string) (*http.Response, error) }
HTTPClient encapsulates all methods used to interact with a chainlink node API.
func NewAuthenticatedHTTPClient ¶
func NewAuthenticatedHTTPClient(config HTTPClientConfig, cookieAuth CookieAuthenticator, sessionRequest sessions.SessionRequest) HTTPClient
NewAuthenticatedHTTPClient uses the CookieAuthenticator to generate a sessionID which is then used for all subsequent HTTP API requests.
type HTTPClientConfig ¶ added in v1.0.0
type HTTPClientConfig interface { SessionCookieAuthenticatorConfig }
type HealthCheckPresenter ¶ added in v0.10.8
type HealthCheckPresenter struct {
webPresenters.Check
}
func (*HealthCheckPresenter) ToRow ¶ added in v0.10.8
func (p *HealthCheckPresenter) ToRow() []string
type HealthCheckPresenters ¶ added in v0.10.8
type HealthCheckPresenters []HealthCheckPresenter
func (HealthCheckPresenters) RenderTable ¶ added in v0.10.8
func (ps HealthCheckPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type JAID ¶ added in v0.10.3
type JAID struct {
ID string `json:"id"`
}
JAID represents a JSON API ID.
It implements the api2go MarshalIdentifier and UnmarshalIdentitier interface.
When you embed a JSONAPI resource into a presenter, it will not render the ID into the JSON object when you perform a json.Marshal. Instead we use this to override the ID field of the resource with a JSON tag that will render.
Embed this into a Presenter to render the ID. For example
type JobPresenter struct { JAID presenters.JobResource }
type JobPresenter ¶ added in v0.10.5
type JobPresenter struct { JAID // This is needed to render the id for a JSONAPI Resource as normal JSON presenters.JobResource }
JobRenderer wraps the JSONAPI Job Resource and adds rendering functionality
func (JobPresenter) FriendlyCreatedAt ¶ added in v0.10.5
func (p JobPresenter) FriendlyCreatedAt() string
FriendlyCreatedAt returns the created at timestamp of the spec which matches the type in RFC3339 format.
func (JobPresenter) FriendlyTasks ¶ added in v0.10.5
func (p JobPresenter) FriendlyTasks() []string
FriendlyTasks returns the tasks
func (JobPresenter) GetTasks ¶ added in v0.10.5
func (p JobPresenter) GetTasks() ([]string, error)
GetTasks extracts the tasks from the dependency graph
func (*JobPresenter) RenderTable ¶ added in v0.10.6
func (p *JobPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (JobPresenter) ToRows ¶ added in v0.10.5
func (p JobPresenter) ToRows() [][]string
ToRows returns the job as a multiple rows per task
type JobPresenters ¶ added in v0.10.6
type JobPresenters []JobPresenter
func (JobPresenters) RenderTable ¶ added in v0.10.6
func (ps JobPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type MemoryCookieStore ¶
MemoryCookieStore keeps a single cookie in memory
type OCR2KeyBundlePresenter ¶ added in v1.2.0
type OCR2KeyBundlePresenter struct { JAID // Include this to overwrite the presenter JAID so it can correctly render the ID in JSON presenters.OCR2KeysBundleResource }
func (*OCR2KeyBundlePresenter) RenderTable ¶ added in v1.2.0
func (p *OCR2KeyBundlePresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*OCR2KeyBundlePresenter) ToRow ¶ added in v1.2.0
func (p *OCR2KeyBundlePresenter) ToRow() []string
type OCR2KeyBundlePresenters ¶ added in v1.2.0
type OCR2KeyBundlePresenters []OCR2KeyBundlePresenter
func (OCR2KeyBundlePresenters) RenderTable ¶ added in v1.2.0
func (ps OCR2KeyBundlePresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type OCRKeyBundlePresenter ¶ added in v0.10.6
type OCRKeyBundlePresenter struct { JAID // Include this to overwrite the presenter JAID so it can correctly render the ID in JSON presenters.OCRKeysBundleResource }
func (*OCRKeyBundlePresenter) RenderTable ¶ added in v0.10.6
func (p *OCRKeyBundlePresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*OCRKeyBundlePresenter) ToRow ¶ added in v0.10.6
func (p *OCRKeyBundlePresenter) ToRow() []string
type OCRKeyBundlePresenters ¶ added in v0.10.6
type OCRKeyBundlePresenters []OCRKeyBundlePresenter
func (OCRKeyBundlePresenters) RenderTable ¶ added in v0.10.6
func (ps OCRKeyBundlePresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type P2PKeyPresenter ¶ added in v0.10.5
type P2PKeyPresenter struct { JAID presenters.P2PKeyResource }
func (*P2PKeyPresenter) RenderTable ¶ added in v0.10.6
func (p *P2PKeyPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*P2PKeyPresenter) ToRow ¶ added in v0.10.6
func (p *P2PKeyPresenter) ToRow() []string
type P2PKeyPresenters ¶ added in v0.10.6
type P2PKeyPresenters []P2PKeyPresenter
func (P2PKeyPresenters) RenderTable ¶ added in v0.10.6
func (ps P2PKeyPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type PasswordPrompter ¶
type PasswordPrompter interface {
Prompt() string
}
PasswordPrompter is an interface primarily used for DI to obtain a password from the User.
func NewPasswordPrompter ¶
func NewPasswordPrompter() PasswordPrompter
NewPasswordPrompter returns the production password change request prompter
type Prompter ¶
Prompter implements the Prompt function to be used to display at the console.
func NewTerminalPrompter ¶
func NewTerminalPrompter() Prompter
NewTerminalPrompter prompts the user via terminal.
type RendererJSON ¶
RendererJSON is used to render JSON data.
func (RendererJSON) Render ¶
func (rj RendererJSON) Render(v interface{}, _ ...string) error
Render writes the given input as a JSON string.
type RendererTable ¶
RendererTable is used for data to be rendered as a table.
func (RendererTable) Render ¶
func (rt RendererTable) Render(v interface{}, headers ...string) error
Render returns a formatted table of text for a given Job or presenter and relevant information.
type Runner ¶
type Runner interface {
Run(context.Context, chainlink.Application) error
}
Runner implements the Run method.
type SessionCookieAuthenticator ¶
type SessionCookieAuthenticator struct {
// contains filtered or unexported fields
}
SessionCookieAuthenticator is a concrete implementation of CookieAuthenticator that retrieves a session id for the user with credentials from the session request.
func (*SessionCookieAuthenticator) Authenticate ¶
func (t *SessionCookieAuthenticator) Authenticate(sessionRequest sessions.SessionRequest) (*http.Cookie, error)
Authenticate retrieves a session ID via a cookie and saves it to disk.
type SessionCookieAuthenticatorConfig ¶ added in v1.0.0
type SessionRequestBuilder ¶
type SessionRequestBuilder interface {
Build(flag string) (sessions.SessionRequest, error)
}
SessionRequestBuilder is an interface that returns a SessionRequest, abstracting how session requests are generated, whether they be from the prompt or from a file.
func NewFileSessionRequestBuilder ¶
func NewFileSessionRequestBuilder(lggr logger.Logger) SessionRequestBuilder
NewFileSessionRequestBuilder pulls credentials from a file to generate a SessionRequest.
func NewPromptingSessionRequestBuilder ¶
func NewPromptingSessionRequestBuilder(prompter Prompter) SessionRequestBuilder
NewPromptingSessionRequestBuilder uses a prompter, often via terminal, to solicit information from a user to generate the SessionRequest.
type SolanaKeyPresenter ¶ added in v1.2.0
type SolanaKeyPresenter struct { JAID presenters.SolanaKeyResource }
func (*SolanaKeyPresenter) RenderTable ¶ added in v1.2.0
func (p *SolanaKeyPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*SolanaKeyPresenter) ToRow ¶ added in v1.2.0
func (p *SolanaKeyPresenter) ToRow() []string
type SolanaKeyPresenters ¶ added in v1.2.0
type SolanaKeyPresenters []SolanaKeyPresenter
func (SolanaKeyPresenters) RenderTable ¶ added in v1.2.0
func (ps SolanaKeyPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type TableRenderer ¶ added in v0.10.6
type TableRenderer interface {
RenderTable(rt RendererTable) error
}
type TerminalKeyStoreAuthenticator ¶
type TerminalKeyStoreAuthenticator struct {
Prompter Prompter
}
TerminalKeyStoreAuthenticator contains fields for prompting the user and an exit code.
type TerraChainPresenter ¶ added in v1.2.0
type TerraChainPresenter struct {
presenters.TerraChainResource
}
TerraChainPresenter implements TableRenderer for a TerraChainResource
func (TerraChainPresenter) RenderTable ¶ added in v1.2.0
func (p TerraChainPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer Just renders a single row
func (*TerraChainPresenter) ToRow ¶ added in v1.2.0
func (p *TerraChainPresenter) ToRow() []string
ToRow presents the TerraChainResource as a slice of strings.
type TerraChainPresenters ¶ added in v1.2.0
type TerraChainPresenters []TerraChainPresenter
TerraChainPresenters implements TableRenderer for a slice of TerraChainPresenters.
func (TerraChainPresenters) RenderTable ¶ added in v1.2.0
func (ps TerraChainPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type TerraKeyPresenter ¶ added in v1.2.0
type TerraKeyPresenter struct { JAID presenters.TerraKeyResource }
func (*TerraKeyPresenter) RenderTable ¶ added in v1.2.0
func (p *TerraKeyPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*TerraKeyPresenter) ToRow ¶ added in v1.2.0
func (p *TerraKeyPresenter) ToRow() []string
type TerraKeyPresenters ¶ added in v1.2.0
type TerraKeyPresenters []TerraKeyPresenter
func (TerraKeyPresenters) RenderTable ¶ added in v1.2.0
func (ps TerraKeyPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type TerraNodePresenter ¶ added in v1.2.0
type TerraNodePresenter struct {
presenters.TerraNodeResource
}
TerraNodePresenter implements TableRenderer for a TerraNodeResource.
func (TerraNodePresenter) RenderTable ¶ added in v1.2.0
func (p TerraNodePresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*TerraNodePresenter) ToRow ¶ added in v1.2.0
func (p *TerraNodePresenter) ToRow() []string
ToRow presents the TerraNodeResource as a slice of strings.
type TerraNodePresenters ¶ added in v1.2.0
type TerraNodePresenters []TerraNodePresenter
TerraNodePresenters implements TableRenderer for a slice of TerraNodePresenter.
func (TerraNodePresenters) RenderTable ¶ added in v1.2.0
func (ps TerraNodePresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
type VRFKeyPresenter ¶ added in v0.10.5
type VRFKeyPresenter struct { JAID // Include this to overwrite the presenter JAID so it can correctly render the ID in JSON presenters.VRFKeyResource }
func (*VRFKeyPresenter) RenderTable ¶ added in v0.10.6
func (p *VRFKeyPresenter) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
func (*VRFKeyPresenter) ToRow ¶ added in v0.10.6
func (p *VRFKeyPresenter) ToRow() []string
type VRFKeyPresenters ¶ added in v0.10.6
type VRFKeyPresenters []VRFKeyPresenter
func (VRFKeyPresenters) RenderTable ¶ added in v0.10.6
func (ps VRFKeyPresenters) RenderTable(rt RendererTable) error
RenderTable implements TableRenderer
Source Files ¶
- app.go
- bridge_commands.go
- client.go
- csa_keys_commands.go
- doc.go
- eth_keys_commands.go
- evm_chains_commands.go
- evm_node_commands.go
- external_initiator_commands.go
- jobs_commands.go
- key_store_authenticator.go
- local_client.go
- ocr2_keys_commands.go
- ocr_keys_commands.go
- p2p_keys_commands.go
- presenters.go
- prompter.go
- remote_client.go
- renderer.go
- solana_keys_commands.go
- terra_chains_commands.go
- terra_keys_commands.go
- terra_node_commands.go
- transaction_commands.go
- vrf_keys_commands.go