Documentation
¶
Index ¶
- type Factory
- func (f *Factory) AccountID() (string, error)
- func (f *Factory) ApiClient() (*api.ModularClient, error)
- func (f *Factory) ApplyOverrides(accountID, projectID string) *Factory
- func (f *Factory) AuthClient() (*auth.Client, error)
- func (f *Factory) Config() (*config.Config, error)
- func (f *Factory) Context() context.Context
- func (f *Factory) ProjectID() (string, error)
- func (f *Factory) WithAccount(accountID string) *Factory
- func (f *Factory) WithProject(projectID string) *Factory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory provides centralized dependency management for commands
func (*Factory) AccountID ¶
AccountID returns the account ID to use, either from override or default
func (*Factory) ApiClient ¶
func (f *Factory) ApiClient() (*api.ModularClient, error)
ApiClient returns the API client, creating it once if needed
func (*Factory) ApplyOverrides ¶ added in v0.6.0
ApplyOverrides applies account and project overrides if they are not empty. This is a helper function to reduce duplication across commands.
func (*Factory) AuthClient ¶
AuthClient returns the auth client, creating it once if needed
func (*Factory) Context ¶
Context returns a context for API operations This can be extended in the future to include timeouts, tracing, etc.
func (*Factory) ProjectID ¶
ProjectID returns the project ID to use, either from override or default
func (*Factory) WithAccount ¶
WithAccount sets a specific account ID to use
func (*Factory) WithProject ¶
WithProject sets a specific project ID to use