Documentation
¶
Index ¶
- func Run(ctx context.Context, args []string, stdout, stderr io.Writer) (exitCode int)
- func SetRegionVerifierFactoryForTest(factory RegionVerifierFactory) func()
- func WithAPICallerFactory(ctx context.Context, factory APICallerFactory) context.Context
- func WithFullCommandSurface(ctx context.Context) context.Context
- func WithResourceCallerFactory(ctx context.Context, factory ResourceCallerFactory) context.Context
- type APICallerFactory
- type RegionVerifier
- type RegionVerifierFactory
- type ResourceCallerFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetRegionVerifierFactoryForTest ¶
func SetRegionVerifierFactoryForTest(factory RegionVerifierFactory) func()
SetRegionVerifierFactoryForTest swaps the default region verifier with a fake. Tests should call the returned restore func via t.Cleanup.
func WithAPICallerFactory ¶
func WithAPICallerFactory(ctx context.Context, factory APICallerFactory) context.Context
func WithFullCommandSurface ¶
WithFullCommandSurface keeps spec-level tests able to exercise resources that are intentionally hidden from the public CLI surface.
func WithResourceCallerFactory ¶
func WithResourceCallerFactory(ctx context.Context, factory ResourceCallerFactory) context.Context
Types ¶
type APICallerFactory ¶
type RegionVerifier ¶
RegionVerifier is the surface exposed by aliyun.RegionVerifier and any test double swapped in via SetRegionVerifierFactoryForTest.
type RegionVerifierFactory ¶
type RegionVerifierFactory func(profileName, configPath string, getenv func(string) string) (RegionVerifier, error)
RegionVerifierFactory builds a RegionVerifier for the active profile. The returned error indicates that verification cannot be performed (e.g. missing credentials) — the CLI translates that into a soft skip rather than a hard failure.
Click to show internal directories.
Click to hide internal directories.