{"modulePath":"github.com/GoPlugin/pluginV2","version":"v0.5.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package loader\n\n## Variables\n\n```go\nvar ErrInvalidType = errors.New(\"invalid type\")\n```\nErrInvalidType indicates that results loaded is not the type expected\n\n## Functions\n\n```go\nfunc GetChainByID(ctx context.Context, id string) (*types.DBChain, error)\n```\nGetChainByID fetches the chain by it's id.\n\n```go\nfunc GetEthTxAttemptsByEthTxID(ctx context.Context, id string) ([]txmgr.EthTxAttempt, error)\n```\nGetEthTxAttemptsByEthTxID fetches the attempts for an eth transaction.\n\n```go\nfunc GetFeedsManagerByID(ctx context.Context, id string) (*feeds.FeedsManager, error)\n```\nGetFeedsManagerByID fetches the feed manager by ID.\n\n```go\nfunc GetFeedsManagerChainConfigsByManagerID(ctx context.Context, mgrID int64) ([]feeds.ChainConfig, error)\n```\n\n```go\nfunc GetJobByExternalJobID(ctx context.Context, id string) (*job.Job, error)\n```\nGetJobByExternalJobID fetches the job proposals by external job ID\n\n```go\nfunc GetJobByPipelineSpecID(ctx context.Context, id string) (*job.Job, error)\n```\nGetJobByPipelineSpecID fetches the job by pipeline spec ID.\n\n```go\nfunc GetJobProposalsByFeedsManagerID(ctx context.Context, id string) ([]feeds.JobProposal, error)\n```\nGetJobProposalsByFeedsManagerID fetches the job proposals by feeds manager ID.\n\n```go\nfunc GetJobRunsByIDs(ctx context.Context, ids []int64) ([]pipeline.Run, error)\n```\nGetJobRunsByIDs fetches the job runs by their ID.\n\n```go\nfunc GetJobSpecErrorsByJobID(ctx context.Context, jobID int32) ([]job.SpecError, error)\n```\nGetJobSpecErrorsByJobID fetches the Spec Errors for a Job.\n\n```go\nfunc GetLatestSpecByJobProposalID(ctx context.Context, jpID string) (*feeds.JobProposalSpec, error)\n```\nGetLatestSpecByJobProposalID fetches the latest spec for a job proposal id.\n\n```go\nfunc GetNodesByChainID(ctx context.Context, id string) ([]types.Node, error)\n```\nGetNodesByChainID fetches the nodes for a chain.\n\n```go\nfunc GetSpecsByJobProposalID(ctx context.Context, jpID string) ([]feeds.JobProposalSpec, error)\n```\nGetSpecsByJobProposalID fetches the spec for a job proposal id.\n\n```go\nfunc InjectDataloader(ctx context.Context, app chainlink.Application) context.Context\n```\nInjectDataloader injects the dataloader into the context.\n\n```go\nfunc Middleware(app chainlink.Application) gin.HandlerFunc\n```\nMiddleware injects the dataloader into a gin context.\n\n## Types\n\n```go\ntype Dataloader struct {\n\tChainsByIDLoader                          *dataloader.Loader\n\tEthTxAttemptsByEthTxIDLoader              *dataloader.Loader\n\tFeedsManagersByIDLoader                   *dataloader.Loader\n\tFeedsManagerChainConfigsByManagerIDLoader *dataloader.Loader\n\tJobProposalsByManagerIDLoader             *dataloader.Loader\n\tJobProposalSpecsByJobProposalID           *dataloader.Loader\n\tJobRunsByIDLoader                         *dataloader.Loader\n\tJobsByExternalJobIDs                      *dataloader.Loader\n\tJobsByPipelineSpecIDLoader                *dataloader.Loader\n\tNodesByChainIDLoader                      *dataloader.Loader\n\tSpecErrorsByJobIDLoader                   *dataloader.Loader\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc For(ctx context.Context) *Dataloader\n```\nFor returns the dataloader for a given context\n\n```go\nfunc New(app chainlink.Application) *Dataloader\n```\n\n","path":"github.com/GoPlugin/pluginV2/core/web/loader","name":"loader","synopsis":"","isRedistributable":true}
