{"modulePath":"github.com/smartcontractkit/cre-cli","version":"v1.42.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package runtime\n\n## Variables\n\n```go\nvar (\n\tErrNoCredentials    = errors.New(\"no credentials found\")\n\tErrValidationFailed = errors.New(\"credential validation failed\")\n)\n```\n\n## Types\n\n```go\ntype Context struct {\n\tLogger           *zerolog.Logger\n\tViper            *viper.Viper\n\tClientFactory    client.Factory\n\tSettings         *settings.Settings\n\tCredentials      *credentials.Credentials\n\tEnvironmentSet   *environments.EnvironmentSet\n\tTenantContext    *tenantctx.EnvironmentContext\n\tResolvedRegistry settings.ResolvedRegistry\n\tWorkflow         WorkflowRuntime\n\n\tOrgID                string\n\tDerivedWorkflowOwner string\n\t// InvocationDir is the working directory at the time the CLI was invoked,\n\t// before any os.Chdir calls made by SetExecutionContext.\n\tInvocationDir string\n}\n```\n\n```go\nfunc NewContext(logger *zerolog.Logger, viper *viper.Viper) *Context\n```\n\n```go\nfunc (ctx *Context) AttachCredentials(validationCtx context.Context, skipValidation bool, onRetry authvalidation.RetryNotifier) error\n```\n\n```go\nfunc (ctx *Context) AttachEnvironmentSet() error\n```\n\n```go\nfunc (ctx *Context) AttachResolvedRegistry() error\n```\nAttachResolvedRegistry resolves the deployment-registry from workflow settings against the tenant context registries. Must be called after AttachSettings and AttachTenantContext.\n\n```go\nfunc (ctx *Context) AttachSettings(cmd *cobra.Command, validateDeployRPC bool) error\n```\n\n```go\nfunc (ctx *Context) AttachTenantContext(validationCtx context.Context) error\n```\nAttachTenantContext loads the user context for the current environment. If the manifest is missing, it is fetched from the service first.\n\n```go\nfunc (ctx *Context) FinalizeDeferredWorkflowOwner(cmd *cobra.Command) error\n```\nFinalizeDeferredWorkflowOwner fills workflow owner when settings load deferred it (non-empty deployment-registry). Call after AttachResolvedRegistry.\n\n```go\nfunc (ctx *Context) TryAttachCredentials()\n```\nTryAttachCredentials silently loads credentials from the environment or disk without validation, prompting, or failing. It is used for commands that do not require authentication so their telemetry events can still be attributed to the logged-in user; telemetry is skipped when no usable credentials exist.\n\n```go\nfunc (ctx *Context) ValidateOnchainRegistryRPC() error\n```\nValidateOnchainRegistryRPC validates the deployment RPC URL when the resolved registry is on-chain. It is a no-op for off-chain (private) registries. A nil resolved registry is treated as on-chain (the default). Must be called after AttachResolvedRegistry.\n\n```go\ntype WorkflowRuntime struct {\n\tID       string\n\tLanguage string\n}\n```\n\n","path":"github.com/smartcontractkit/cre-cli/internal/runtime","name":"runtime","synopsis":"","isRedistributable":true}
