framework

package
v0.0.0-...-75062d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitHubModuleWithURLProvider

func GitHubModuleWithURLProvider(provider api.URLProvider) api.IntegrationModule

GitHubModuleWithURLProvider returns a GitHub integration module that uses the given URLProvider for webhook, homepage, and optional callback URLs when not set by flags. Use this in custom installers (e.g. helmet-ex) to supply URLs from config or environment without importing internal.

func NewTarFS

func NewTarFS(tarball []byte) (fs.FS, error)

NewTarFS creates an fs.FS from a tarball.

func StandardIntegrations

func StandardIntegrations() []api.IntegrationModule

StandardIntegrations returns the list of standard integration modules. This exposes the standard integrations (GitHub, GitLab, Quay, etc.) through the public API for use with WithIntegrations option.

func WithURLProvider

func WithURLProvider(modules []api.IntegrationModule, provider api.URLProvider) []api.IntegrationModule

WithURLProvider returns a copy of modules with the GitHub integration replaced by one that uses the given URLProvider. Use after StandardIntegrations() to customize GitHub App URLs (e.g. from env or config) without changing other integrations.

Types

type App

type App struct {
	AppCtx  *api.AppContext  // application metadata (single source of truth)
	ChartFS *chartfs.ChartFS // installer filesystem
	// contains filtered or unexported fields
}

App represents the installer application runtime. It holds runtime dependencies and coordinates the execution of commands. Application metadata (name, version, etc.) is stored in AppCtx.

func NewApp

func NewApp(
	appCtx *api.AppContext,
	cfs *chartfs.ChartFS,
	opts ...Option,
) (*App, error)

NewApp creates a new installer application runtime. It automatically sets up the Cobra Root Command and standard subcommands.

The appCtx parameter provides application metadata (name, version, etc.). The cfs parameter provides access to the installer filesystem (charts, config). Additional runtime options can be passed via functional options.

func NewAppFromTarball

func NewAppFromTarball(
	appCtx *api.AppContext,
	tarball []byte,
	cwd string,
	opts ...Option,
) (*App, error)

NewAppFromTarball creates a new installer application from an embedded tarball. This is a convenience constructor that handles the internal filesystem setup, making it easier for external consumers to create an App instance.

Parameters:

  • appCtx: Application metadata (name, version, etc.)
  • tarball: Embedded installer tarball bytes
  • cwd: Current working directory for local filesystem overlay
  • opts: Additional runtime options (integrations, MCP image, etc.)

The function creates an overlay filesystem combining the embedded tarball contents with the local filesystem at cwd, then initializes the App.

func (*App) Command

func (a *App) Command() *cobra.Command

Command exposes the Cobra command.

func (*App) Run

func (a *App) Run() error

Run is a shortcut Cobra's Execute method.

type Option

type Option func(*App)

Option represents a functional option for the App runtime. These options configure runtime dependencies and behavior. For application metadata (name, version, etc.), use ContextOption with NewAppContext.

func WithInstallerTarball

func WithInstallerTarball(tarball []byte) Option

WithInstallerTarball sets the embedded installer tarball for the application.

func WithIntegrations

func WithIntegrations(modules ...api.IntegrationModule) Option

WithIntegrations sets the supported integrations for the application.

func WithMCPImage

func WithMCPImage(image string) Option

WithMCPImage sets the container image for the MCP server.

func WithMCPToolsBuilder

func WithMCPToolsBuilder(builder mcptools.MCPToolsBuilder) Option

WithMCPToolsBuilder sets the MCP tools builder for the application.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL