Documentation
¶
Index ¶
- func CreateDescribeComponentFunc(authManager auth.AuthManager) func(string, string) (map[string]any, error)
- func GetBackendCommand() *cobra.Command
- func InitConfigAndAuth(component, stack, identity string, componentPrompted, stackPrompted bool) (*schema.AtmosConfiguration, *schema.AuthContext, error)
- func ResetDependencies()
- func SetAtmosConfig(config *schema.AtmosConfiguration)
- func SetConfigInitializer(ci ConfigInitializer)
- func SetProvisioner(p Provisioner)
- type ConfigInitializer
- type CreateBackendParams
- type DeleteBackendParams
- type Provisioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDescribeComponentFunc ¶
func CreateDescribeComponentFunc(authManager auth.AuthManager) func(string, string) (map[string]any, error)
CreateDescribeComponentFunc creates a describe component function with the given authManager.
func GetBackendCommand ¶
GetBackendCommand returns the backend command for parent registration.
func InitConfigAndAuth ¶
func InitConfigAndAuth(component, stack, identity string, componentPrompted, stackPrompted bool) (*schema.AtmosConfiguration, *schema.AuthContext, error)
InitConfigAndAuth initializes Atmos configuration and optional authentication. Returns atmosConfig, authContext, and error. It loads component configuration, merges component-level auth with global auth, and creates an AuthContext that respects component's default identity settings. The componentPrompted and stackPrompted parameters record whether component/stack were resolved via an interactive prompt; they flow into auth.ReExecContext so a profile-fallback re-exec re-injects prompted values into the child's argv instead of losing them (or re-prompting for them) after the re-exec.
func ResetDependencies ¶
func ResetDependencies()
ResetDependencies resets dependencies to production defaults (for test cleanup).
func SetAtmosConfig ¶
func SetAtmosConfig(config *schema.AtmosConfiguration)
SetAtmosConfig sets the Atmos configuration for the backend command. This is called from root.go after atmosConfig is initialized.
func SetConfigInitializer ¶
func SetConfigInitializer(ci ConfigInitializer)
SetConfigInitializer sets the config initializer (for testing). If nil is passed, resets to default implementation.
func SetProvisioner ¶
func SetProvisioner(p Provisioner)
SetProvisioner sets the provisioner (for testing). If nil is passed, resets to default implementation.
Types ¶
type ConfigInitializer ¶
type ConfigInitializer interface {
// InitConfigAndAuth initializes Atmos configuration and optional authentication.
// The componentPrompted and stackPrompted parameters record whether component/stack
// were resolved via an interactive prompt (rather than supplied on the command line,
// via config, or via an environment variable) so a profile-fallback re-exec can
// re-inject prompted values into the child's argv without duplicating CLI-supplied ones.
InitConfigAndAuth(component, stack, identity string, componentPrompted, stackPrompted bool) (*schema.AtmosConfiguration, *schema.AuthContext, error)
}
ConfigInitializer abstracts configuration and auth initialization for testability.
type CreateBackendParams ¶
type CreateBackendParams struct {
AtmosConfig *schema.AtmosConfiguration
Component string
Stack string
DescribeFunc func(string, string) (map[string]any, error)
AuthContext *schema.AuthContext
}
CreateBackendParams contains parameters for CreateBackend operation.
type DeleteBackendParams ¶
type DeleteBackendParams struct {
AtmosConfig *schema.AtmosConfiguration
Component string
Stack string
Force bool
DescribeFunc func(string, string) (map[string]any, error)
AuthContext *schema.AuthContext
}
DeleteBackendParams contains parameters for DeleteBackend operation.
type Provisioner ¶
type Provisioner interface {
CreateBackend(params *CreateBackendParams) error
DeleteBackend(params *DeleteBackendParams) error
DescribeBackend(atmosConfig *schema.AtmosConfiguration, component string, opts interface{}) error
ListBackends(atmosConfig *schema.AtmosConfiguration, opts interface{}) error
}
Provisioner abstracts provisioning operations for testability.