Documentation
¶
Index ¶
- type Config
- type Metadata
- type SDK
- func (s *SDK) AddCommand(cmd *cobra.Command)
- func (s *SDK) AddGlobalFlags(currentContext string)
- 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) GetContext() (*config.Context, error)
- func (s *SDK) GetDockerClient() (*docker.DockerClient, error)
- func (s *SDK) GetMetadataCommand() *cobra.Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SDK ¶
SDK provides common functionality for plugins
func (*SDK) AddCommand ¶
AddCommand adds a subcommand to the plugin
func (*SDK) AddGlobalFlags ¶ added in v0.2.0
AddGlobalFlags adds common libops-specific flags
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) 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