Documentation
¶
Index ¶
- func CloneTemplateRepo(opts GitTemplateOptions) error
- func ConfigureTemplateRemotes(opts GitTemplateOptions) error
- type Config
- type GitTemplateOptions
- type Metadata
- type SDK
- func (s *SDK) AddCommand(cmd *cobra.Command)
- func (s *SDK) CloneTemplateRepo(opts GitTemplateOptions) error
- func (s *SDK) ConfigureTemplateRemotes(opts GitTemplateOptions) error
- func (s *SDK) ContextValidators() []validate.Validator
- func (s *SDK) ExecInContainer(ctx context.Context, containerID string, cmd []string) (int, error)
- func (s *SDK) ExecInContainerInteractive(ctx context.Context, containerID string, cmd []string) (int, error)
- func (s *SDK) Execute()
- func (s *SDK) GetComponentManager() (*component.Manager, error)
- func (s *SDK) GetContext() (*config.Context, error)
- func (s *SDK) GetDockerClient() (*docker.DockerClient, error)
- func (s *SDK) GetMetadataCommand() *cobra.Command
- func (s *SDK) PromptAndSaveLocalContext(opts config.LocalContextCreateOptions) (*config.Context, error)
- func (s *SDK) RegisterContextValidator(validator validate.Validator)
- func (s *SDK) SetVersionInfo(version, commit, date string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneTemplateRepo ¶ added in v0.5.0
func CloneTemplateRepo(opts GitTemplateOptions) error
func ConfigureTemplateRemotes ¶ added in v0.5.0
func ConfigureTemplateRemotes(opts GitTemplateOptions) error
Types ¶
type GitTemplateOptions ¶ added in v0.5.0
type SDK ¶
type SDK struct {
Metadata Metadata
Config Config
RootCmd *cobra.Command
// contains filtered or unexported fields
}
SDK provides common functionality for plugins
func (*SDK) AddCommand ¶
AddCommand adds a subcommand to the plugin
func (*SDK) CloneTemplateRepo ¶ added in v0.5.0
func (s *SDK) CloneTemplateRepo(opts GitTemplateOptions) error
func (*SDK) ConfigureTemplateRemotes ¶ added in v0.5.0
func (s *SDK) ConfigureTemplateRemotes(opts GitTemplateOptions) error
func (*SDK) ContextValidators ¶ added in v0.9.0
func (*SDK) ExecInContainer ¶
ExecInContainer executes a command in a Docker container This is a convenience wrapper for plugins
func (*SDK) ExecInContainerInteractive ¶
func (s *SDK) ExecInContainerInteractive(ctx context.Context, containerID string, cmd []string) (int, error)
ExecInContainerInteractive executes an interactive command in a Docker container with TTY This is a convenience wrapper for plugins
func (*SDK) GetComponentManager ¶ added in v0.5.0
GetComponentManager creates a component manager bound to the active sitectl context.
func (*SDK) GetContext ¶
GetContext loads the sitectl context configuration This is useful for plugins that need to access context-specific settings If no context is specified, returns the current context from config
func (*SDK) GetDockerClient ¶
func (s *SDK) GetDockerClient() (*docker.DockerClient, error)
GetDockerClient creates a Docker client respecting the sitectl context This is a helper for plugins that need to interact with Docker Returns the existing DockerClient which handles both local and remote contexts
func (*SDK) GetMetadataCommand ¶
GetMetadataCommand returns a command that displays plugin metadata
func (*SDK) PromptAndSaveLocalContext ¶ added in v0.5.0
func (s *SDK) PromptAndSaveLocalContext(opts config.LocalContextCreateOptions) (*config.Context, error)
PromptAndSaveLocalContext creates or updates a local sitectl context using the shared config prompts and save behavior.
func (*SDK) RegisterContextValidator ¶ added in v0.9.0
func (*SDK) SetVersionInfo ¶ added in v0.6.1
SetVersionInfo formats plugin version metadata like the main sitectl binary.