web

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: 73 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PaginationDefault is the number of records to supply from a paginated
	// request when no size param is supplied.
	PaginationDefault = 25

	// MediaType is the response header for JSONAPI documents.
	MediaType = "application/vnd.api+json"

	// KeyNextLink is the name of the key that contains the HREF for the next
	// document in a paginated response.
	KeyNextLink = "next"
	// KeyPreviousLink is the name of the key that contains the HREF for the
	// previous document in a paginated response.
	KeyPreviousLink = "prev"
)
View Source
const (
	// APIKey is the header name for the API token identifier for user authentication.
	APIKey = "X-API-KEY"
	// APISecret is the header name for the API token secret for user authentication.
	APISecret = "X-API-SECRET"
)
View Source
const (
	FeatureKeyCSA          string = "csa"
	FeatureKeyFeedsManager string = "feeds_manager"
)
View Source
const (
	// SessionName is the session name
	SessionName = "clsession"
	// SessionIDKey is the session ID key in the session map
	SessionIDKey = "clsession_id"
	// SessionUserKey is the User key in the session map
	SessionUserKey = "user"
	// SessionExternalInitiatorKey is the External Initiator key in the session map
	SessionExternalInitiatorKey = "external_initiator"
)

Variables

View Source
var (
	ErrMissingChainID = errors.New("evmChainID does not match any local chains")
	ErrInvalidChainID = errors.New("invalid evmChainID")
	ErrMultipleChains = errors.New("more than one chain available, you must specify evmChainID parameter")
)

Functions

func AuthenticateBySession added in v1.10.16

func AuthenticateBySession(store AuthStorer, c *gin.Context) error

func AuthenticateByToken added in v1.10.16

func AuthenticateByToken(store AuthStorer, c *gin.Context) error

AuthenticateByToken authenticates a User by their API token.

func AuthenticateExternalInitiator added in v1.10.16

func AuthenticateExternalInitiator(store AuthStorer, c *gin.Context) error

func FindSessionCookie added in v1.10.16

func FindSessionCookie(cookies []*http.Cookie) *http.Cookie

FindSessionCookie returns the cookie with the "clsession" name

func GzipFileServer added in v1.10.16

func GzipFileServer(root ServeFileSystem) http.Handler

GzipFileServer is a drop-in replacement for Go's standard http.FileServer which adds support for static resources precompressed with gzip, at the cost of removing the support for directory browsing.

func NewJSONAPIResponse

func NewJSONAPIResponse(resource interface{}) ([]byte, error)

NewJSONAPIResponse returns a JSONAPI response for a single resource.

func NewPaginatedResponse

func NewPaginatedResponse(url url.URL, size, page, count int, resource interface{}) ([]byte, error)

NewPaginatedResponse returns a jsonapi.Document with links to next and previous collection pages

func NewPaginatedResponseWithMeta added in v1.10.16

func NewPaginatedResponseWithMeta(url url.URL, size, page, count int, resource interface{}, meta map[string]interface{}) ([]byte, error)

func ParseJSONAPIResponse

func ParseJSONAPIResponse(input []byte, resource interface{}) error

ParseJSONAPIResponse parses the bytes of the root document and unmarshals it into the given resource.

func ParsePaginatedRequest

func ParsePaginatedRequest(sizeParam, pageParam string) (int, int, int, error)

ParsePaginatedRequest parses the parameters that control pagination for a collection request, returning the size and offset if specified, or a sensible default.

func ParsePaginatedResponse

func ParsePaginatedResponse(input []byte, resource interface{}, links *jsonapi.Links) error

ParsePaginatedResponse parse a JSONAPI response for a document with links

func ParsePaginatedResponseWithMeta added in v1.10.16

func ParsePaginatedResponseWithMeta(input []byte, resource interface{}, links *jsonapi.Links, meta *jsonapi.Meta) error

ParsePaginatedResponse parse a JSONAPI response for a document with links

func RequireAuth added in v1.10.16

func RequireAuth(store AuthStorer, methods ...authType) gin.HandlerFunc

func Router

func Router(app chainlink.Application, prometheus *ginprom.Prometheus) *gin.Engine

Router listens and responds to requests to the node for valid paths.

func ServeGzippedAssets added in v1.10.16

func ServeGzippedAssets(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc

Static returns a middleware handler that serves static files in the given directory.

func ValidateBridgeType added in v1.10.17

func ValidateBridgeType(bt *bridges.BridgeTypeRequest, orm bridges.ORM) error

ValidateBridgeType checks that the bridge type doesn't have a duplicate or invalid name or invalid url

func ValidateBridgeTypeNotExist added in v1.10.17

func ValidateBridgeTypeNotExist(bt *bridges.BridgeTypeRequest, orm bridges.ORM) error

ValidateBridgeTypeNotExist checks that a bridge has not already been created

func ValidateExternalInitiator added in v1.10.17

func ValidateExternalInitiator(
	exi *bridges.ExternalInitiatorRequest,
	orm bridges.ORM,
) error

ValidateExternalInitiator checks whether External Initiator parameters are safe for processing.

Types

type AuthStorer added in v1.10.16

type AuthStorer interface {
	AuthorizedUserWithSession(sessionID string) (clsessions.User, error)
	FindExternalInitiator(eia *auth.Token) (*bridges.ExternalInitiator, error)
	FindUser() (clsessions.User, error)
}

type BoxFileSystem added in v1.10.16

type BoxFileSystem struct {
	packr.Box
}

BoxFileSystem implements ServeFileSystem with a packr box

func (*BoxFileSystem) Exists added in v1.10.16

func (b *BoxFileSystem) Exists(prefix string, filepath string) bool

Exists implements the ServeFileSystem interface

type BridgeTypesController

type BridgeTypesController struct {
	App chainlink.Application
}

BridgeTypesController manages BridgeType requests in the node.

func (*BridgeTypesController) Create

func (btc *BridgeTypesController) Create(c *gin.Context)

Create adds the BridgeType to the given context.

func (*BridgeTypesController) Destroy

func (btc *BridgeTypesController) Destroy(c *gin.Context)

Destroy removes a specific Bridge.

func (*BridgeTypesController) Index

func (btc *BridgeTypesController) Index(c *gin.Context, size, page, offset int)

Index lists Bridges, one page at a time.

func (*BridgeTypesController) Show

func (btc *BridgeTypesController) Show(c *gin.Context)

Show returns the details of a specific Bridge.

func (*BridgeTypesController) Update

func (btc *BridgeTypesController) Update(c *gin.Context)

Update can change the restricted attributes for a bridge

type CSAKeysController added in v1.10.16

type CSAKeysController struct {
	App chainlink.Application
}

CSAKeysController manages CSA keys

func (*CSAKeysController) Create added in v1.10.16

func (ctrl *CSAKeysController) Create(c *gin.Context)

Create and return a CSA key Example: "POST <application>/keys/csa"

func (*CSAKeysController) Export added in v1.10.17

func (ctrl *CSAKeysController) Export(c *gin.Context)

Exports a key

func (*CSAKeysController) Index added in v1.10.16

func (ctrl *CSAKeysController) Index(c *gin.Context)

Index lists CSA keys Example: "GET <application>/keys/csa"

type ChainsController added in v1.10.17

type ChainsController struct {
	App chainlink.Application
}

func (*ChainsController) Create added in v1.10.17

func (cc *ChainsController) Create(c *gin.Context)

func (*ChainsController) Delete added in v1.10.17

func (cc *ChainsController) Delete(c *gin.Context)

func (*ChainsController) Index added in v1.10.17

func (cc *ChainsController) Index(c *gin.Context, size, page, offset int)

func (*ChainsController) Show added in v1.10.17

func (cc *ChainsController) Show(c *gin.Context)

func (*ChainsController) Update added in v1.10.17

func (cc *ChainsController) Update(c *gin.Context)

type Change added in v1.10.16

type Change struct {
	From string `json:"old"`
	To   string `json:"new"`
}

Change represents the old value and the new value after a PATH request has been made

type ConfigController

type ConfigController struct {
	App chainlink.Application
}

ConfigController manages config variables

func (*ConfigController) Patch added in v1.10.16

func (cc *ConfigController) Patch(c *gin.Context)

Patch updates one or more configuration options

func (*ConfigController) Show

func (cc *ConfigController) Show(c *gin.Context)

Show returns the whitelist of config variables Example:

"<application>/config"

type ConfigPatchResponse added in v1.10.16

type ConfigPatchResponse struct {
	EvmGasPriceDefault Change     `json:"ethGasPriceDefault"`
	EVMChainID         *utils.Big `json:"evmChainID"`
}

ConfigPatchResponse represents the change to the configuration made due to a PATCH to the config endpoint

func (ConfigPatchResponse) GetID added in v1.10.16

func (c ConfigPatchResponse) GetID() string

GetID returns the jsonapi ID.

func (*ConfigPatchResponse) SetID added in v1.10.16

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

type CreateChainRequest added in v1.10.17

type CreateChainRequest struct {
	ID     utils.Big      `json:"chainID"`
	Config types.ChainCfg `json:"config"`
}

type CreateFeedsManagerRequest added in v1.10.16

type CreateFeedsManagerRequest struct {
	Name                   string           `json:"name"`
	URI                    string           `json:"uri"`
	JobTypes               []string         `json:"jobTypes"`
	PublicKey              crypto.PublicKey `json:"publicKey"`
	IsBootstrapPeer        bool             `json:"isBootstrapPeer"`
	BootstrapPeerMultiaddr null.String      `json:"bootstrapPeerMultiaddr"`
}

CreateFeedsManagerRequest represents a JSONAPI request for registering a feeds manager

type CreateJobRequest added in v1.10.16

type CreateJobRequest struct {
	TOML string `json:"toml"`
}

CreateJobRequest represents a request to create and start a job (V2).

type ETHKeysController added in v1.10.16

type ETHKeysController struct {
	App chainlink.Application
}

ETHKeysController manages account keys

func (*ETHKeysController) Create added in v1.10.16

func (ekc *ETHKeysController) Create(c *gin.Context)

Create adds a new account Example:

"<application>/keys/eth"

func (*ETHKeysController) Delete added in v1.10.16

func (ekc *ETHKeysController) Delete(c *gin.Context)

Delete an ETH key bundle Example: "DELETE <application>/keys/eth/:keyID" "DELETE <application>/keys/eth/:keyID?hard=true"

func (*ETHKeysController) Export added in v1.10.16

func (ekc *ETHKeysController) Export(c *gin.Context)

func (*ETHKeysController) Import added in v1.10.16

func (ekc *ETHKeysController) Import(c *gin.Context)

Import imports a key

func (*ETHKeysController) Index added in v1.10.16

func (ekc *ETHKeysController) Index(c *gin.Context)

Index returns the node's Ethereum keys and the account balances of ETH & LINK. Example:

"<application>/keys/eth"

type ExternalInitiatorsController

type ExternalInitiatorsController struct {
	App chainlink.Application
}

ExternalInitiatorsController manages external initiators

func (*ExternalInitiatorsController) Create

func (eic *ExternalInitiatorsController) Create(c *gin.Context)

Create builds and saves a new external initiator

func (*ExternalInitiatorsController) Destroy

func (eic *ExternalInitiatorsController) Destroy(c *gin.Context)

Destroy deletes an ExternalInitiator

func (*ExternalInitiatorsController) Index added in v1.10.16

func (eic *ExternalInitiatorsController) Index(c *gin.Context, size, page, offset int)

type FeaturesController added in v1.10.17

type FeaturesController struct {
	App chainlink.Application
}

FeaturesController manages the feature flags

func (*FeaturesController) Index added in v1.10.17

func (fc *FeaturesController) Index(c *gin.Context)

Index retrieves the features Example: "GET <application>/features"

type FeedsManagerController added in v1.10.16

type FeedsManagerController struct {
	App chainlink.Application
}

FeedsManagerController manages the feeds managers

func (*FeedsManagerController) Create added in v1.10.16

func (fmc *FeedsManagerController) Create(c *gin.Context)

Create registers a new feeds manager. Example: "POST <application>/feeds_managers"

func (*FeedsManagerController) List added in v1.10.16

func (fmc *FeedsManagerController) List(c *gin.Context)

List retrieves all the feeds managers Example: "GET <application>/feeds_managers"

func (*FeedsManagerController) Show added in v1.10.16

func (fmc *FeedsManagerController) Show(c *gin.Context)

Show retrieve a feeds manager by id Example: "GET <application>/feeds_managers/<id>"

func (*FeedsManagerController) Update added in v1.10.17

func (fmc *FeedsManagerController) Update(c *gin.Context)

Update updates a feeds manager Example: "PUT <application>/feeds_managers/<id>"

type HealthController added in v1.10.16

type HealthController struct {
	App chainlink.Application
}

func (*HealthController) Health added in v1.10.16

func (hc *HealthController) Health(c *gin.Context)

func (*HealthController) Readyz added in v1.10.16

func (hc *HealthController) Readyz(c *gin.Context)

NOTE: We only implement the k8s readiness check, *not* the liveness check. Liveness checks are only recommended in cases where the app doesn't crash itself on panic, and if implemented incorrectly can cause cascading failures. See the following for more information: - https://srcco.de/posts/kubernetes-liveness-probes-are-dangerous.html

type JobProposalsController added in v1.10.16

type JobProposalsController struct {
	App chainlink.Application
}

JobProposalsController manages the job proposals

func (*JobProposalsController) Approve added in v1.10.16

func (jpc *JobProposalsController) Approve(c *gin.Context)

Approve approves a job proposal. Example: "POST <application>/job_proposals/<id>/reject"

func (*JobProposalsController) Cancel added in v1.10.17

func (jpc *JobProposalsController) Cancel(c *gin.Context)

Cancel cancels a job proposal and deletes its associated running job. Example: "POST <application>/job_proposals/<id>/cancel"

func (*JobProposalsController) Index added in v1.10.16

func (jpc *JobProposalsController) Index(c *gin.Context)

Index returns JobProposals Example:

"<application>/job_proposals

func (*JobProposalsController) Reject added in v1.10.16

func (jpc *JobProposalsController) Reject(c *gin.Context)

Reject rejects a job proposal. Example: "POST <application>/job_proposals/<id>/reject"

func (*JobProposalsController) Show added in v1.10.16

func (jpc *JobProposalsController) Show(c *gin.Context)

Show returns a JobProposal Example:

"<application>/job_proposals/:id

func (*JobProposalsController) UpdateSpec added in v1.10.16

func (jpc *JobProposalsController) UpdateSpec(c *gin.Context)

UpdateSpec updates the spec of a job proposal Example: "PATCH <application>/job_proposals/<id>/spec"

type JobsController added in v1.10.16

type JobsController struct {
	App chainlink.Application
}

JobsController manages jobs

func (*JobsController) Create added in v1.10.16

func (jc *JobsController) Create(c *gin.Context)

Create validates, saves and starts a new job. Example: "POST <application>/jobs"

func (*JobsController) Delete added in v1.10.16

func (jc *JobsController) Delete(c *gin.Context)

Delete hard deletes a job spec. Example: "DELETE <application>/specs/:ID"

func (*JobsController) Index added in v1.10.16

func (jc *JobsController) Index(c *gin.Context, size, page, offset int)

Index lists all jobs Example: "GET <application>/jobs"

func (*JobsController) Show added in v1.10.16

func (jc *JobsController) Show(c *gin.Context)

Show returns the details of a job :ID could be both job ID and external job ID Example: "GET <application>/jobs/:ID"

type LogController added in v1.10.16

type LogController struct {
	App chainlink.Application
}

LogController manages the logger config

func (*LogController) Get added in v1.10.16

func (cc *LogController) Get(c *gin.Context)

Get retrieves the current log config settings

func (*LogController) Patch added in v1.10.16

func (cc *LogController) Patch(c *gin.Context)

Patch sets a log level and enables sql logging for the logger

type LogPatchRequest added in v1.10.16

type LogPatchRequest struct {
	Level           string      `json:"level"`
	SqlEnabled      *bool       `json:"sqlEnabled"`
	ServiceLogLevel [][2]string `json:"serviceLogLevel"`
}

type NodesController added in v1.10.17

type NodesController struct {
	App chainlink.Application
}

func (*NodesController) Create added in v1.10.17

func (nc *NodesController) Create(c *gin.Context)

func (*NodesController) Delete added in v1.10.17

func (nc *NodesController) Delete(c *gin.Context)

func (*NodesController) Index added in v1.10.17

func (nc *NodesController) Index(c *gin.Context, size, page, offset int)

type OCRKeysController added in v1.10.16

type OCRKeysController struct {
	App chainlink.Application
}

OCRKeysController manages OCR key bundles

func (*OCRKeysController) Create added in v1.10.16

func (ocrkc *OCRKeysController) Create(c *gin.Context)

Create and return an OCR key bundle Example: "POST <application>/keys/ocr"

func (*OCRKeysController) Delete added in v1.10.16

func (ocrkc *OCRKeysController) Delete(c *gin.Context)

Delete an OCR key bundle Example: "DELETE <application>/keys/ocr/:keyID" "DELETE <application>/keys/ocr/:keyID?hard=true"

func (*OCRKeysController) Export added in v1.10.16

func (ocrkc *OCRKeysController) Export(c *gin.Context)

Export exports an OCR key bundle Example: "Post <application>/keys/ocr/export"

func (*OCRKeysController) Import added in v1.10.16

func (ocrkc *OCRKeysController) Import(c *gin.Context)

Import imports an OCR key bundle Example: "Post <application>/keys/ocr/import"

func (*OCRKeysController) Index added in v1.10.16

func (ocrkc *OCRKeysController) Index(c *gin.Context)

Index lists OCR key bundles Example: "GET <application>/keys/ocr"

type P2PKeysController added in v1.10.16

type P2PKeysController struct {
	App chainlink.Application
}

P2PKeysController manages P2P keys

func (*P2PKeysController) Create added in v1.10.16

func (p2pkc *P2PKeysController) Create(c *gin.Context)

Create and return a P2P key Example: "POST <application>/keys/p2p"

func (*P2PKeysController) Delete added in v1.10.16

func (p2pkc *P2PKeysController) Delete(c *gin.Context)

Delete a P2P key Example: "DELETE <application>/keys/p2p/:keyID" "DELETE <application>/keys/p2p/:keyID?hard=true"

func (*P2PKeysController) Export added in v1.10.16

func (p2pkc *P2PKeysController) Export(c *gin.Context)

Export exports a P2P key Example: "Post <application>/keys/p2p/export"

func (*P2PKeysController) Import added in v1.10.16

func (p2pkc *P2PKeysController) Import(c *gin.Context)

Import imports a P2P key Example: "Post <application>/keys/p2p/import"

func (*P2PKeysController) Index added in v1.10.16

func (p2pkc *P2PKeysController) Index(c *gin.Context)

Index lists P2P keys Example: "GET <application>/keys/p2p"

type PingController added in v1.10.16

type PingController struct {
	App chainlink.Application
}

PingController has the ping endpoint.

func (*PingController) Show added in v1.10.16

func (eic *PingController) Show(c *gin.Context)

Show returns pong.

type PipelineJobSpecErrorsController added in v1.10.16

type PipelineJobSpecErrorsController struct {
	App chainlink.Application
}

PipelineJobSpecErrorsController manages PipelineJobSpecError requests

func (*PipelineJobSpecErrorsController) Destroy added in v1.10.16

func (psec *PipelineJobSpecErrorsController) Destroy(c *gin.Context)

Destroy deletes a PipelineJobSpecError record from the database, effectively silencing the error notification

type PipelineRunsController added in v1.10.16

type PipelineRunsController struct {
	App chainlink.Application
}

PipelineRunsController manages V2 job run requests.

func (*PipelineRunsController) Create added in v1.10.16

func (prc *PipelineRunsController) Create(c *gin.Context)

Create triggers a pipeline run for a job. Example: "POST <application>/jobs/:ID/runs"

func (*PipelineRunsController) Index added in v1.10.16

func (prc *PipelineRunsController) Index(c *gin.Context, size, page, offset int)

Index returns all pipeline runs for a job. Example: "GET <application>/jobs/:ID/runs"

func (*PipelineRunsController) Resume added in v1.10.16

func (prc *PipelineRunsController) Resume(c *gin.Context)

Resume finishes a task and resumes the pipeline run. Example: "PATCH <application>/jobs/:ID/runs/:runID"

func (*PipelineRunsController) Show added in v1.10.16

func (prc *PipelineRunsController) Show(c *gin.Context)

Show returns a specified pipeline run. Example: "GET <application>/jobs/:ID/runs/:runID"

type ReplayController added in v1.10.16

type ReplayController struct {
	App chainlink.Application
}

func (*ReplayController) ReplayFromBlock added in v1.10.16

func (bdc *ReplayController) ReplayFromBlock(c *gin.Context)

ReplayFromBlock causes the node to process blocks again from the given block number Example:

"<application>/v2/replay_from_block/:number"

type ReplayResponse added in v1.10.16

type ReplayResponse struct {
	Message    string     `json:"message"`
	EVMChainID *utils.Big `json:"evmChainID"`
}

func (ReplayResponse) GetID added in v1.10.16

func (s ReplayResponse) GetID() string

GetID returns the jsonapi ID.

func (ReplayResponse) GetName added in v1.10.16

func (ReplayResponse) GetName() string

GetName returns the collection name for jsonapi.

func (*ReplayResponse) SetID added in v1.10.16

func (*ReplayResponse) SetID(string) error

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

type ServeFileSystem added in v1.10.16

type ServeFileSystem interface {
	http.FileSystem
	Exists(prefix string, path string) bool
}

ServeFileSystem wraps a http.FileSystem with an additional file existence check

type Session

type Session struct {
	Authenticated bool `json:"authenticated"`
}

func (Session) GetID

func (s Session) GetID() string

GetID returns the jsonapi ID.

func (Session) GetName

func (Session) GetName() string

GetName returns the collection name for jsonapi.

func (*Session) SetID

func (*Session) SetID(string) error

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

type SessionsController

type SessionsController struct {
	App      chainlink.Application
	Sessions *clsessions.WebAuthnSessionStore
}

SessionsController manages session requests.

func (*SessionsController) Create

func (sc *SessionsController) Create(c *gin.Context)

Create creates a session ID for the given user credentials, and returns it in a cookie.

func (*SessionsController) Destroy

func (sc *SessionsController) Destroy(c *gin.Context)

Destroy erases the session ID for the sole API user.

type TransactionsController

type TransactionsController struct {
	App chainlink.Application
}

TransactionsController displays Ethereum transactions requests.

func (*TransactionsController) Index

func (tc *TransactionsController) Index(c *gin.Context, size, page, offset int)

Index returns paginated transactions

func (*TransactionsController) Show

func (tc *TransactionsController) Show(c *gin.Context)

Show returns the details of a Ethereum Transasction details. Example:

"<application>/transactions/:TxHash"

type TransfersController

type TransfersController struct {
	App chainlink.Application
}

TransfersController can send LINK tokens to another address

func (*TransfersController) Create

func (tc *TransfersController) Create(c *gin.Context)

Create sends ETH from the Chainlink's account to a specified address.

Example: "<application>/withdrawals"

type TxAttemptsController

type TxAttemptsController struct {
	App chainlink.Application
}

TxAttemptsController lists TxAttempts requests.

func (*TxAttemptsController) Index

func (tac *TxAttemptsController) Index(c *gin.Context, size, page, offset int)

Index returns paginated transaction attempts

type UpdateChainRequest added in v1.10.17

type UpdateChainRequest struct {
	Enabled bool           `json:"enabled"`
	Config  types.ChainCfg `json:"config"`
}

type UpdateFeedsManagerRequest added in v1.10.17

type UpdateFeedsManagerRequest struct {
	Name                   string           `json:"name"`
	URI                    string           `json:"uri"`
	JobTypes               []string         `json:"jobTypes"`
	PublicKey              crypto.PublicKey `json:"publicKey"`
	IsBootstrapPeer        bool             `json:"isBootstrapPeer"`
	BootstrapPeerMultiaddr null.String      `json:"bootstrapPeerMultiaddr"`
}

UpdateFeedsManagerRequest represents a JSONAPI request for updating a feeds manager

type UpdatePasswordRequest added in v1.10.16

type UpdatePasswordRequest struct {
	OldPassword string `json:"oldPassword"`
	NewPassword string `json:"newPassword"`
}

UpdatePasswordRequest defines the request to set a new password for the current session's User.

type UpdateSpecRequest added in v1.10.16

type UpdateSpecRequest struct {
	Spec string `json:"spec"`
}

type UserController

type UserController struct {
	App chainlink.Application
}

UserController manages the current Session's User User.

func (*UserController) DeleteAPIToken added in v1.10.16

func (c *UserController) DeleteAPIToken(ctx *gin.Context)

DeleteAPIToken deletes and disables a user's API token.

func (*UserController) NewAPIToken added in v1.10.16

func (c *UserController) NewAPIToken(ctx *gin.Context)

NewAPIToken generates a new API token for a user overwriting any pre-existing one set.

func (*UserController) UpdatePassword

func (c *UserController) UpdatePassword(ctx *gin.Context)

UpdatePassword changes the password for the current User.

type VRFKeysController added in v1.10.16

type VRFKeysController struct {
	App chainlink.Application
}

VRFKeysController manages VRF keys

func (*VRFKeysController) Create added in v1.10.16

func (vrfkc *VRFKeysController) Create(c *gin.Context)

Create and return a VRF key Example: "POST <application>/keys/vrf"

func (*VRFKeysController) Delete added in v1.10.16

func (vrfkc *VRFKeysController) Delete(c *gin.Context)

Delete a VRF key Example: "DELETE <application>/keys/vrf/:keyID" "DELETE <application>/keys/vrf/:keyID?hard=true"

func (*VRFKeysController) Export added in v1.10.16

func (vrfkc *VRFKeysController) Export(c *gin.Context)

Export exports a VRF key Example: "Post <application>/keys/vrf/export/:keyID"

func (*VRFKeysController) Import added in v1.10.16

func (vrfkc *VRFKeysController) Import(c *gin.Context)

Import imports a VRF key Example: "Post <application>/keys/vrf/import"

func (*VRFKeysController) Index added in v1.10.16

func (vrfkc *VRFKeysController) Index(c *gin.Context)

Index lists VRF keys Example: "GET <application>/keys/vrf"

type WebAuthnController added in v1.10.17

type WebAuthnController struct {
	App                          chainlink.Application
	InProgressRegistrationsStore *sessions.WebAuthnSessionStore
}

WebAuthnController manages registers new keys as well as authentication with those keys

func (*WebAuthnController) BeginRegistration added in v1.10.17

func (c *WebAuthnController) BeginRegistration(ctx *gin.Context)

func (*WebAuthnController) FinishRegistration added in v1.10.17

func (c *WebAuthnController) FinishRegistration(ctx *gin.Context)

type WebSecurityConfig added in v1.10.17

type WebSecurityConfig interface {
	AllowOrigins() string
	Dev() bool
	TLSRedirect() bool
	TLSHost() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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