Documentation
¶
Index ¶
- func FlatRegistries(cfg ContextConfig) []fcre.ContextRegistryEntry
- func IsOnChainRegistry(deploymentRegistryID string, registries []fcre.ContextRegistryEntry) bool
- func NewCLIRunner(binaryPath string, apiKey string, opts ...CLIRunnerOption) *cliRunner
- func WriteCREEnvFile(workDir, contextYAMLPath string, cfg cfgenv.CREConfig, donFamily string) (string, error)
- func WriteContextYAML(dir string, cfg ContextConfig) (string, error)
- func WriteWorkflowYAML(dir string, cfg WorkflowConfig) (string, error)
- type CLIRunnerOption
- type ContextConfig
- type ContextEnvironment
- type ContextOverrides
- type UserWorkflow
- type WorkflowArtifacts
- type WorkflowConfig
- type WorkflowTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlatRegistries ¶
func FlatRegistries(cfg ContextConfig) []fcre.ContextRegistryEntry
FlatRegistries collects all registry entries from a ContextConfig (across all environments).
func IsOnChainRegistry ¶
func IsOnChainRegistry(deploymentRegistryID string, registries []fcre.ContextRegistryEntry) bool
IsOnChainRegistry reports whether the registry matching deploymentRegistryID has Type "on-chain" in the given list.
func NewCLIRunner ¶
func NewCLIRunner(binaryPath string, apiKey string, opts ...CLIRunnerOption) *cliRunner
NewCLIRunner returns a [cliRunner] for the given binary path and API key. An empty binaryPath defaults to "cre" (resolved via PATH).
func WriteCREEnvFile ¶
func WriteCREEnvFile(workDir, contextYAMLPath string, cfg cfgenv.CREConfig, donFamily string) (string, error)
WriteCREEnvFile writes a .env file with CRE config values for the CRE CLI.
func WriteContextYAML ¶
func WriteContextYAML(dir string, cfg ContextConfig) (string, error)
WriteContextYAML writes context.yaml to dir and returns the file path.
func WriteWorkflowYAML ¶
func WriteWorkflowYAML(dir string, cfg WorkflowConfig) (string, error)
WriteWorkflowYAML writes workflow.yaml to dir and returns the file path.
Types ¶
type CLIRunnerOption ¶
type CLIRunnerOption func(*cliRunner)
CLIRunnerOption configures a [cliRunner] from NewCLIRunner.
func WithContextRegistries ¶
func WithContextRegistries(registries []fcre.ContextRegistryEntry) CLIRunnerOption
WithContextRegistries sets domain-level registry entries for CRE context.yaml generation (e.g. loaded from domain.yaml cre.default_registries by engine/cld/environment.Load).
func WithOutputWriters ¶
func WithOutputWriters(stdout io.Writer, stderr io.Writer) CLIRunnerOption
WithOutputWriters overrides real-time streaming writers. Pass nil for either stream to disable live output for that stream.
type ContextConfig ¶
type ContextConfig map[string]ContextEnvironment
ContextConfig is the full context.yaml document (environment name → config).
func BuildContextConfig ¶
func BuildContextConfig( donFamily string, contextOverrides ContextOverrides, cfg cfgenv.CREConfig, domainRegistries []fcre.ContextRegistryEntry, ) (ContextConfig, error)
BuildContextConfig produces the context.yaml structure from domain defaults, input overrides, and CRE config. ContextOverrides take precedence over the domain.yaml configs.
type ContextEnvironment ¶
type ContextEnvironment struct {
TenantID string `json:"tenantId" yaml:"tenant_id"`
DonFamily string `json:"donFamily" yaml:"don_family"`
GatewayURL string `json:"gatewayUrl" yaml:"gateway_url"`
Registries []fcre.ContextRegistryEntry `json:"registries,omitempty" yaml:"registries,omitempty"`
}
ContextEnvironment is one environment block (e.g. PRODUCTION) in context.yaml.
type ContextOverrides ¶
type ContextOverrides struct {
TenantID string `json:"tenantId,omitempty" yaml:"tenantId,omitempty"`
GatewayURL string `json:"gatewayUrl,omitempty" yaml:"gatewayUrl,omitempty"`
Registries []fcre.ContextRegistryEntry `json:"registries,omitempty" yaml:"registries,omitempty"`
}
ContextOverrides holds optional user-level overrides for the generated context.yaml. When fields are empty, values fall back to CRE_* process environment variables.
type UserWorkflow ¶
type UserWorkflow struct {
DeploymentRegistry string `json:"deploymentRegistry,omitempty" yaml:"deployment-registry,omitempty"`
WorkflowName string `json:"workflowName" yaml:"workflow-name"`
}
UserWorkflow is the user-workflow section of workflow.yaml.
type WorkflowArtifacts ¶
type WorkflowArtifacts struct {
WorkflowPath string `json:"workflowPath" yaml:"workflow-path"`
ConfigPath string `json:"configPath" yaml:"config-path"`
SecretsPath string `json:"secretsPath,omitempty" yaml:"secrets-path,omitempty"`
}
WorkflowArtifacts is the workflow-artifacts section of workflow.yaml.
type WorkflowConfig ¶
type WorkflowConfig map[string]WorkflowTarget
WorkflowConfig is the full workflow.yaml document.
type WorkflowTarget ¶
type WorkflowTarget struct {
UserWorkflow UserWorkflow `json:"userWorkflow" yaml:"user-workflow"`
WorkflowArtifacts WorkflowArtifacts `json:"workflowArtifacts" yaml:"workflow-artifacts"`
}
WorkflowTarget is one target block in workflow.yaml.